<?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/"
	>

<channel>
	<title>A Humble Programmer &#187; lisp</title>
	<atom:link href="http://hjiang.net/archives/tag/lisp/feed" rel="self" type="application/rss+xml" />
	<link>http://hjiang.net</link>
	<description>Notes on life, computing, and programming</description>
	<lastBuildDate>Wed, 21 Jul 2010 03:36:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Emacs smart split for programmers</title>
		<link>http://hjiang.net/archives/253</link>
		<comments>http://hjiang.net/archives/253#comments</comments>
		<pubDate>Fri, 13 Mar 2009 02:59:01 +0000</pubDate>
		<dc:creator>j</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://hjiang.net/?p=253</guid>
		<description><![CDATA[I spend most of my conscious hours in front of Emacs in a terminal window these days, and I share my configuration across all my computers. At work I have a huge monitor, so I split the emacs frame into 3 side-by-side 80-column windows. At home I have a smaller screen with room only enough [...]]]></description>
			<content:encoded><![CDATA[<p>I spend most of my conscious hours in front of Emacs in a terminal  window these days, and I share my configuration across all my computers. At work I have a huge monitor, so I split the emacs frame into 3 side-by-side 80-column windows. At home I have a smaller screen with room only enough for two windows. To share the same configuration file, I use the following snippet:</p>

<pre><code>(defun smart-split ()
  "Split the frame into 80-column sub-windows, and make sure no window has
   fewer than 80 columns."
  (interactive)
  (defun smart-split-helper (w)
    "Helper function to split a given window into two, the first of which has 
     80 columns."
    (if (&gt; (window-width w) (* 2 81))
    (let ((w2 (split-window w 82 t)))
      (smart-split-helper w2))))
  (smart-split-helper nil))

(smart-split)
</code></pre>

<p>The <code>smart-split</code> function split the emacs frame into a maximum number of 80-column windows. A very portable solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://hjiang.net/archives/253/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
