<?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>Tyler Oderkirk&#039;s Blog &#187; Emacs</title>
	<atom:link href="http://unsyncopated.com/blog/index.php/category/emacs/feed/" rel="self" type="application/rss+xml" />
	<link>http://unsyncopated.com/blog</link>
	<description>&#34;Scared money don&#039;t[sic] make money&#34;</description>
	<lastBuildDate>Thu, 27 Jan 2011 05:02:58 +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>Setting file modes with Dired</title>
		<link>http://unsyncopated.com/blog/index.php/2007/12/14/setting-file-modes-with-dired/</link>
		<comments>http://unsyncopated.com/blog/index.php/2007/12/14/setting-file-modes-with-dired/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 17:33:59 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/?p=671</guid>
		<description><![CDATA[I&#8217;ve been writing a lot of shell scripts recently in emacs. I used to go to a shell to `chmod u+x` the new scripts, but now I do it within Emacs: Do `M-x dired` from the buffer editing a new script. I&#8217;ll give you a Dired buffer rooted in that script&#8217;s directory. `C-s` to find [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been writing a lot of shell scripts recently in emacs. I used to go to a shell to `chmod u+x` the new scripts, but now I do it within Emacs:</p>
<ol>
<li>Do `M-x dired` from the buffer editing a new script. I&#8217;ll give you a Dired buffer rooted in that script&#8217;s directory.</li>
<li>`C-s` to find the script&#8217;s entry and then press `M` to change its mode.</li>
<li>Dired speaks symbolic modes, so I just use `u+x` (give user the execute permission)</li>
</ol>
<span id="Blogged_to"><h3>Blogged to</h3></span>
<p>The sound of a <a href="http://www.5linx.com/">5linx</a> videophone demo downstairs. They sell for $200 and the monthly service is ~$30/mo. Dave is selling them, so let me know if you&#8217;re interested or would like to see one in action.</p>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2007/12/14/setting-file-modes-with-dired/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Editing files as root with Emacs and Tramp</title>
		<link>http://unsyncopated.com/blog/index.php/2007/09/09/editing-files-as-root-with-emacs-and-tramp/</link>
		<comments>http://unsyncopated.com/blog/index.php/2007/09/09/editing-files-as-root-with-emacs-and-tramp/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 00:50:42 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Shell programming]]></category>
		<category><![CDATA[Syntax highlighter]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/?p=723</guid>
		<description><![CDATA[Did you know that you can use an existing non-privileged instance of Emacs to open files as root? Yep, Emacs includes a module called TRAMP which can use sudo to read and write files. As is usually the case, I had to work sweat a little to make it work. My problem was that my [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that you can use an existing non-privileged instance of Emacs to open files as root? Yep, Emacs includes a module called <a href="http://www.emacswiki.org/cgi-bin/wiki/TrampMode">TRAMP</a> which can use sudo to read and write files.</p>
<p>As is usually the case, I had to work sweat a little to make it work. My problem was that my zsh prompt was too fancy. The solution was to toss this conditional in at the end of my .zshrc:</p>
<pre class="brush: bash;">

if [ $TERM = &quot;dumb&quot; ]; then
   unsetopt zle
   export PS1=&quot;%% &quot;
fi
</pre>
<p>This works by disabling the zsh line editor (&#8220;zle&#8221;) and setting a plain vanilla prompt (&#8220;PS1&#8243;) that tramp can recognize when it logs in.</p>
<p>TRAMP is a little slow on my machine but it sure beats firing up a new Emacs instance every time I want to edit `/etc/superdooper.conf`</p>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2007/09/09/editing-files-as-root-with-emacs-and-tramp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn on the bright lights &#8211; Emacs highlighting</title>
		<link>http://unsyncopated.com/blog/index.php/2007/05/02/turn-on-the-bright-lights-emacs-highlighting/</link>
		<comments>http://unsyncopated.com/blog/index.php/2007/05/02/turn-on-the-bright-lights-emacs-highlighting/#comments</comments>
		<pubDate>Wed, 02 May 2007 19:24:54 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/?p=771</guid>
		<description><![CDATA[Want to highlight every line in the current Emacs buffer that matches a regexp? Try `highlight-regex`. It serves a purpose similar to `M-x occur` (or better yet, icicle-occur). The highlighting regexs are re-evaluated every time the buffer changes ie the effect is sticky. Use `M-x unhighlight-regex` to disable these. Want to see what you&#8217;ve changed [...]]]></description>
			<content:encoded><![CDATA[<p>Want to highlight every line in the current Emacs buffer that matches a regexp? Try `highlight-regex`. It serves a purpose similar to `M-x occur` (or better yet, icicle-occur). The highlighting regexs are re-evaluated every time the buffer changes ie the effect is sticky. Use `M-x unhighlight-regex` to disable these.</p>
<p>Want to see what you&#8217;ve changed since a buffer&#8217;s file was opened? Use `highlight-changes-mode`. It supports &#8220;next/prev change&#8221; movement and coloring based on change &#8220;age&#8221;. `highlight-compare-with-file` sounds like a nice alternative to `ediff-buffer-with-file` and `ediff-backup`.</p>
<p><strong>Bonus:</strong> <a href="http://www.emacsblog.org/2007/04/17/quick-tip-light-symbol-mode/">light-symbol-mode</a> &#8211; Higlight all occurances of whatever symbol the cursor is on</p>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2007/05/02/turn-on-the-bright-lights-emacs-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>emacs-snapshot-gtk emacsclient and using ediff for regions</title>
		<link>http://unsyncopated.com/blog/index.php/2007/02/11/emacs-snapshot-gtk-emacsclient-and-using-ediff-for-regions/</link>
		<comments>http://unsyncopated.com/blog/index.php/2007/02/11/emacs-snapshot-gtk-emacsclient-and-using-ediff-for-regions/#comments</comments>
		<pubDate>Sun, 11 Feb 2007 20:09:23 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Shell programming]]></category>

		<guid isPermaLink="false">http://unsyncopated.com/blog/?p=696</guid>
		<description><![CDATA[If you&#8217;re using the emacs-snapshot-gtk package (I use the one from Alexandre&#8217;s repository) and you want to use emacsclient, make sure you use the version that it supplies at `/usr/bin/emacsclient.emacs-snapshot`. If you just run emacsclient, it might confusingly say &#8220;emacsclient: can&#8217;t stat /tmp/esrv1000-yourhost: Success&#8221; Recently at work I&#8217;ve been using ediff to compare little pieces [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using the emacs-snapshot-gtk package (I use the one from Alexandre&#8217;s repository) and you want to use emacsclient, make sure you use the version that it supplies at `/usr/bin/emacsclient.emacs-snapshot`. If you just run emacsclient, it might confusingly say &#8220;emacsclient: can&#8217;t stat /tmp/esrv1000-yourhost: Success&#8221;</p>
<p>Recently at work I&#8217;ve been using ediff to compare little pieces of output from one of our devices. Here&#8217;s how I go about it:</p>
<ol>
<li>Paste the first blob of text (&#8220;B1&#8243;) into a scratch buffer.</li>
<li>Hit Enter a few times to separate the blobs. Paste the second blob (&#8220;B2&#8243;).</li>
<li>Run (e.g. with M-x) ediff-regions-wordwise (or -linewise if you prefer)</li>
<li>Tell ediff that Region A and Region B are in the same scratch buffer.</li>
<li>Mark B1 as Region A and with `C-SPC` and `C-M-c`.</li>
<li>Mark B2 as Region B in the same way.</li>
</ol>
<p>If you find yourself in some distopian parallel universe where emacs doesn&#8217;t exist, you might be able to get away with the following shell one-liner. Your shell will need support command substitution with the `&lt;(foo)` syntax, like bash and zsh do.</p>
<blockquote>
<pre>$ diff -u &lt;(echo "asdf") &lt;(echo "zxcv")</pre>
</blockquote>
<p>Multiline gets a little hairy&#8230;</p>
<blockquote>
<pre>% diff -u &lt;(echo "one
cmdsubst&gt; two
cmdsubst&gt; three") &lt;(echo "one
cmdsubst&gt; honk
cmdsubst&gt; three")
--- /proc/self/fd/11 2007-02-11 12:38:28.680341500 -0500
+++ /proc/self/fd/16 2007-02-11 12:38:28.680341500 -0500</pre>
</blockquote>
<blockquote>
<pre>@@ -1,3 +1,3 @@
one
-two
+honk</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://unsyncopated.com/blog/index.php/2007/02/11/emacs-snapshot-gtk-emacsclient-and-using-ediff-for-regions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

