<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>aSetOfAllSets &#187; Emacs</title>
	<atom:link href="http://l0st3d.wordpress.com/category/emacs/feed/" rel="self" type="application/rss+xml" />
	<link>http://l0st3d.wordpress.com</link>
	<description>A random ream of rants reeled from my reality.</description>
	<lastBuildDate>Mon, 22 Aug 2011 10:29:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='l0st3d.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>aSetOfAllSets &#187; Emacs</title>
		<link>http://l0st3d.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://l0st3d.wordpress.com/osd.xml" title="aSetOfAllSets" />
	<atom:link rel='hub' href='http://l0st3d.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Org-mode PDF export failure</title>
		<link>http://l0st3d.wordpress.com/2010/10/26/org-mode-pdf-export-failure/</link>
		<comments>http://l0st3d.wordpress.com/2010/10/26/org-mode-pdf-export-failure/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 20:06:01 +0000</pubDate>
		<dc:creator>l0st3d</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[org-mode]]></category>

		<guid isPermaLink="false">http://l0st3d.wordpress.com/?p=101</guid>
		<description><![CDATA[Having replaced my laptop due to a tea related accident, I am finding a few things that I need to reconfigure. Org exports are one of them. On my new fedora system, org-mode pdf exports fail with the messages: LaTeX export done, pushed to kill ring and clipboard Processing LaTeX file... (Shell command failed with [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=l0st3d.wordpress.com&#038;blog=12124152&#038;post=101&#038;subd=l0st3d&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Having replaced my laptop due to a tea related accident, I am finding a few things that I need to reconfigure. Org exports are one of them. On my new fedora system, org-mode pdf exports fail with the messages:</p>
<p><code><br />
LaTeX export done, pushed to kill ring and clipboard<br />
Processing LaTeX file...<br />
(Shell command failed with code 127 and some error output) [2 times]<br />
Processing LaTeX file...done<br />
org-export-as-pdf: PDF file was not produced<br />
</code></p>
<p>This can be fixed with:<br />
<code><br />
yum install rubber<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/l0st3d.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/l0st3d.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=l0st3d.wordpress.com&#038;blog=12124152&#038;post=101&#038;subd=l0st3d&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://l0st3d.wordpress.com/2010/10/26/org-mode-pdf-export-failure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc23d1f40d9cfa1c5015ea972759cbf4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ed</media:title>
		</media:content>
	</item>
		<item>
		<title>Minimal emacs config</title>
		<link>http://l0st3d.wordpress.com/2010/09/29/minimal-emacs-config/</link>
		<comments>http://l0st3d.wordpress.com/2010/09/29/minimal-emacs-config/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 14:40:21 +0000</pubDate>
		<dc:creator>l0st3d</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://l0st3d.wordpress.com/?p=90</guid>
		<description><![CDATA[After spilling tea on my laptop yesterday, I have been borrowing a friends thinkpad.  Here is the new emacs setup at the end of day one. I&#8217;ve only included the things that have actually annoyed me during the day at work.  I had to install slime, magit, swank-clojure and js2-mode using elpa. ﻿﻿﻿﻿﻿﻿﻿(tool-bar-mode -1) (menu-bar-mode [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=l0st3d.wordpress.com&#038;blog=12124152&#038;post=90&#038;subd=l0st3d&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>After spilling tea on my laptop yesterday, I have been borrowing a friends thinkpad.  Here is the new emacs setup at the end of day one. I&#8217;ve only included the things that have actually annoyed me during the day at work.  I had to install slime, magit, swank-clojure and js2-mode using elpa.</p>
<pre>﻿﻿﻿﻿﻿﻿﻿(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(global-set-key (kbd "C-z") 'execute-extended-command)
(global-auto-revert-mode 1)
(ido-mode 1)
(global-set-key (kbd "C-x M-b") 'bury-buffer)
(global-set-key (kbd "C-n") 'next-logical-line)
(global-set-key (kbd "C-p") 'previous-logical-line)
(global-set-key (kbd "M-o") 'other-window)
(global-set-key (kbd "C-c C-g") 'rgrep)
(global-set-key (kbd "M-g") 'goto-line)
(global-set-key (kbd "M-(") 'insert-pair)
(global-set-key (kbd "M-[") 'insert-pair)
(global-set-key (kbd "C-M-{") 'insert-pair)
(global-set-key (kbd "M-\"") 'insert-pair)
(global-set-key (kbd "M-'") 'insert-pair)
(setq focus-follows-mouse t)
(setq mouse-autoselect-window t)
(add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt)
(display-time)
(fset 'yes-or-no-p 'y-or-n-p)
(mouse-avoidance-mode 'cat-and-mouse)
(put 'downcase-region 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'scroll-left 'disabled nil)
(put 'upcase-region 'disabled nil)
(winner-mode 1)
(global-unset-key "\C-x\C-c")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ediff-window-setup-function (quote ediff-setup-windows-plain))
'(uniquify-buffer-name-style (quote forward) nil (uniquify)))
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/l0st3d.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/l0st3d.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=l0st3d.wordpress.com&#038;blog=12124152&#038;post=90&#038;subd=l0st3d&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://l0st3d.wordpress.com/2010/09/29/minimal-emacs-config/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc23d1f40d9cfa1c5015ea972759cbf4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ed</media:title>
		</media:content>
	</item>
		<item>
		<title>My flymake + maven setup</title>
		<link>http://l0st3d.wordpress.com/2009/03/19/my-flymake-maven-setup/</link>
		<comments>http://l0st3d.wordpress.com/2009/03/19/my-flymake-maven-setup/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 22:43:39 +0000</pubDate>
		<dc:creator>l0st3d</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.setofallsets.com/blog/?p=14</guid>
		<description><![CDATA[In my day job, we use Maven2 to build our projects and I could not get used to netbeans or eclipse after years of perl and php in emacs (I&#8217;m sorry, but no matter how good the refactoring &#38; debugging tools, their text editors are difficult to use and constantly getting in the way, and [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=l0st3d.wordpress.com&#038;blog=12124152&#038;post=14&#038;subd=l0st3d&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In my day job, we use <a href="http://maven.apache.org/">Maven2</a> to build our projects and I could not get used to <a href="http://www.netbeans.org/">netbeans</a> or <a href="http://www.eclipse.org/">eclipse</a> after years of <a href="http://www.perl.org/">perl</a> and <a href="http://www.php.net/">php</a> in <a href="http://www.gnu.org/software/emacs/">emacs</a> (I&#8217;m sorry, but no matter how good the refactoring &amp; debugging tools, their text editors are difficult to use and constantly getting in the way, and I really did try).  So, I needed a way to run maven from <a href="http://flymake.sourceforge.net/">emacs + flymake</a>.  I&#8217;d seen a few people <a href="http://evadnoob.wordpress.com/2008/03/15/flymake-mode/">document</a> their setup, but this is how I got it working.  It&#8217;s a bit hacky, and non-emacsy, cos it was easier to get going in shell than lisp.  Clearly I am an emacs noob.</p>
<p>Since getting this up and running, a friend has pointed out <a href="http://bitbucket.org/espenhw/jde-mvn/wiki/Home">jde-mvn</a> which at some point I will try seriously and maybe even switch to &#8230; but until then &#8211; hey &#8230; I have my dodgy shell scripts.</p>
<p>So, the howto:</p>
<p>in your .emacs:</p>
<pre>
(require 'flymake-mvn)
(add-hook 'java-mode-hook 'flymake-java-mvn-mode-hook)</pre>
<p>in your library-path, create a file (something like ~/emacs.d/flymake-maven.el):</p>
<pre>
(defun flymake-java-mvn-init ()
  "Return external compile process to run"
  (if jde-global-classpath
	  (list "flymake-maven" (list buffer-file-name (mapconcat 'identity jde-global-classpath ":")))
	(list "flymake-maven" (list buffer-file-name))))

(defun flymake-java-mvn-load ()
  "Setup keys and flymake error patterns"
  (push '(".+\\.java$" flymake-java-mvn-init) flymake-allowed-file-name-masks)
  (push '("^\\([^: \n]+\\):\\[\\([0-9]+\\),\\([0-9]+\\)] \\(.+\n?[^/]*?\n?[^/]*?\\)" 1 2 3 4) flymake-err-line-patterns)
  (push '("^warning \\([^: \n]+\\):\\[\\([0-9]+\\),\\([0-9]+\\)] \\(.+\\)" 1 2 3 4) flymake-err-line-patterns)
  (flymake-mode t)
  (local-set-key (kbd "C-c e") 'flymake-display-err-menu-for-current-line)
  (local-set-key (kbd "C-c n") 'flymake-goto-next-error)
  (local-set-key (kbd "C-c p") 'flymake-goto-prev-error)
  (local-set-key (kbd "C-c s") 'flymake-start-syntax-check)
  (local-set-key (kbd "C-c S") 'flymake-stop-all-syntax-checks)
  (local-set-key (kbd "C-c C-t") 'ed/java-mvn-run-unit-test)
  (local-set-key (kbd "C-c d") 'ed/java-mvn-debug-unit-test)
  (local-set-key (kbd "C-c b") 'jde-bug-set-breakpoint)
  (local-set-key (kbd "C-c c") 'jde-bug-clear-breakpoint)
  (local-set-key (kbd "C-c C-i") 'ed/java-indent-properties)
  (local-set-key (kbd "C-c C-.") 'jde-complete)
  (local-set-key (kbd "C-c C-/") 'semantic-complete-analyze-and-replace)
  (local-set-key (kbd "C-c C-m") 'tempo-snippets-clear-all))

(defun flymake-java-mvn-mode-hook ()
  "Initialise the java environment"
  (java-mode-indent-annotations-setup)
  (c-subword-mode 1)
  (flymake-java-mvn-load)
  (flyspell-prog-mode)
  (setq indent-tabs-mode nil)
  (setq local-abbrev-table java-mode-abbrev-table)
  (abbrev-mode 1))

(provide flymake-mvn)
</pre>
<p>in your shell path (e.g. ~/bin/flymake-maven), create a file:</p>
<pre>#!/bin/bash

# find the pom for the specified file
if [ -f $1 ] ; then
	cd `echo $1 | sed 's/[^/]*$//'`
else
	if [ -d $1 ] ; then
		cd $1
	fi
fi
while [ ! -f "pom.xml" ] ; do
	cd ..
	if [ "x/" = "x"`pwd -P` ] ; then
		echo "No pom.xml found"
		exit
	fi
done

# compile the class
if [ "x" != "x$2" -a -d target/classes -o -d build/classes ] ; then
	file=`echo $1 | sed -e 's?/?\\\\/?g' -e 's/\./\\./g'`
	awk_script='BEGIN { line = "" } { if ( $0 ~ /^ *\^/ ) { print line ; line = "" } else if ( $0 ~ /^'$file'/ ) { print line ; line = $0 } else { line = line " ; " $0 } } ; '
	javac -Xlint -classpath target/classes:target/test-classes:build/classes:build/test-classes:$2 -d target/classes $1 2&gt;&amp;1 | awk "$awk_script" | sed 's/  */ /g'
else
	mvn -fn -o -Dmaven.compiler.showWarnings=true compile test-compile | grep -v '\[INFO\]' | perl -p -e 's/(.)\n/$1 ; /gs' | perl -p -e 's/ +/ /g' | perl -p -e 's/\[WARNING\]/warning/' | sort -u
fi

exit 0;
</pre>
<p>It takes an input of the file you&#8217;re editing, and works up the filesystem until it finds a &#8216;pom.xml&#8217;.  It decides to call mvn or javac based on the existence of a target/classes or build/classes directory since maven will create the correct directory, and if it all goes wrong I can mvn clean to get back to a known good state.  Then it takes the output from maven or javac, ignores all the info logging lines from maven, leaving (hopefully) lots of lovely compile errors in the file we were editing in one line per error, just as flymake expects.</p>
<p>For some reason, I haven&#8217;t reliably got maven to report warnings, but javac does that fine, so I just wait for the second compile, or hit C-c s to start flymake off to find out how many unchecked casts I have in todays code.</p>
<p>I Use C-c e to display the error message, C-c n to jump to the next error, and C-c p to get to the previous message.</p>
<p>I have keyboard shortcuts to run the unit tests, and at some point will make that commit to svn when they pass, perhaps with the trac ticket number I&#8217;m currently working on from org-mode as a comment &#8230; for another day, I feel <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The mvn-jde solution looks nicer, and as soon as I can prove that it works for all my day job projects, and I find the time to set it up, I&#8217;ll probably switch to that.  But I bet maven3 comes out first <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/l0st3d.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/l0st3d.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=l0st3d.wordpress.com&#038;blog=12124152&#038;post=14&#038;subd=l0st3d&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://l0st3d.wordpress.com/2009/03/19/my-flymake-maven-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc23d1f40d9cfa1c5015ea972759cbf4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ed</media:title>
		</media:content>
	</item>
		<item>
		<title>Emacs Shells</title>
		<link>http://l0st3d.wordpress.com/2008/12/01/emacs-shells/</link>
		<comments>http://l0st3d.wordpress.com/2008/12/01/emacs-shells/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 22:50:15 +0000</pubDate>
		<dc:creator>l0st3d</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://www.setofallsets.com/blog/?p=12</guid>
		<description><![CDATA[http://jfm3-repl.blogspot.com/2008/11/how-i-use-emacs-ansi-term.html Tomorrow&#8217;s emacs task &#8211; find out about using shells better in emacs<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=l0st3d.wordpress.com&#038;blog=12124152&#038;post=12&#038;subd=l0st3d&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://jfm3-repl.blogspot.com/2008/11/how-i-use-emacs-ansi-term.html" rel="nofollow">http://jfm3-repl.blogspot.com/2008/11/how-i-use-emacs-ansi-term.html</a></p>
<p>Tomorrow&#8217;s emacs task &#8211; find out about using shells better in emacs</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/l0st3d.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/l0st3d.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=l0st3d.wordpress.com&#038;blog=12124152&#038;post=12&#038;subd=l0st3d&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://l0st3d.wordpress.com/2008/12/01/emacs-shells/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc23d1f40d9cfa1c5015ea972759cbf4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ed</media:title>
		</media:content>
	</item>
	</channel>
</rss>
