<?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>Juggling Bits &#187; emacs</title>
	<atom:link href="http://jugglingbits.wordpress.com/tag/emacs/feed/" rel="self" type="application/rss+xml" />
	<link>http://jugglingbits.wordpress.com</link>
	<description>thomas11's technical blog</description>
	<lastBuildDate>Sat, 01 Jun 2013 06:33:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jugglingbits.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Juggling Bits &#187; emacs</title>
		<link>http://jugglingbits.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jugglingbits.wordpress.com/osd.xml" title="Juggling Bits" />
	<atom:link rel='hub' href='http://jugglingbits.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Simple Frame Initialization</title>
		<link>http://jugglingbits.wordpress.com/2010/09/11/simple-frame-initialization/</link>
		<comments>http://jugglingbits.wordpress.com/2010/09/11/simple-frame-initialization/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 15:30:50 +0000</pubDate>
		<dc:creator>thomas11</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[elisp]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://jugglingbits.wordpress.com/2010/09/11/simple-frame-initialization/</guid>
		<description><![CDATA[Is anyone else confused by the variety and complexity of packages for Emacs session management out there? I read through some of the documentation recently, but in the end I was overwhelmed and didn&#8217;t install anything. Session management is about open files, buffer positions and the like on the one hand, and about the frame [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=358&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Is anyone else confused by the variety and complexity of <a href="http://www.emacswiki.org/emacs/SessionManagement">packages for Emacs session management</a> out there? I read through some of the documentation recently, but in the end I was overwhelmed and didn&#8217;t install anything.</p>
<p>Session management is about open files, buffer positions and the like on the one hand, and about the frame configuration on the other hand. I realized that my actual use case for frame session management was so simple that I could trivially implement it myself.</p>
<p>All I really wanted was that my Emacs would launch in fullscreen, and split it into two or three vertical windows, depending on whether I was using the laptop screen or the larger external screen. If I could accept the two-split as default, and run a function to create the three-window setup when needed, then all I&#8217;d need were some small initialization functions.</p>
<p>Like almost everything else, Emacs exposes its window and frame handling in an ELisp API. So here we go:</p>
<pre><code>
(defun my-big-screen ()
  "Set up frame for external screen, with three windows."
  (interactive)
  (my-initialize-frame 3))

(defun my-small-screen ()
  "Set up frame for laptop screen, with two windows."
  (interactive)
  (my-initialize-frame 2))

(defun my-initialize-frame (columns)
  "Set current frame to fullscreen and split it into COLUMNS
vertical windows."
  (set-frame-parameter nil :fullscreen t)
  (delete-other-windows)
  (dotimes (not-used (1- columns))
    (split-window-horizontally))
  (balance-windows))
</code></pre>
<p>This is not rocket science and I hope it didn&#8217;t bore the Planet Emacsen readers, but maybe it encourages people to get creative with their Emacs&#8217; frames and windows. Start with the Emacs Lisp manual, chapters 28 (Windows) and 29 (Frames).</p>
<br />Filed under: <a href='http://jugglingbits.wordpress.com/category/stuff/'>Stuff</a> Tagged: <a href='http://jugglingbits.wordpress.com/tag/elisp/'>elisp</a>, <a href='http://jugglingbits.wordpress.com/tag/emacs/'>emacs</a>, <a href='http://jugglingbits.wordpress.com/tag/programming/'>programming</a>, <a href='http://jugglingbits.wordpress.com/tag/stuff/'>Stuff</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jugglingbits.wordpress.com/358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jugglingbits.wordpress.com/358/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=358&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jugglingbits.wordpress.com/2010/09/11/simple-frame-initialization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/2a4078b8bf5d17530101db7ab2de6bfa?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">thomas11</media:title>
		</media:content>
	</item>
		<item>
		<title>Announcing delim-kill.el</title>
		<link>http://jugglingbits.wordpress.com/2010/05/16/announcing-delim-kill-el/</link>
		<comments>http://jugglingbits.wordpress.com/2010/05/16/announcing-delim-kill-el/#comments</comments>
		<pubDate>Sun, 16 May 2010 19:02:27 +0000</pubDate>
		<dc:creator>thomas11</dc:creator>
				<category><![CDATA[Own Code]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[elisp]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://jugglingbits.wordpress.com/2010/05/16/announcing-delim-kill-el/</guid>
		<description><![CDATA[A few weeks ago, I had the chance to attend a few courses on Perl and one on giving technical presentations, held by Perl guru and uber-geek Damien Conway. They were fantastic&#8212;just like the ones last year&#8212;so I should really write a post of its own about them. Strongly recommended. But for now, this is [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=334&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A few weeks ago, I had the chance to attend a few courses on Perl and one on giving technical presentations, held by Perl guru and uber-geek <a href="http://en.wikipedia.org/wiki/Damian_Conway">Damien Conway</a>. They were fantastic&#8212;just like the ones last year&#8212;so I should really write a post of its own about them. Strongly recommended.</p>
<p>But for now, this is about one particular thing he said about editing: you need to have a shortcut in your editor that cuts or copies the text between two given characters around cursor, or point in Emacs lingo. This lets you do many frequent editing tasks easily. Say you&#8217;re going through a source file and want to move <code>{}</code>-delimited blocks around, or copy the field you&#8217;re on in a CSV file, or the current section in a Markdown file (from <code>#</code> to the next <code>#</code>, roughly).</p>
<p>Damian showed this off in Vim. I knew right away that I wanted it in Emacs. There are of course specialized functions for doing things with certain groups of delimiters, such as the ubiquitous sexp-based functions in Emacs, <a href="http://www.emacswiki.org/emacs/NavigatingParentheses">described</a> <a href="http://www.emacswiki.org/emacs/ParenthesisMatching">extensively</a> on the EmacsWiki. But these rely on pre-configured groups of delimiters, and to kill the text, you have to do one extra operation. I liked the idea of having a single function, and thus key binding, to do all of it. And most importantly, it seemed an interesting challenge for my still-developing Emacs and Lisp skills, so I didn&#8217;t even do a lot of research before I dug right in and wrote <a href="http://github.com/thomas11/delim-kill">delim-kill.el</a>.</p>
<blockquote><p> delim-kill.el contains a single convenience function for editing structured data: delim-kill. Given two characters FROM and TO, delim-kill kills the text between the first occurrence of FROM before point and the first occurrence of TO after point. FROM and TO may be identical.</p>
<p>If FROM and TO are not identical, the function preserves the balance between the two characters: For each FROM that is encountered while looking for TO, one additional TO is required; and vice versa. For example, in &#8220;{ foo X{bar} baz }&#8221;, with X being point and &#8220;{&#8221; and &#8220;}&#8221; as delimiters, the text &#8220;{ foo {bar} baz }&#8221; will be killed, not &#8220;{ foo {bar}&#8221;.
</p></blockquote>
<p>I had fun writing this. It turned out to be a bit harder than I expected, mainly due to all the corner cases like point being on one of the delimiters&#8212;like most programming, really. I wrote plenty of unit tests to be sure to handle these cases. It&#8217;s very little code now, but when I first had a working version, it was twice as big. Once I had it working, I could see lots of symmetry between the different cases that I could extract into shared code.</p>
<p>Also, I finally learned the condition-case error handling of Emacs. And being able to pass functions as arguments is just great, coming from my mostly-Java day job.</p>
<p>Try it out if it sounds useful to you, and let me know what you think.</p>
<p><em>Slightly edited 2010-05-16.</em></p>
<br />Filed under: <a href='http://jugglingbits.wordpress.com/category/own-code/'>Own Code</a> Tagged: <a href='http://jugglingbits.wordpress.com/tag/editing/'>editing</a>, <a href='http://jugglingbits.wordpress.com/tag/elisp/'>elisp</a>, <a href='http://jugglingbits.wordpress.com/tag/emacs/'>emacs</a>, <a href='http://jugglingbits.wordpress.com/tag/own-code/'>Own Code</a>, <a href='http://jugglingbits.wordpress.com/tag/programming/'>programming</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jugglingbits.wordpress.com/334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jugglingbits.wordpress.com/334/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=334&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jugglingbits.wordpress.com/2010/05/16/announcing-delim-kill-el/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/2a4078b8bf5d17530101db7ab2de6bfa?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">thomas11</media:title>
		</media:content>
	</item>
		<item>
		<title>Andy Wingo: recent developments in Guile</title>
		<link>http://jugglingbits.wordpress.com/2010/04/19/andy-wingo-recent-developments-in-guile/</link>
		<comments>http://jugglingbits.wordpress.com/2010/04/19/andy-wingo-recent-developments-in-guile/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 08:36:11 +0000</pubDate>
		<dc:creator>thomas11</dc:creator>
				<category><![CDATA[Elsewhere]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[guile]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scheme]]></category>
		<category><![CDATA[talk]]></category>

		<guid isPermaLink="false">http://jugglingbits.wordpress.com/2010/04/19/andy-wingo-recent-developments-in-guile/</guid>
		<description><![CDATA[I watched a talk by Andy Wingo recently: recent developments in Guile. GNU Guile is a Scheme implementation, and a library providing an extension language for applications. Guile is actively developed, and promises some exciting stuff in upcoming releases, which is why I took these notes and publish them here&#8211;read on. Andy starts by noting [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=332&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I watched a talk by Andy Wingo recently: <a href="http://wingolog.org/archives/2010/04/02/recent-developments-in-guile">recent developments in Guile</a>. <a href="http://www.gnu.org/software/guile/">GNU Guile</a> is a Scheme implementation, and a library providing an extension language for applications. Guile is actively developed, and promises some exciting stuff in upcoming releases, which is why I took these notes and publish them here&#8211;read on.</p>
<p>Andy starts by noting that Guile is different things to different people:</p>
<ul>
<li>A GNU language, with bindings for many components of the GNU system and under LGPL 3.</li>
<li>A Scheme implementation, supporting R5RS and part of R6RS, plus other goodies: modules (not the R6RS ones), hygienic macros, the CLOS-like object system Goops with transparent integration with GLib&#8217;s gobject, Posix interface, and Unicode support.</li>
<li>An extension language for applications, like the Gimp.</li>
<li>A part of the GNU system (that we are making, even if we don&#8217;t know yet how it will look like).</li>
</ul>
<p>Andy sees Guile&#8217;s perception among developers as its main challenge currently. It&#8217;s seen as being slow, although it&#8217;s generally faster than Python. But there are also opportunities for its perception: its multilingual vision and support&#8211;its next release will support ECMAScript besides Scheme, and Emacs Lisp is coming&#8211;, and the GNU brand.</p>
<h3>Some technical notes</h3>
<p>It uses the Boehm-Weiser garbage collector now, which is fast and reliable.</p>
<p>There are ten committers and monthly releases. This is after the project emerged from a long drought in 2000-2007.</p>
<p>Guile has a VM, and a native compiler is coming. Also: JavaScript support, ELisp coming!</p>
<p>It has really good Emacs integration now with <a href="http://gitorious.org/geiser">Geiser</a>.</p>
<p>There was also a small remark about licensing. Readline and Guile are not quite license-compatible, which makes using the REPL a pain. This sparked a longish discussion&#8211;kinda what you expect from a GNU developers meeting :-)</p>
<h3>Spreading the Emacs nature</h3>
<p>And now, the meat of the talk: spreading the Emacs nature, to emacsify the GNU system. Yes, that sounds like it!</p>
<p>The upcoming Guile 2.0 (or maybe 2.1?) will have full ELisp support, at the moment about equally fast than Emacs&#8217; own, but it will be much faster. It will also have native compilation for even more performance.</p>
<p>Besides performance, it will have much more to offer:</p>
<ul>
<li>native threads,</li>
<li>a clear FFI,</li>
<li>modules,</li>
<li>other languages, as described above,</li>
<li>the Goops object system,</li>
<li>lots of library bindings &#8211; Emacs-Gnome integration would easily be possible, for instance.</li>
</ul>
<p>Andy&#8217;s plan is to replace Emacs&#8217; Lisp engine with Guile. The rest stays unchanged, existing ELisp code will run as-is. Then no form of coercion should be necessary to get people to start writing their Emacs code in Guile languages. The timeframe is 18-30 months from now&#8211;looks like a developer release is not too far off!</p>
<br />Filed under: <a href='http://jugglingbits.wordpress.com/category/elsewhere/'>Elsewhere</a> Tagged: <a href='http://jugglingbits.wordpress.com/tag/elsewhere/'>Elsewhere</a>, <a href='http://jugglingbits.wordpress.com/tag/emacs/'>emacs</a>, <a href='http://jugglingbits.wordpress.com/tag/guile/'>guile</a>, <a href='http://jugglingbits.wordpress.com/tag/javascript/'>javascript</a>, <a href='http://jugglingbits.wordpress.com/tag/programming/'>programming</a>, <a href='http://jugglingbits.wordpress.com/tag/scheme/'>scheme</a>, <a href='http://jugglingbits.wordpress.com/tag/talk/'>talk</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jugglingbits.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jugglingbits.wordpress.com/332/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=332&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jugglingbits.wordpress.com/2010/04/19/andy-wingo-recent-developments-in-guile/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/2a4078b8bf5d17530101db7ab2de6bfa?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">thomas11</media:title>
		</media:content>
	</item>
		<item>
		<title>Weekly Links #2</title>
		<link>http://jugglingbits.wordpress.com/2010/04/01/weekly-links-2/</link>
		<comments>http://jugglingbits.wordpress.com/2010/04/01/weekly-links-2/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 20:53:26 +0000</pubDate>
		<dc:creator>thomas11</dc:creator>
				<category><![CDATA[Elsewhere]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Weekly Links]]></category>

		<guid isPermaLink="false">http://jugglingbits.wordpress.com/?p=316</guid>
		<description><![CDATA[Conrad Barski and James Webb: Casting SPELs in Emacs Lisp Conrad Barski&#8217;s awesome Lisp tutorial Casting SPELs is now also available in an Emacs Lisp version, edited by James Webb. Even if Emacs Lisp is certainly not the greatest Lisp dialect, it shouldn&#8217;t matter much for a beginner&#8217;s tutorial and it sure is nice to [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=316&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h3>Conrad Barski and James Webb: <a href="http://www.lisperati.com/casting-spels-emacs/html/casting-spels-emacs-1.html">Casting SPELs in Emacs Lisp</a></h3>
<p><a href="http://www.lisperati.com/casting-spels-emacs/html/casting-spels-emacs-1.html"><img class="alignright" title="Emacs on toaster" src="http://www.lisperati.com/casting-spels-emacs/images/emacs-on-toaster.jpg" alt="" width="168" height="200" /></a>Conrad Barski&#8217;s awesome Lisp tutorial Casting SPELs is now also available in an Emacs Lisp version, edited by James Webb. Even if Emacs Lisp is certainly not the greatest Lisp dialect, it shouldn&#8217;t matter much for a beginner&#8217;s tutorial and it sure is nice to be able to evaluate everything right in your editor.</p>
<div style="clear:both;"></div>
<h3>ars technica: <a href="http://arstechnica.com/staff/nate/2010/04/tentacular-tentacular.ars">Tentacular, tentacular!</a></h3>
<blockquote><p>Cthulhu plucked a manila folder from somewhere within the non-Euclidean geometry of his manbag and dropped it on my desk with a thud.</p></blockquote>
<p>A geeky, hilarious choose-your-own-adventure story written by Cthulhu. What else could you want for your Easter weekend.</p>
<br />Filed under: <a href='http://jugglingbits.wordpress.com/category/elsewhere/'>Elsewhere</a> Tagged: <a href='http://jugglingbits.wordpress.com/tag/elsewhere/'>Elsewhere</a>, <a href='http://jugglingbits.wordpress.com/tag/emacs/'>emacs</a>, <a href='http://jugglingbits.wordpress.com/tag/links/'>links</a>, <a href='http://jugglingbits.wordpress.com/tag/lisp/'>lisp</a>, <a href='http://jugglingbits.wordpress.com/tag/programming/'>programming</a>, <a href='http://jugglingbits.wordpress.com/tag/weekly-links/'>Weekly Links</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jugglingbits.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jugglingbits.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=316&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jugglingbits.wordpress.com/2010/04/01/weekly-links-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/2a4078b8bf5d17530101db7ab2de6bfa?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">thomas11</media:title>
		</media:content>

		<media:content url="http://www.lisperati.com/casting-spels-emacs/images/emacs-on-toaster.jpg" medium="image">
			<media:title type="html">Emacs on toaster</media:title>
		</media:content>
	</item>
		<item>
		<title>A simple Markdown journal in Emacs</title>
		<link>http://jugglingbits.wordpress.com/2010/01/23/a-simple-markdown-journal-in-emacs/</link>
		<comments>http://jugglingbits.wordpress.com/2010/01/23/a-simple-markdown-journal-in-emacs/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 11:56:09 +0000</pubDate>
		<dc:creator>thomas11</dc:creator>
				<category><![CDATA[Own Code]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[journal]]></category>
		<category><![CDATA[markdown]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://jugglingbits.wordpress.com/?p=279</guid>
		<description><![CDATA[I wanted to get into daily journaling since a long time. Keeping a journal makes it easy to find and go back to all kinds of things you have encountered and thus saves time. But more important is, I believe, that journaling structures your thoughts, like any kind of writing. You need to think clearly [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=279&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I wanted to get into daily journaling since a long time. Keeping a journal makes it easy to find and go back to all kinds of things you have encountered and thus saves time. But more important is, I believe, that journaling structures your thoughts, like any kind of writing. You need to think clearly about something before you can write it down. Then, the act of writing it down anchors it more deeply in your memory.</p>
<p>Alas, all my previous attempts at journaling failed. Whatever the reason, whether on paper or on the computer, I never felt entirely at home with the solutions I tried. So what&#8217;s a hacker to do &#8211; write his own solution.</p>
<p>I know that there are already many ways to write a journal in Emacs. Well, here&#8217;s another one: <a href="http://github.com/thomas11/simple-journal">simple-journal</a>. It&#8217;s tiny and simple, it produces a <a href="http://daringfireball.net/projects/markdown">Markdown</a> format that I love, and having it written myself I feel more inclined to actually use it.</p>
<p>The journal looks like this:</p>
<pre><code>### 2010-01-10

- **18:15** - "XML serializations should be hidden away from
  human view lest small children accidentally see them and become
  frightened." - from the paper *Representing disjunction and
  quantifiers in RDF*, McDermottDou02.pdf.

### 2010-01-17

- **14:45** - Set up a minimal Wicket application with Netbeans (a
  first for me, version 6.8) and Jetty. I want to try out working
  asynchronously with JSON using Wicket. Here are the steps to get the
  application running, serving up an empty page:

  - Start a plain Java SE project in Netbeans.
  - ... </code></pre>
<p>Being in Markdown, it&#8217;s very readable, and can readily be converted to well-formatted HTML. The format is completely hard-coded in the code for the moment. The goal was just to quickly get something simple and small working. Nevertheless, I&#8217;m always happy about feedback and ideas.</p>
<p>There&#8217;s one item on the TODO list that I&#8217;d really like to have, but I&#8217;m wondering about how to implement it a somewhat simple and efficient way: showing all entries that have &#8220;TODO&#8221; in them, or that start with &#8220;TODO&#8221;. Do I have to go through the buffer to collect them and show them in a temporary buffer? That would be a bit more programming than I feel is appropriate for such a task, and the temp buffer wouldn&#8217;t be in sync with the journal. Planet Emacs, ideas? ;-)</p>
<br />Posted in Own Code Tagged: emacs, journal, markdown, Own Code, programming <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jugglingbits.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jugglingbits.wordpress.com/279/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=279&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jugglingbits.wordpress.com/2010/01/23/a-simple-markdown-journal-in-emacs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/2a4078b8bf5d17530101db7ab2de6bfa?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">thomas11</media:title>
		</media:content>
	</item>
		<item>
		<title>SICP in Emacs</title>
		<link>http://jugglingbits.wordpress.com/2009/12/04/sicp-in-emacs/</link>
		<comments>http://jugglingbits.wordpress.com/2009/12/04/sicp-in-emacs/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 06:44:25 +0000</pubDate>
		<dc:creator>thomas11</dc:creator>
				<category><![CDATA[Elsewhere]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scheme]]></category>
		<category><![CDATA[sicp]]></category>
		<category><![CDATA[texinfo]]></category>

		<guid isPermaLink="false">http://jugglingbits.wordpress.com/?p=264</guid>
		<description><![CDATA[Most people reading this will know that Structure and Interpretation of Computer Programs (SICP) by Abelson and Sussman is one of the most well known and recommended books when it comes to core Computer Science, algorithms, and functional programming. Suffice it to say, if you want to explore these areas and enhance your programming on [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=264&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Most people reading this will know that <em>Structure and Interpretation of Computer Programs (SICP)</em> by Abelson and Sussman is one of the most well known and recommended books when it comes to core Computer Science, algorithms, and functional programming. Suffice it to say, if you want to explore these areas and enhance your programming on a level beyond knowing the latest framework, check out this book. It&#8217;s <a href="http://mitpress.mit.edu/sicp/">freely available online</a>, as well as recordings of <a href="http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/">lectures</a> the authors gave.</p>
<p>Now, in case that&#8217;s not nerdy enough for you, I found <a href="http://www.neilvandyke.org/sicp-texi/">a version in texinfo</a> yesterday. Complete with all graphics converted to ASCII art. Yes, kinda scary, but it rocks: have your Emacs display an info buffer with the book and a Scheme or CL REPL to play with the book&#8217;s code and work on the exercises. Just move around the book and evaluate the code snippets there. Neat!</p>
<p>I guess that means I have to resume my project of working through the exercises. I&#8217;m not even sure where my first couple solutions are&#8230;</p>
<br />Posted in Elsewhere Tagged: Elsewhere, emacs, lisp, programming, scheme, sicp, texinfo <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jugglingbits.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jugglingbits.wordpress.com/264/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=264&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jugglingbits.wordpress.com/2009/12/04/sicp-in-emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/2a4078b8bf5d17530101db7ab2de6bfa?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">thomas11</media:title>
		</media:content>
	</item>
		<item>
		<title>Announcing wpmail.el</title>
		<link>http://jugglingbits.wordpress.com/2009/11/24/announcing-wpmail-el/</link>
		<comments>http://jugglingbits.wordpress.com/2009/11/24/announcing-wpmail-el/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 19:36:31 +0000</pubDate>
		<dc:creator>thomas11</dc:creator>
				<category><![CDATA[Own Code]]></category>
		<category><![CDATA[elisp]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wpmail]]></category>

		<guid isPermaLink="false">http://jugglingbits.wordpress.com/2009/11/24/announcing-wpmail-el/</guid>
		<description><![CDATA[Hi Planet Emacsen, and thanks Edward! It was only in June this year that I started to write Emacs Lisp. The first extension I wrote is wpmail.el, which I published on github but didn&#8217;t announce as I wasn&#8217;t quite happy with it. Since then, I hacked some more on it and it&#8217;s in a better [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=259&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Hi Planet Emacsen, and thanks Edward!</p>
<p>It was only in June this year that I started to write Emacs Lisp. The first extension I wrote is <a href="http://github.com/thomas11/wpmail">wpmail.el</a>, which I published on github but didn&#8217;t announce as I wasn&#8217;t quite happy with it. Since then, I hacked some more on it and it&#8217;s in a better shape now, so here&#8217;s the obligatory blog post.</p>
<p>From the file header:</p>
<blockquote><p> An Emacs extension to make posting by e-mail to the wordpress.com blog hosting service <a href="http://www.wordpress.com"><br />
http://www.wordpress.com<br />
</a> easier. It might work with other wordpress installations, which I have not tried. For more information about posting to wordpress by e-mail see the support page <a href="http://support.wordpress.com/post-by-email/"><br />
http://support.wordpress.com/post-by-email/<br />
</a>.</p>
<p>Documentation is a bit lacking, but here&#8217;s the gist: start a new post, possibly from the region or the buffer, with wpmail-new-post or wpmail-new-post-here. Send it with wpmail-send-post when you are done. wpmail will prompt for title and category; it will propose some titles that you can see via M-n, and it auto-completes the categories in wpmail-categories. See the documentation of these functions for details.</p>
<p>You can write your posts in Markdown format <a href="http://daringfireball.net/projects/markdown/"><br />
http://daringfireball.net/projects/markdown/<br />
</a> if you have markdown-mode <a href="http://jblevins.org/projects/markdown-mode/"><br />
http://jblevins.org/projects/markdown-mode/<br />
</a> installed. Set wpmail-markdown-command to your Markdown converter and posts will be converted to HTML when sending them.</p>
</blockquote>
<p>I have the feeling that the documentation could be clearer. This is probably due to the fact that while I was writing wpmail.el, my ideas about the best way of using it changed.</p>
<p>Initially, I made it so that the very start of a blog post would be calling <code>wpmail-new-post</code>. It would visit a new file in <code>wpmail-posts-dir</code> and you&#8217;d start writing. This requires wpmail to be in charge. Then I realized that it could be less intrusive and added <code>wpmail-new-post-here</code>. It simply turns your current buffer into a blog post by adding a title and the wordpress shortcode directives like &#8220;status draft&#8221;. Otherwise, it&#8217;s up to you what to do with the buffer.</p>
<p>It works pretty well for me now, so I&#8217;m not gonna change it around again for myself anytime soon. I&#8217;d be happy about suggestions, though!</p>
<p>In the latest version, I also managed to get around two wordpress bugs. One was that <code>&lt;pre&gt;&lt;code&gt;</code>, Markdown&#8217;s default markup for verbatim blocks, was being garbled. WordPress.com&#8217;s support was very helpful and the problem is now fixed. The other is that I remove single line breaks before sending, because while wordpress mostly ignores them (as you should in HTML), it seems to turn some into <code>&lt;br/&gt;</code>.</p>
<p>I hope it&#8217;s useful for someone. Let me know if that&#8217;s the case!</p>
<br />Posted in Own Code Tagged: elisp, emacs, Own Code, programming, wordpress, wpmail <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jugglingbits.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jugglingbits.wordpress.com/259/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=259&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jugglingbits.wordpress.com/2009/11/24/announcing-wpmail-el/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/2a4078b8bf5d17530101db7ab2de6bfa?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">thomas11</media:title>
		</media:content>
	</item>
		<item>
		<title>Announcing md-readme</title>
		<link>http://jugglingbits.wordpress.com/2009/11/14/announcing-md-readme/</link>
		<comments>http://jugglingbits.wordpress.com/2009/11/14/announcing-md-readme/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 16:56:22 +0000</pubDate>
		<dc:creator>thomas11</dc:creator>
				<category><![CDATA[Own Code]]></category>
		<category><![CDATA[elisp]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[markdown]]></category>
		<category><![CDATA[readme]]></category>

		<guid isPermaLink="false">http://jugglingbits.wordpress.com/?p=248</guid>
		<description><![CDATA[You can find quite a few Emacs libraries on github these days. I only have one very small project there, wpmail, which I haven&#8217;t written about yet because I want to finish the Markdown support first&#8230; anyway: something I find really neat on github is the automatic display of the README file in the repository&#8217;s [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=248&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>You can find quite a few <a href="http://github.com/languages/Emacs%20Lisp">Emacs libraries on github</a> these days. I only have one very small project there, wpmail, which I haven&#8217;t written about yet because I want to finish the Markdown support first&#8230; anyway: something I find really neat on github is the <a href="http://github.com/guides/readme-formatting">automatic display of the README file</a> in the repository&#8217;s root directory, if it exists. Only, as we all know, writing READMEs is tedious and we&#8217;d rather spend our time programming. But wait: in the Emacs world, we&#8217;re actually writing a README for each project: the <a href="http://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Headers.html#Library-Headers">library headers</a>. Their content and structure are rather clearly defined, and it&#8217;s expected for all Emacs libraries. So I had the idea of generating a nice, Markdown-formatted README.md for github from these headers.</p>
<p>I just pushed the first version of <a href="http://github.com/thomas11/md-readme">md-readme</a> that does just that. The README that you see on the github page is auto-generated from md-readme.el, with lists, code-block and everything.</p>
<p>The conversion to Markdown is of course pretty simple, but even so it&#8217;s pretty cool to see how little code I had to write. Emacs provides everything out of the box. <code>(with-temp-file "README.md" (do-it))</code> is just elegant.</p>
<p>Now, seeing that we have code that generates a nice README from our Lisp file, it&#8217;s natural to have it run automatically so we always have an up-to-date README. Here I was struggling for a while. I had lots of ideas, but none seemed to work out. My current solution is setting a per-directory local variable for each of your ELisp projects that triggers the conversion via an after-save-hook. Code is in the README. The problem with adding the after-save-hook to all modes is that it&#8217;s evaluated all the time, for each save. Kinda annoying, even if it&#8217;s just a single condition.</p>
<p>Does anyone have a better idea? Do it outside Emacs in a git pre-commit hook?</p>
<p>But even with the current solution it works, and that&#8217;s the important part. Please try it, and enjoy your new READMEs.</p>
<br />Posted in Own Code Tagged: elisp, emacs, github, markdown, Own Code, readme <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jugglingbits.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jugglingbits.wordpress.com/248/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=248&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jugglingbits.wordpress.com/2009/11/14/announcing-md-readme/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/2a4078b8bf5d17530101db7ab2de6bfa?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">thomas11</media:title>
		</media:content>
	</item>
		<item>
		<title>Now focus!</title>
		<link>http://jugglingbits.wordpress.com/2009/11/06/now-focus/</link>
		<comments>http://jugglingbits.wordpress.com/2009/11/06/now-focus/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 21:45:06 +0000</pubDate>
		<dc:creator>thomas11</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[elisp]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://jugglingbits.wordpress.com/?p=238</guid>
		<description><![CDATA[I&#8217;m having fun with this bit of Emacs Lisp that turns your current buffer in a fullscreen, minimal, no-frills frame a la Writeroom. I got it from the EmacsWiki and made a few small modifications. Now, whenever you feel distracted, tell your Emacs (and thus yourself, as Emacs is a direct extension of your brain): [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=238&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m having fun with this bit of Emacs Lisp that turns your current buffer in a fullscreen, minimal, no-frills frame a la <a href="http://www.hogbaysoftware.com/products/writeroom">Writeroom</a>. I got it from the <a href="http://www.emacswiki.org/emacs/WriteRoom">EmacsWiki</a> and made a few small modifications.</p>
<p>Now, whenever you feel distracted, tell your Emacs (and thus yourself, as Emacs is a direct extension of your brain): <code>now-focus!</code>.</p>
<pre><code>
(defun now-focus! ()
  "Open the current buffer in a frame without any bling."
  (interactive)
  ;; to restore:
  ;; (setq mode-line-format (default-value 'mode-line-format))
  (let ((frame (nowfocus-make-minimal-frame)))
    (select-frame frame)
    (setq mode-line-format nil)
    ;; for Windows, untested
    (when (fboundp 'w32-send-sys-command)
      (w32-send-sys-command 61488 frame))))

(defun nowfocus-make-minimal-frame ()
  (make-frame '((minibuffer . nil)
		(vertical-scroll-bars . nil)
		(left-fringe . 0)
		(right-fringe . 0)
		(border-width . 0)
		(internal-border-width . 64) ; whitespace!
		(cursor-type . box)
		(menu-bar-lines . 0)
		(tool-bar-lines . 0)
		(fullscreen . fullboth)
		(unsplittable . t))))
</code></pre>
<p>If you&#8217;d like some more options, turn to <a href="http://bitbucket.org/phromo/darkroom-mode/overview/">darkroom-mode</a>.</p>
<br />Posted in Stuff Tagged: elisp, emacs, programming, Stuff <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jugglingbits.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jugglingbits.wordpress.com/238/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jugglingbits.wordpress.com&#038;blog=6812373&#038;post=238&#038;subd=jugglingbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jugglingbits.wordpress.com/2009/11/06/now-focus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/2a4078b8bf5d17530101db7ab2de6bfa?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">thomas11</media:title>
		</media:content>
	</item>
	</channel>
</rss>
