<?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>/usr</title>
	<atom:link href="https://slashusr.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://slashusr.wordpress.com</link>
	<description>Tech Rants, Tips, Emacs &#38; the Kitchen Sink</description>
	<lastBuildDate>Thu, 10 Aug 2023 00:47:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='slashusr.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://secure.gravatar.com/blavatar/247c088f5ec63ebdfa3be35a144bcab9e32bc16d63ba49bf93beca00f6433c42?s=96&#038;d=https%3A%2F%2Fs0.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>/usr</title>
		<link>https://slashusr.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://slashusr.wordpress.com/osd.xml" title="/usr" />
	<atom:link rel='hub' href='https://slashusr.wordpress.com/?pushpress=hub'/>
	<item>
		<title>Thank You, Bram Moolenaar.</title>
		<link>https://slashusr.wordpress.com/2023/08/09/thank-you-bram-moolenaar/</link>
					<comments>https://slashusr.wordpress.com/2023/08/09/thank-you-bram-moolenaar/#respond</comments>
		
		<dc:creator><![CDATA[evolve75]]></dc:creator>
		<pubDate>Thu, 10 Aug 2023 00:46:11 +0000</pubDate>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Vim]]></category>
		<guid isPermaLink="false">http://slashusr.wordpress.com/?p=386</guid>

					<description><![CDATA[Bram Moolenaar is no longer with us. The creator of Vim passed away last week at a relatively early age, leaving behind a rich legacy of the immensely popular modal text editor. He will be missed by millions of users and fans, who use it daily, and whose first interaction with any *nix system (at &#8230; <a href="https://slashusr.wordpress.com/2023/08/09/thank-you-bram-moolenaar/" class="more-link">Continue reading <span class="screen-reader-text">Thank You, Bram&#160;Moolenaar.</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Bram Moolenaar is no longer with us. The creator of <a href="https://www.vim.org/">Vim</a> passed away last week at a relatively early age, leaving behind a rich legacy of the immensely popular modal text editor. He will be missed by millions of users and fans, who use it daily, and whose first interaction with any *nix system (at least on Linux and macOS) would have involved <code>vim</code>.</p>
<p>I had <a href="https://slashusr.wordpress.com/2011/09/15/heretical-confessions-of-an-emacs-addict-joy-of-the-vim-text-editor/">written</a> about my Vim experience a few years back. Since then, my toolkit has always included Vim (or rather, <a href="https://macvim.org/">MacVim</a>). While Emacs remains my primary tool, Vim has a geeky elegance, and its hyper-focus on editing performance is hugely attractive. Also, while Emacs is sometimes (<em>and rightfully</em>) called a kitchen sink, Vim <em>is equally so</em>, at least as the “can do everything” text editor. And it <em>is</em> the standard text editor, after all[1].</p>
<p>RIP, Mr. Moolenaar. You were a beacon in the open source community, and your work truly touched millions, including this Emacs user.</p>
<p>(Written using <code>evil-mode</code> in Emacs. It was only appropriate.)</p>
<p>[1] Technically, it is <code>vi</code>, but most distributions use <code>vim</code> instead.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://slashusr.wordpress.com/2023/08/09/thank-you-bram-moolenaar/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/32c2e1f88d5afc13b222e541f629216a6434cd5654278644eed05fe62cf305e5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evolve75</media:title>
		</media:content>
	</item>
		<item>
		<title>Phoenix</title>
		<link>https://slashusr.wordpress.com/2023/08/02/phoenix/</link>
					<comments>https://slashusr.wordpress.com/2023/08/02/phoenix/#respond</comments>
		
		<dc:creator><![CDATA[evolve75]]></dc:creator>
		<pubDate>Thu, 03 Aug 2023 00:46:08 +0000</pubDate>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[resurrection]]></category>
		<guid isPermaLink="false">http://slashusr.wordpress.com/?p=346</guid>

					<description><![CDATA[Nine years! It has been that long since I posted. Personal life and work-priorities both conspired to the silence in /usr land, which I finally hope to correct. A lot has happened in the world in the last decade. Technology has moved on (and continues to accelerate), two presidencies have come and gone, climate change &#8230; <a href="https://slashusr.wordpress.com/2023/08/02/phoenix/" class="more-link">Continue reading <span class="screen-reader-text">Phoenix</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Nine years! It has been <em>that long</em> since I posted. Personal life and work-priorities both conspired to the silence in /usr land, which I finally hope to correct.</p>
<p>A <em>lot</em> has happened in the world in the last decade. Technology has moved on (and continues to accelerate), two presidencies have come and gone, climate change is real, and computers might soon become sentient [1]. And the topics I usually posted about: Emacs, the Mac, *Nix, Open Source, and programming, have all made great strides (not always for the better, I’m looking at you: macOS). And while I have been immersed in these transformations, and have things to say, I just never got around to actually <em>writing</em>. And with each passing year, procrastinating slowly changed into a nagging fear: is blogging still relevant these days? And with the overwhelming rise of social media, does the voice of a blogger even matter?</p>
<p><strong>Yes</strong>.</p>
<p>The reason I have finally decided to write again is simple and in hindsight obvious—<em>it matters to me</em>. Having an unrestricted platform to express my ideas, views, and rants—even if the audience is a null set—is cathartic. And maybe, <em>just maybe</em>, a community exists out there, who might find /usr useful, or at least entertaining.</p>
<p>In any case, /usr is back.</p>
<p>[1]: Well, not there yet, but ChatGPT, generative models, and their ilk might be the four horsemen of the AI apocalypse</p>
]]></content:encoded>
					
					<wfw:commentRss>https://slashusr.wordpress.com/2023/08/02/phoenix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/32c2e1f88d5afc13b222e541f629216a6434cd5654278644eed05fe62cf305e5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evolve75</media:title>
		</media:content>
	</item>
		<item>
		<title>The Other Emacsen</title>
		<link>https://slashusr.wordpress.com/2014/11/30/the-other-emacsen/</link>
					<comments>https://slashusr.wordpress.com/2014/11/30/the-other-emacsen/#comments</comments>
		
		<dc:creator><![CDATA[evolve75]]></dc:creator>
		<pubDate>Sun, 30 Nov 2014 05:24:38 +0000</pubDate>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Editor]]></category>
		<category><![CDATA[opinion]]></category>
		<guid isPermaLink="false">http://blog.anupamsg.me/?p=328</guid>

					<description><![CDATA[For the times when you do NOT need to load a 24MB Editor to change two lines in a file.]]></description>
										<content:encoded><![CDATA[<p>While Emacs remains my primary text editor, there are times when starting a full Emacs session with tons of packages is simply too slow, especially on a terminal window, and when the task at hand is simply to make a few lines of changes in a configuration file.</p>
<p>Yes, I <strong>do</strong> know about the handy <code>-q</code> command-line option, which prevents the <code>init.el</code> file from being loaded, thereby ensuring a sub-second initialization of Emacs, <em>or</em> the <code>emacsclient</code> route (which I have enabled, and do use), but sometimes it is just more convenient to have a fast editor  that <em>has the Emacs feel, without the bloat</em>. And for a text nerd such as myself, it is also a matter of curiosity to <a href="http://blog.anupamsg.me/2011/09/15/heretical-confessions-of-an-emacs-addict-joy-of-the-vim-text-editor/" title="Vim">try out other editors</a> once in a while.</p>
<p>Emacs actually has had a rich history of variants and alternate implementations, with <a href="http://www.xemacs.org/">XEmacs</a> being one of more well known forks. On the Mac OS X, <a href="http://aquamacs.org/">Aquamacs</a> has remained a good option for a number of years. A more comprehensive list is available on the <a href="https://en.wikipedia.org/wiki/Emacs#Various_Emacs_editors">Wikipedia page for Emacs</a>.</p>
<p>Both XEmacs and Aquamacs are forked from, or derivatives of <a href="https://www.gnu.org/software/emacs/">GNU Emacs</a>, which is probably the most used Emacs these days. However, other light-weight Emacs-like editors still exist, and I have been trying out three of these, <a href="http://invisible-island.net/vile/" title="VILE – Vi Like Emacs">vile</a>, <a href="http://www.gnu.org/software/zile/" title="Zile - GNU Project - Free Software Foundation">zile</a>, and <a href="http://joe-editor.sourceforge.net/" title="Joe's Own Editor">jmacs</a>. On the Mac, these are available via <a href="https://www.macports.org/">Mac Ports</a>, on <a href="http://www.finkproject.org/">Fink</a>, and possibly on <a href="http://brew.sh/">Homebrew</a>.</p>
<p><a href="http://invisible-island.net/vile/" title="VILE – Vi Like Emacs">vile</a> is an interesting blend of <a href="http://www.gnu.org/software/emacs/" title="GNU Emacs - GNU Project - Free Software Foundation (FSF)">Emacs</a> and <a href="http://en.wikipedia.org/wiki/Vi" title="vi - Wikipedia, the free encyclopedia">vi</a>, and provides the modal commands from vi, but also has many of the window management features of Emacs (including similar Emacs key-bindings). It is really more of a vi variant, but the window management does make it very handy, though it does not support the text objects and other vi extensions as <a href="http://www.vim.org/" title="welcome home : vim online">Vim</a> does.</p>
<p><a href="http://joe-editor.sourceforge.net/" title="Joe's Own Editor">jmacs</a> (the Joe editor&#8217;s Emacs emulation) seems to be the most feature rich, and the syntax highlighting seems to be best of the lot.</p>
<p>Then there is <a href="http://www.gnu.org/software/zile/" title="Zile - GNU Project - Free Software Foundation">zile</a>, yet another Emacs clone that I am beginning to love for being lightweight, and having the most Emacs-like behavior. For simple text entry, zile seems to <em>feel</em> to be the fastest&#8212;though in reality&#8212;all three editors start up pretty fast.</p>
<p>In the end, while I still end up with using <code>Emacs/emacsclient</code> for most of my editing (after all, I do keep a Emacs session running most of the time like the true faithful), it is still <em>fun</em> to dabble with these editors, if for nothing else than to marvel at the core Emacs <em>editing</em> experience that these micro-editors can provide, in sub-Megabyte packages (<code>vile = 680K</code>, <code>zile = 251K</code>, <code>joe = 440K</code> on my machine).</p>
]]></content:encoded>
					
					<wfw:commentRss>https://slashusr.wordpress.com/2014/11/30/the-other-emacsen/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/32c2e1f88d5afc13b222e541f629216a6434cd5654278644eed05fe62cf305e5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evolve75</media:title>
		</media:content>
	</item>
		<item>
		<title>What&#8217;s New in Emacs 24.4</title>
		<link>https://slashusr.wordpress.com/2013/12/30/whats-new-in-emacs-24-4-2/</link>
					<comments>https://slashusr.wordpress.com/2013/12/30/whats-new-in-emacs-24-4-2/#respond</comments>
		
		<dc:creator><![CDATA[evolve75]]></dc:creator>
		<pubDate>Sun, 29 Dec 2013 20:07:21 +0000</pubDate>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[elisp]]></category>
		<category><![CDATA[Mickey Petersen]]></category>
		<guid isPermaLink="false">http://slashusr.wordpress.com/?p=307</guid>

					<description><![CDATA[Mickey Petersen has written up an excellent round-up of the latest features of the Emacs 24.4 release. Read the whole article at http://www.masteringemacs.org/articles/2013/12/29/whats-new-in-emacs-24-4/. He had also written a similar article for Emacs 24.3 (current stable version), which can be found here. New Settings that I am using I have already setup the load-prefer-newer, cycle-spacing, and &#8230; <a href="https://slashusr.wordpress.com/2013/12/30/whats-new-in-emacs-24-4-2/" class="more-link">Continue reading <span class="screen-reader-text">What&#8217;s New in Emacs&#160;24.4</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.masteringemacs.org/about/">Mickey Petersen</a> has written up an excellent round-up of the latest features<br />
of the <a href="http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00500.html">Emacs 24.4</a> release.</p>
<p>Read the whole article at <a href="http://www.masteringemacs.org/articles/2013/12/29/whats-new-in-emacs-24-4/">http://www.masteringemacs.org/articles/2013/12/29/whats-new-in-emacs-24-4/</a>.</p>
<p>He had also written a similar article for Emacs 24.3 (current stable version),<br />
which can be found <a href="http://www.masteringemacs.org/articles/2013/12/29/whats-new-emacs-24-3/">here</a>.</p>
<h2>New Settings that I am using</h2>
<p>I have already setup the <code>load-prefer-newer</code>, <code>cycle-spacing</code>, and <code>ns-use-srgb-colorspace</code> options.</p>
<p>The new <code>electric-pair-mode</code> options also look interesting, and I have set these<br />
up (I was using <code>skeleton-pair</code> for the auto-pairing function till now).</p>
<p>The new <code>M-s . (isearch-forward-symbol-at-point)</code> is going to be very useful. It<br />
essentially replicates what <code>C-s C-w</code> does, but having a single key-stroke is a<br />
little easier. A closely related command <code>M-s h . (highlight-symbol-at-point)</code><br />
also looks to be useful. This is especially handy with the<br />
<code>hi-lock-auto-select-face</code> option.</p>
<p><code>C-x SPC (rectangle-mark-mode)</code> finally allows replacing <a href="http://www.emacswiki.org/emacs/CuaMode">CUA</a> for me.</p>
<p><a href="http://www.gnu.org/software/emacs/manual/html_mono/eshell.html">Eshell</a> now has even better support for <em>visual</em> commands; i.e., commands<br />
which expect a terminal. See the options <code>eshell-visual-commands</code>,<br />
<code>eshell-visual-subcommands</code> and <code>eshell-visual-options</code> for details.</p>
<h2>New Interesting Modes</h2>
<p>The new Web Browser for Emacs (<a href="http://lars.ingebrigtsen.no/2013/06/eww.html">eww</a>) is great! I have already<br />
uninstalled<a href="http://emacs-w3m.namazu.org">w3m</a> and using eww solely right now.</p>
<p>The <code>dired-hide-details-mode</code> is also nice. It has already replaced<br />
<a href="http://www.emacswiki.org/emacs/DiredDetails">dired-details</a> for me.</p>
<p><code>superword-mode</code> looks to be useful (especially for programming Ruby, where<br />
underscores are usually used to separate words in an identifier).</p>
<p>The new <strong>file notification</strong> system would be very useful, except that it does<br />
not (yet) work in OSX (bummer).</p>
<h2>Other Default Settings of Interest</h2>
<p><code>desktop-auto-save-timeout</code> is going to be a life-saver. The related option for<br />
<code>desktop-restore-frames</code> finally does what I want.</p>
<p>The new <a href="http://www.emacswiki.org/emacs/ElectricPair">electric-pair</a> settings <code>electric-pair-preserve-balance</code>,<br />
<code>electric-pair-delete-adjacent-pairs</code> and<br />
<code>electric-pair-open-newline-between-pairs</code> do exactly what is expected.</p>
<p><a href="http://www.emacswiki.org/emacs/RubyMode">Ruby-mode</a> has some interesting updates, especially for indentation.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://slashusr.wordpress.com/2013/12/30/whats-new-in-emacs-24-4-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/32c2e1f88d5afc13b222e541f629216a6434cd5654278644eed05fe62cf305e5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evolve75</media:title>
		</media:content>
	</item>
		<item>
		<title>Enabling Postfix on OSX as a Relay: Revisited</title>
		<link>https://slashusr.wordpress.com/2013/12/22/enabling-postfix-on-osx-as-a-relay-revisited/</link>
					<comments>https://slashusr.wordpress.com/2013/12/22/enabling-postfix-on-osx-as-a-relay-revisited/#comments</comments>
		
		<dc:creator><![CDATA[evolve75]]></dc:creator>
		<pubDate>Sat, 21 Dec 2013 20:31:39 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[setup]]></category>
		<guid isPermaLink="false">http://slashusr.wordpress.com/?p=298</guid>

					<description><![CDATA[Postfix on OSX: Revisited A few years back, I had written a post on enabling the Postfix MTA as a relay server on OSX, which was quite well received. The article was originally written for OS X Lion, though it remained valid for OSX Mountain Lion, and more recently on OSX Mavericks as well. However, &#8230; <a href="https://slashusr.wordpress.com/2013/12/22/enabling-postfix-on-osx-as-a-relay-revisited/" class="more-link">Continue reading <span class="screen-reader-text">Enabling Postfix on OSX as a Relay:&#160;Revisited</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<h1>Postfix on OSX: Revisited</h1>
<p>A few years back, I had written a post on enabling the <a href="https://slashusr.wordpress.com/2012/02/14/enabling-postfix-for-outbound-relay-via-gmail-on-os-x-lion-11/">Postfix MTA as a relay server on OSX</a>, which was quite <a href="https://slashusr.wordpress.com/2012/02/14/enabling-postfix-for-outbound-relay-via-gmail-on-os-x-lion-11/#comments">well received</a>. The article was originally written for <a href="http://en.wikipedia.org/wiki/Mac_OS_X_Lion">OS X Lion</a>, though it remained valid for <a href="http://en.wikipedia.org/wiki/OS_X_Mountain_Lion">OSX Mountain Lion</a>, and more recently on<br />
<a href="http://en.wikipedia.org/wiki/OS_X_Mavericks">OSX Mavericks</a> as well.</p>
<p>However, things <em>have</em> changed on the OS since the last two versions, which warrants a revisit of the instructions, and a refresh of some of the steps. While the old set of instructions still <em>work</em>, there are changes needed that will keep the configuration future-proof.</p>
<p>The key changes since the article was posted (in February 2012) are:</p>
<ol>
<li>The <a href="https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html">launchd</a> configuration has changed somewhat, and a few elements of the <a href="https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html">launchctl plist</a> file are now deprecated. The old configuration in the <code>org.postfix.master.plist</code> needs to be refreshed</li>
<li>The old configuration depended on local mail-drop in the Postfix queues for the MTA daemon to be started. While this is quite correct (this <em>is</em> Unix, after all), there is another common scenario where the daemon is launched when a <strong>client connects to the SMTP ports</strong> (default port 25) on the<br />
local machine.</li>
</ol>
<h2>The Updated launchd Configuration</h2>
<p>We would like to retain running the daemon on a mail-drop in the queue, but also enable running the MTA when a connection is made to the SMTP port (default 25). The updated <code>org.postfix.master.plist</code> configuration file listed below does this for us.</p>
<p>In addition, the redundant and deprecated plist tags have also been removed.</p>
<p>You can replace the existing copy with this version as a drop-in replacement at <code>/System/Library/LaunchDaemons/</code> by using the following shell commands in Terminal.app (assuming you have downloaded the new version at <code>~/Desktop</code>):</p>
<pre class="brush: bash; title: ; notranslate">
$ cd /System/Library/LaunchDaemons/
$ sudo cp org.postfix.master.plist org.postfix.master.plist.old
$ sudo cp ~/Desktop/org.postfix.master.plist .
</pre>
<p>The actual configuration file:</p>
<pre class="brush: xml; title: ; notranslate">
    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
    &lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
    &lt;plist version=&quot;1.0&quot;&gt;
    &lt;dict&gt;
        &lt;key&gt;Label&lt;/key&gt;
        &lt;string&gt;org.postfix.master&lt;/string&gt;
        &lt;key&gt;ProgramArguments&lt;/key&gt;
        &lt;array&gt;
            &lt;string&gt;/usr/libexec/postfix/master&lt;/string&gt;
            &lt;string&gt;-e&lt;/string&gt;
            &lt;string&gt;60&lt;/string&gt;
        &lt;/array&gt;
        &lt;key&gt;Sockets&lt;/key&gt;
        &lt;dict&gt;
            &lt;key&gt;Listeners&lt;/key&gt;
            &lt;dict&gt;
                &lt;key&gt;SockServiceName&lt;/key&gt;
                &lt;string&gt;smtp&lt;/string&gt;
                &lt;key&gt;SockType&lt;/key&gt;
                &lt;string&gt;stream&lt;/string&gt;
            &lt;/dict&gt;
        &lt;/dict&gt;
        &lt;key&gt;QueueDirectories&lt;/key&gt;
        &lt;array&gt;
            &lt;string&gt;/var/spool/postfix/maildrop&lt;/string&gt;
        &lt;/array&gt;
        &lt;key&gt;AbandonProcessGroup&lt;/key&gt;
        &lt;true/&gt;
    &lt;/dict&gt;
    &lt;/plist&gt;
</pre>
<p>Once the file has been copied into the correct location (perhaps by using <code>sudo</code>), we need to reload the configuration into <code>launchd</code>:</p>
<pre class="brush: bash; title: ; notranslate">
$ cd /System/Library/LaunchDaemons/
$ sudo launchctl unload org.postfix.master.plist
$ sudo launchctl load -w org.postfix.master.plist
</pre>
<p>This should be sufficient to reload the new configuration.</p>
<h2>Testing out the configuration</h2>
<p>We can test the changes via the shell itself by trying to connect via telnet to the smtp port and trying out a few basic SMTP commands (<code>HELO</code> for checking a response, and <code>QUIT</code> to logout of the SMTP session):</p>
<pre class="brush: bash; title: ; notranslate">
$ cd ~                                  # Lets get back to $HOME directory
$ mail &amp;lt;your_id&amp;gt;                        # Send yourself an email to check mail-drop
$ telnet localhost smtp                 # Now lets telnet into the server
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 localhost.local ESMTP Postfix
HELO
501 Syntax: HELO hostname
QUIT
221 2.0.0 Bye
Connection closed by foreign host.
</pre>
<p>In the sample SMTP session above, the third line (starting with &#8220;<strong>220</strong>&#8221; response) indicates that the Postfix MTA is running, and is ready for accepting mail drops via the SMTP port (as opposed to the mail-drop via the <code>mail</code> command).</p>
]]></content:encoded>
					
					<wfw:commentRss>https://slashusr.wordpress.com/2013/12/22/enabling-postfix-on-osx-as-a-relay-revisited/feed/</wfw:commentRss>
			<slash:comments>11</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/32c2e1f88d5afc13b222e541f629216a6434cd5654278644eed05fe62cf305e5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evolve75</media:title>
		</media:content>
	</item>
		<item>
		<title>Copying the previous line to current position in Emacs</title>
		<link>https://slashusr.wordpress.com/2013/06/30/copying-the-previous-line-to-current-position-in-emacs/</link>
					<comments>https://slashusr.wordpress.com/2013/06/30/copying-the-previous-line-to-current-position-in-emacs/#respond</comments>
		
		<dc:creator><![CDATA[evolve75]]></dc:creator>
		<pubDate>Sun, 30 Jun 2013 01:26:21 +0000</pubDate>
				<category><![CDATA[elisp]]></category>
		<category><![CDATA[Emacs]]></category>
		<guid isPermaLink="false">http://slashusr.wordpress.com/?p=279</guid>

					<description><![CDATA[Recently, I came across a scenario where I had to quickly copy the previous line in an Emacs buffer to the current position. The usual method for doing this has been to invoke: C-p C-a C-k C-y RET C-y Which basically does the following: Moves to the previous line (C-p) Moves to the beginning of &#8230; <a href="https://slashusr.wordpress.com/2013/06/30/copying-the-previous-line-to-current-position-in-emacs/" class="more-link">Continue reading <span class="screen-reader-text">Copying the previous line to current position in&#160;Emacs</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Recently, I came across a scenario where I had to quickly copy the previous line in an Emacs buffer to the current position. The usual method for doing this has been to invoke:</p>
<p style="padding-left:30px;"><code>C-p C-a C-k C-y RET C-y</code></p>
<p>Which basically does the following:</p>
<ol>
<li><em>Moves</em> to the previous line (<code>C-p</code>)</li>
<li><em>Moves</em> to the beginning of the previous line (<code>C-a</code>)</li>
<li><em>Kills</em> the line (i.e., cuts the line with <code>C-k</code>)</li>
<li><em>Yanks</em> the line back (i.e., restores the original line with <code>C-y</code>)</li>
<li><em>Creates</em> a newline (<code>RET</code>), and</li>
<li><em>Yanks</em> another copy of the line with the final <code>C-y</code> (which is what we wanted in the first place)</li>
</ol>
<p>While this <em>works</em>, it is certainly not the most optimal mechanism to perform such a simple (albeit infrequent) operation.</p>
<p>In searching the Net, and scanning the inbuilt functions using apropos and the excellent <a title="Icicles" href="http://www.emacswiki.org/emacs/Icicles">Icicles</a> search, I stumbled upon the:</p>
<p style="padding-left:30px;"><code>copy-from-above-command</code></p>
<p>function, which does exactly what is needed here. This function is available in <code>misc.el</code>, and needs to be enabled by requiring the file to be loaded in <code>.emacs</code>:</p>
<p style="padding-left:30px;"><code>(require 'misc)</code></p>
<p>Also, the there is no default key-binding for the function, and one needs to be setup:</p>
<p style="padding-left:30px;"><code>(global-set-key (kbd "H-y") 'copy-from-above-command)</code></p>
<p>In my case, I set up the Hyper-y key-stroke for the key, which nicely mirrors the yanking keys (<code>C-y</code> and <code>M-y</code>).</p>
<p>This function has another nice twist, which is that it will copy the characters from the previous line only from the current column, which allows partial lines to be copied over.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://slashusr.wordpress.com/2013/06/30/copying-the-previous-line-to-current-position-in-emacs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/32c2e1f88d5afc13b222e541f629216a6434cd5654278644eed05fe62cf305e5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evolve75</media:title>
		</media:content>
	</item>
		<item>
		<title>OS X Mountain Lion: Need to reinstall Xcode command line tools</title>
		<link>https://slashusr.wordpress.com/2012/07/27/os-x-mountain-lion-need-to-reinstall-xcode-command-line-tools/</link>
					<comments>https://slashusr.wordpress.com/2012/07/27/os-x-mountain-lion-need-to-reinstall-xcode-command-line-tools/#comments</comments>
		
		<dc:creator><![CDATA[evolve75]]></dc:creator>
		<pubDate>Fri, 27 Jul 2012 15:51:50 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[Unix]]></category>
		<guid isPermaLink="false">http://slashusr.wordpress.com/?p=268</guid>

					<description><![CDATA[So I upgraded to OS X Mountain Lion yesterday. The install was pretty smooth (though had a tough time with the redeem code for the upgrade, worked on the third code that Apple sent across). Most of the software is working fine. However, I found that my existing Xcode installation needed an upgrade (via a &#8230; <a href="https://slashusr.wordpress.com/2012/07/27/os-x-mountain-lion-need-to-reinstall-xcode-command-line-tools/" class="more-link">Continue reading <span class="screen-reader-text">OS X Mountain Lion: Need to reinstall Xcode command line&#160;tools</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p style="text-align:left;">So I upgraded to OS X <a href="http://www.apple.com/osx/">Mountain Lion</a> yesterday.  The install was pretty smooth (though had a tough time with the redeem code for the upgrade, worked on the third code that Apple sent across).</p>
<p style="text-align:left;">Most of the software is working fine.  However, I found that my existing Xcode installation needed an upgrade (via a Xcode install from the App Store).   </p>
<p style="text-align:left;">The problem is that any new Xcode install seems to nuke the command line development tools  (think make, autoconf, etc.).   The solution is pretty simple though.  Once Xcode has been installed, run Xcode and then open the preferences.  There is a section on downloads, which lists installing the command line tools as an option.</p>
<p style="text-align:left;"><span style="font-size:12pt;"><img src="https://slashusr.wordpress.com/wp-content/uploads/2012/07/downloads-2012-07-27-11-51.png?w=778&#038;h=558" alt="downloads-2012-07-27-11-51.png" width="778" height="558" /></span></p>
<p style="text-align:left;">Voila!  Issue resolved. </p>
]]></content:encoded>
					
					<wfw:commentRss>https://slashusr.wordpress.com/2012/07/27/os-x-mountain-lion-need-to-reinstall-xcode-command-line-tools/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/32c2e1f88d5afc13b222e541f629216a6434cd5654278644eed05fe62cf305e5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evolve75</media:title>
		</media:content>

		<media:content url="https://slashusr.wordpress.com/wp-content/uploads/2012/07/downloads-2012-07-27-11-51.png" medium="image">
			<media:title type="html">downloads-2012-07-27-11-51.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Enabling postfix for outbound relay via Gmail on OS X Lion (and newer OSX versions)</title>
		<link>https://slashusr.wordpress.com/2012/02/14/enabling-postfix-for-outbound-relay-via-gmail-on-os-x-lion-11/</link>
					<comments>https://slashusr.wordpress.com/2012/02/14/enabling-postfix-for-outbound-relay-via-gmail-on-os-x-lion-11/#comments</comments>
		
		<dc:creator><![CDATA[evolve75]]></dc:creator>
		<pubDate>Tue, 14 Feb 2012 02:12:28 +0000</pubDate>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mail servers]]></category>
		<category><![CDATA[sendmail program]]></category>
		<guid isPermaLink="false">http://slashusr.wordpress.com/?p=253</guid>

					<description><![CDATA[How to enable the postfix MTA to relay emails via Gmail on Mac OSX Lion.]]></description>
										<content:encoded><![CDATA[<div class="outline-3" id="outline-container-1">
<p><em>Update on Oct 25, 2014: Updated For OS X Yosemite</em>.</p>
<p><em>Update on Dec 21, 2013: I have <a title="Enabling Postfix on OSX as a Relay: Revisited" href="https://slashusr.wordpress.com/2013/12/22/enabling-postfix-on-osx-as-a-relay-revisited/" target="_blank">posted an update</a> to the launchd setup for postfix. You should still read through this post, as most of the setup remains common to both posts.</em></p>
<h3 id="sec-1">The background</h3>
<div class="outline-text-3" id="text-1">
<p>Mac OSX comes with the <a href="http://www.postfix.org/">postfix</a> MTA, which is a fully featured <a href="http://en.wikipedia.org/wiki/Smtp_server">SMTP server</a>. Under normal circumstances, there is usually no need to enable or configure this software, as most email access is usually done via GUI clients such as the <a href="http://en.wikipedia.org/wiki/Mail_%28application%29">Mail.app</a> &#8211; which uses the POP/IMAP and SMTP settings to connect with the email service provider.</p>
<p>However, there are certain circumstances in which having a local SMTP server is very useful, such as:</p>
<ol>
<li>Allowing the batch logs and output from the cron daemon or other scripts to be sent via Internet email (this is otherwise delivered locally)</li>
<li>Testing email based code; which requires a local <a href="http://www.sendmail.com/sm/open_source/">sendmail</a> like SMTP server to be present</li>
</ol>
<p>For such use cases, the postfix server is ideal, as it provides all the features needed (and much more), and is also a nice drop-in replacement for the sendmail program.</p>
<p>While postfix can be used as a full-fledged SMTP server that connects directly to the mail-servers on the Internet, for the use cases above, it is usually better to redirect (i.e., <em>relay</em>) the emails via an authenticated and known server (such as <a href="https://gmail.com">Gmail</a>), as this helps avoid a lot of constraints around <a href="http://en.wikipedia.org/wiki/Open_mail_relay">open-relays</a>, which are mostly blocked these days to prevent email spam.</p>
<p>Note that configuration of postfix does require dropping down to the command-line, and fiddling with system files. While not complicated, it is definitely not for faint of the heart (though <em>much easier</em> than <a href="http://confighell.com/Sendmail">configuring</a> sendmail).</p>
</div>
</div>
<div class="outline-3" id="outline-container-2">
<h3 id="sec-2">What you need to know (pre-requisites)</h3>
<div class="outline-text-3" id="text-2">
<p>Some of the basic pre-requisites are:</p>
<ol>
<li>Understanding of the shell prompt and the Terminal.app program</li>
<li>Usage of the <a href="http://en.wikipedia.org/wiki/Sudo">sudo</a> program (all the configuration files are owned by root, and hence usage of sudo is essential)</li>
<li>Usage of any command line editor such as <a href="http://www.vim.org/">vim</a>, <a href="http://www.gnu.org/software/emacs/">Emacs</a>, <a href="http://www.nano-editor.org/">nano</a>, or any other editor of your choice, that can be invoked with super-user rights (usually via sudo)</li>
<li>A basic understanding of the Apple <a href="http://en.wikipedia.org/wiki/Launchd">launchd</a> service manager</li>
<li>The <a href="#config_files">configuration files</a></li>
<li>A Gmail email ID (actually, any SMTP server credentials will do)</li>
</ol>
<p>While this article will go step-by-step with the configuration process, knowledge of the above will allow a deeper understanding of the &#8220;<strong>why</strong>&#8221; for the changes done.</p>
<p>In the steps below. the <strong>$</strong> character before any command represents the shell prompt. Also, I will assume usage of the <strong>vim</strong> editor in the steps below.</p>
</div>
</div>
<div class="outline-3" id="outline-container-config_files">
<h3 id="config_files"><a id="sec-3" name="sec-3"></a>The configuration Files</h3>
<div class="outline-text-3" id="text-config_files">
<p>The configuration files that will be changed are:</p>
<table border="2" rules="groups" cellspacing="0" cellpadding="6">
<caption> </caption>
<col class="left" />
<col class="left" />
<col class="left" />
<thead>
<tr>
<th class="left" scope="col">Name</th>
<th class="left" scope="col">Location</th>
<th class="left" scope="col">Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left">org.postfix.master.plist</td>
<td class="left">/System/Library/LaunchDaemons</td>
<td class="left">launchd Configuration for postfix</td>
</tr>
<tr>
<td class="left">main.cf</td>
<td class="left">/etc/postfix</td>
<td class="left">The main postfix configuration</td>
</tr>
<tr>
<td class="left">aliases</td>
<td class="left">/etc/postfix</td>
<td class="left">Local recipient aliases</td>
</tr>
<tr>
<td class="left">generic</td>
<td class="left">/etc/postfix</td>
<td class="left">Sender aliases (for external mail)</td>
</tr>
<tr>
<td class="left">passwd</td>
<td class="left">/etc/postfix/sasl</td>
<td class="left">Relay host authentication</td>
</tr>
</tbody>
</table>
<p>Note that the &#8220;/etc/postfix/sasl&#8221; directory might not exist, in which case, we will need to create it from the shell prompt:</p>
<pre class="brush: bash; title: ; notranslate">
$ sudo mkdir /etc/postfix/sasl</pre>
</div>
</div>
<div class="outline-3" id="outline-container-4">
<h3 id="sec-4">Step 1: Update the launchd configuration</h3>
<div class="outline-text-3" id="text-4">
<p><em>Update Dec 21, 2013 : While this setup still works, you might want to also see an alternate configuration of <strong>postfix&#8217;s</strong> launchd setup, which I have documented in a <a title="Enabling Postfix on OSX as a Relay: Revisited" href="https://slashusr.wordpress.com/2013/12/22/enabling-postfix-on-osx-as-a-relay-revisited/" target="_blank">follow-up article</a>. The new configuration also allows <strong>postfix</strong> to be launched when network activity happens on the local SMTP port 25.</em></p>
<p>The <strong>org.postfix.master.plist</strong> file located at <strong>/System/Library/LaunchDaemons/</strong> is used to start or stop the <strong>postfix</strong> program on demand, as and when any email is submitted to the mail system for processing. The basic Apple setup is fine, but may need a little tweaking (in my case, the file had a couple of tags which prevented postfix from being started.)</p>
<p>We need to edit the file (as a super user) to match the following content:</p>
<pre class="brush: bash; title: ; notranslate">
$ sudo vim /System/Library/LaunchDaemons/org.postfix.master.plist</pre>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
        &lt;key&gt;Label&lt;/key&gt;
        &lt;string&gt;org.postfix.master&lt;/string&gt;
        &lt;key&gt;Program&lt;/key&gt;
        &lt;string&gt;/usr/libexec/postfix/master&lt;/string&gt;
        &lt;key&gt;ProgramArguments&lt;/key&gt;
        &lt;array&gt;
                &lt;string&gt;master&lt;/string&gt;
                &lt;string&gt;-e&lt;/string&gt;
                &lt;string&gt;60&lt;/string&gt;
        &lt;/array&gt;
        &lt;key&gt;QueueDirectories&lt;/key&gt;
        &lt;array&gt;
                &lt;string&gt;/var/spool/postfix/maildrop&lt;/string&gt;
        &lt;/array&gt;
        &lt;key&gt;AbandonProcessGroup&lt;/key&gt;
        &lt;true/&gt;
        &lt;key&gt;OnDemand&lt;/key&gt;
        &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;</pre>
</div>
</div>
<div class="outline-3" id="outline-container-5">
<h3 id="sec-5">Step 2: Edit the /etc/postfix/main.cf file</h3>
<div class="outline-text-3" id="text-5">
<p>The next step is to edit the main configuration file for postfix. Do make a backup of the current file before editing.</p>
<pre class="brush: bash; title: ; notranslate">
$ cd /etc/postfix
$ sudo cp main.cf main.cf.orig
$ sudo vim main.cf</pre>
<p>Note that the <strong>main.cf</strong> file is a pretty large one, and has a lot of commented out sections, which should be left as is. Please add the following lines at end of the file.</p>
<pre class="brush: bash; light: false; title: ; notranslate">
# Set the relayhost to the Gmail Server.  Replace with your SMTP server as needed
relayhost = [smtp.gmail.com]:587
# Postfix 2.2 uses the generic(5) address mapping to replace local fantasy email
# addresses by valid Internet addresses. This mapping happens ONLY when mail
# leaves the machine; not when you send mail between users on the same machine.
smtp_generic_maps = hash:/etc/postfix/generic

# These settings (along with the relayhost setting above) will make
# postfix relay all outbound non-local email via Gmail using an
# authenticated TLS/SASL session.
smtp_tls_loglevel=1
smtp_tls_security_level=encrypt
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps=hash:/etc/postfix/sasl/passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_mechanism_filter = plain
</pre>
</div>
</div>
<div class="outline-3" id="outline-container-6">
<h3 id="sec-6">Step 3: Edit the /etc/postfix/aliases file</h3>
<div class="outline-text-3" id="text-6">
<p>We need to make a minor edit here, to allow mails sent to the <strong>root</strong> ID to your local user mailbox.</p>
<pre class="brush: bash; title: ; notranslate">
$ cd /etc/postfix
$ whoami                # This will provide your local user name
$ sudo cp aliases aliases.orig
$ sudo vim aliases
$ sudo newaliases</pre>
<p>Find the line in the file which is:</p>
<pre class="brush: bash; light: false; title: ; notranslate">
#root:              you</pre>
<p>and replace the &#8220;you&#8221; with the username provided by the <strong>whoami</strong> command above.  Also, remove the &#8220;#&#8221; from beginning of the line.</p>
<p>Remember to run the <strong>newaliases</strong> command (the last command above), or else changes will not take effect!</p>
</div>
</div>
<div class="outline-3" id="outline-container-7">
<h3 id="sec-7">Step 4: Edit the /etc/postfix/generic file</h3>
<div class="outline-text-3" id="text-7">
<p>This file maps the local user address (usually of the form <em>yourid@machine.local</em>) to a valid Internet email address you would like to use when sending mails to the outside world. In our case, it would basically map your Unix user name to the Gmail ID.</p>
<pre class="brush: bash; title: ; notranslate">
$ cd /etc/postfix
$ whoami                # This will provide your local user name
$ hostname              # This will provide your machine name
$ sudo cp generic generic.orig
$ sudo vim generic
$ sudo postmap generic</pre>
<p>In the file, add the following lines at the end of the file (replacing the &lt;username&gt; with the output of the <strong>whoami</strong> command, and &lt;machinename&gt; with output of the <strong>hostname</strong> command):</p>
<pre class="brush: bash; light: false; title: ; notranslate">
# Translate my primary email address to the Gmail address
# This is ONLY for the outbound email, and does not apply to
# local email.
&lt;yourusername&gt;@&lt;machinename&gt;  &lt;your gmail ID, e.g. user@gmail.com&gt;
@&lt;machinename&gt;                &lt;your gmail ID, e.g. user@gmail.com&gt;</pre>
<p>Remember to run the last command (<strong>postmap</strong>) as otherwise the changes will not be picked up!</p>
</div>
</div>
<div class="outline-3" id="outline-container-8">
<h3 id="sec-8">Step 5: Edit/Create the /etc/postfix/sasl/passwd file</h3>
<div class="outline-text-3" id="text-8">
<p>In this step, we store the SMTP authentication (user ID and password) for Gmail, so that postfix can connect as any other SMTP client to Gmail via an authenticated session.</p>
<p>Note that the file may not exist prior to this step, in which case we will create it.</p>
<pre class="brush: bash; title: ; notranslate">
$ sudo mkdir -p /etc/postfix/sasl    # In case the directory does not exist
$ cd /etc/postfix/sasl
$ sudo vim passwd
$ sudo postmap passwd</pre>
<p>Create the following file, replacing &lt;gmailusername&gt; with the ID you use for Gmail (with the &#8220;@gmail.com&#8221; added at the end), and &lt;gmailpassword&gt; with the password you use to login to Gmail.</p>
<pre class="brush: bash; light: false; title: ; notranslate">
[smtp.gmail.com]:587    &lt;gmailusername&gt;:&lt;gmailpassword&gt;</pre>
<p>Note that if you use <a href="http://support.google.com/accounts/bin/static.py?hl=en&amp;page=guide.cs&amp;guide=1056283">two-factor</a> authenication with Google, then the password to use will be a new <a href="http://support.google.com/accounts/bin/static.py?hl=en&amp;page=guide.cs&amp;guide=1056283&amp;answer=185833&amp;rd=3">application specific password</a> generated via Google&#8217;s account settings.</p>
</div>
</div>
<div class="outline-3" id="outline-container-9">
<h3 id="sec-9">Final Step: Test the settings</h3>
<div class="outline-text-3" id="text-9">
<p>We are now good to go. Lets test our settings from the terminal:</p>
<pre class="brush: bash; title: ; notranslate">
$ cd /System/Library/LaunchDaemons
$ sudo launchctl load -w org.postfix.master.plist
$ cd ~                             # Just to be safe, move to your home directory
$ mail &lt;your_id&gt;  # Output of the `whoami' command
# Type in a test email and hit Control-D on a new line
$ mail
# Check whether the email has arrived. Hit 'q' on the '?' prompt to quit

$ mail &lt;your gmail ID&gt;       # Lets now try to send an external mail.
# Type in a test email and hit Control-D on a new line</pre>
<p>After the second step above, check your Gmail account for the test mail. If it has arrived, then we have a good configuration.</p>
</div>
</div>
<div class="outline-3" id="outline-container-10">
<h3 id="sec-10">Summary</h3>
<div class="outline-text-3" id="text-10">
<p>Setting up the postfix system on OSX is not particularly hard, but does require some steps. Also, this is just the basic setup to get things up and running. Postfix is an industrial strength mail server has a lot of features (and a corresponding number of configurations). Thankfully, the documentation at <a href="http://www.postfix.org/documentation.html">http://www.postfix.org/documentation.html</a> is pretty good.</p>
<p>For more details on this specific setup, additional documentation is available at<a href="#http-www.postfix.org-SOHO_README.html"> http://www.postfix.org/SOHO<sub>README</sub>.html</a>.</p>
<p>[Updated on 19th Feb 2012]: Corrected a typo.  Thanks to jamrok for pointing it out.</p>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://slashusr.wordpress.com/2012/02/14/enabling-postfix-for-outbound-relay-via-gmail-on-os-x-lion-11/feed/</wfw:commentRss>
			<slash:comments>118</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/32c2e1f88d5afc13b222e541f629216a6434cd5654278644eed05fe62cf305e5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evolve75</media:title>
		</media:content>
	</item>
		<item>
		<title>Heretical Confessions of an Emacs Addict &#8211; Joy of the Vim Text Editor</title>
		<link>https://slashusr.wordpress.com/2011/09/15/heretical-confessions-of-an-emacs-addict-joy-of-the-vim-text-editor/</link>
					<comments>https://slashusr.wordpress.com/2011/09/15/heretical-confessions-of-an-emacs-addict-joy-of-the-vim-text-editor/#comments</comments>
		
		<dc:creator><![CDATA[evolve75]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 04:56:09 +0000</pubDate>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[Editor]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[Vim]]></category>
		<guid isPermaLink="false">http://slashusr.wordpress.com/?p=189</guid>

					<description><![CDATA[Context As an experiment, I have recently started using Vim as my primary text editor. While I have been an Emacs aficionado for a very, very long time &#8211; clocking in at almost 16 years &#8211; Vim is something that I have always been curious about, and tinkered with from time to time, while ending &#8230; <a href="https://slashusr.wordpress.com/2011/09/15/heretical-confessions-of-an-emacs-addict-joy-of-the-vim-text-editor/" class="more-link">Continue reading <span class="screen-reader-text">Heretical Confessions of an Emacs Addict &#8211; Joy of the Vim Text&#160;Editor</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<h2>Context</h2>
<p>As an experiment, I have recently started using <a href="http://www.vim.org/">Vim</a> as my primary text editor. While I have been an <a href="http://www.gnu.org/software/emacs/">Emacs</a> aficionado for a very, very long time &#8211; clocking in at almost 16 years &#8211; Vim is something that I have always been curious about, and tinkered with from time to time, while ending up going back to Emacs. This time however, I intend to stick around for a while, and try to get a feel of the Zen of Vim.</p>
<p><a href="https://slashusr.wordpress.com/wp-content/uploads/2011/09/emacs-vim-icons.png"><img data-attachment-id="192" data-permalink="https://slashusr.wordpress.com/2011/09/15/heretical-confessions-of-an-emacs-addict-joy-of-the-vim-text-editor/emacs-vim-icons/" data-orig-file="https://slashusr.wordpress.com/wp-content/uploads/2011/09/emacs-vim-icons.png" data-orig-size="471,381" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Emacs and Vim Icons" data-image-description="" data-image-caption="" data-medium-file="https://slashusr.wordpress.com/wp-content/uploads/2011/09/emacs-vim-icons.png?w=300" data-large-file="https://slashusr.wordpress.com/wp-content/uploads/2011/09/emacs-vim-icons.png?w=471" class="aligncenter size-medium wp-image-192" title="Emacs and Vim Icons" src="https://slashusr.wordpress.com/wp-content/uploads/2011/09/emacs-vim-icons.png?w=300&#038;h=242" alt="The Emacs and Vim Icons" width="300" height="242" srcset="https://slashusr.wordpress.com/wp-content/uploads/2011/09/emacs-vim-icons.png?w=300 300w, https://slashusr.wordpress.com/wp-content/uploads/2011/09/emacs-vim-icons.png?w=150 150w, https://slashusr.wordpress.com/wp-content/uploads/2011/09/emacs-vim-icons.png 471w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>The experience with Vim has been rather pleasant so far. While  configuration is definitely a must (just like Emacs), out of the box experience is not bare bones either. In fact, the default settings are rather good, and one can get a lot of mileage from the vanilla setup.</p>
<p>The USP of Vim is that it is first and foremost a <strong>text editor</strong>, and does not attempt to be<a href="http://www.emacswiki.org/emacs/TheKitchenSink"> THE kitchen sink</a>. In other words, its core focus is to provide the best and most functions to manipulate text; it is not to provide a universal platform where one of the applications happens to be an editor.</p>
<h2>The Editing Model</h2>
<p>The very first experience the user gets on launching Vim is that it is a <a href="http://en.wikipedia.org/wiki/Mode_%28computer_interface%29">modal</a> editor, with distinct modes for entering text, and editing it.</p>
<p>This is in stark contrast to most other editors, which provide the editing functions via other mechanisms, such as menus or key chords (à la Emacs). While this might seem odd at first glance, it is definitely a key component of Vim&#8217;s power, and arguably its success as a text editor.</p>
<p>In addition, the second key distinguishing factor of Vim is that its editing is based on a <em>&#8220;noun-adjective-count-movement-verb&#8221;</em> model of editing. Nearly every editing command is a sequence of one or more of these primitives, where the intent of the edit operation is usually fully mapped to the encoding offered by various combinations of these primitives.</p>
<p>As an example, to move 5 lines down, and then 3 words forward, to delete the next two words, the following &#8220;primitive encoding&#8221; can be used:</p>
<pre>      <code>5j 3w 2de </code></pre>
<p>While this is a rather trivial example, it illustrates a key principle of using Vim &#8211; the editing model is based on <strong>MOVEMENT</strong> and <strong>MANIPULATION</strong>, explicitly and succinctly made via the modal key-chords which apply the same basic foundational model at all scales.</p>
<p>To a large extent, this underlying pair is what the user usually is thinking about, when an editing operation is being thought of. The primitives are just the vocabulary to tell Vim to execute the intent.</p>
<p>The movement itself can be further separated into raw movements (i.e., lines and characters), or be semantic oriented (words, sentences, paragraphs, functions, etc.) This can sometimes be further refined using &#8220;adjectives&#8221; such as <em>&#8220;begin&#8221;</em>, <em>&#8220;end&#8221;</em>, <em>&#8220;between&#8221;</em>, or <em>&#8220;surrounded&#8221;</em>. In addition, the count represents multiples of the movement unit being specified, and allows velocity of the movement to be increased significantly.</p>
<p>The verb is of course where the &#8220;real action&#8221; happens. In a general sense, every verb is really a &#8220;change&#8221; verb, with specializations of &#8220;delete&#8221;, &#8220;replace&#8221;, &#8220;convert&#8221;, etc.</p>
<h2>Conveniences</h2>
<p>In essence, the core feature set of Vim (and certainly its spiritual ancestor &#8211; Vi) can be adequately expressed by the core model described above.</p>
<p>However, a basic feature does not make a competent editor. This requires other user comforts such as multi-file edits, windowing mechanisms (including split windows), language syntax, external tool integration (spell checks, compilers, shell interaction), extensive customization to fit the user&#8217;s need, an usable in-built help system, and many more such features that make regular usage comfortable and transparent. And Vim does have all of these in abundance, with parity with Emacs in most of these areas in terms of feature completeness, and power.</p>
<p>Granted, Vim does not yet have an inbuilt <a href="http://www.gnus.org/">News Reader</a>, or an email client, but the core editing functions are very much there, or easily added via <a href="http://www.vim.org/scripts/index.php">plug-ins</a>.</p>
<h2>Conclusions</h2>
<p>The feeling I get from using Vim is really about efficiency and focus, while Emacs seems to exude more a sense of power. Both can be frustrating at times, often from over-abundance of features than anything else, and hidden functionality that takes years to internalize before returns are gained.</p>
<p>Vim and Emacs are both excellent editors, and share a lot in common. The complexity, feature-richness, and the high learning curve are the ones that stand out the most. Also, the vibrant community around both editors is a shared characteristic.</p>
<p><a href="http://en.wikipedia.org/wiki/Editor_wars">Editor wars</a> aside, both are very competent and complex pieces of software, and will serve the user well, provided an investment is made in learning the unique interfaces that both exhibit.</p>
<p>As for me, I do not anticipate leaving the Emacs bandwagon any time soon &#8212; especially with significant investments now in the <a href="http://orgmode.org/">Orgmode</a> work-flow that I have built up over the past few years. However, I do see Vim as another pro-tool in my toolbox, which is definitely going to get a lot more love and use in the days ahead.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://slashusr.wordpress.com/2011/09/15/heretical-confessions-of-an-emacs-addict-joy-of-the-vim-text-editor/feed/</wfw:commentRss>
			<slash:comments>15</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/32c2e1f88d5afc13b222e541f629216a6434cd5654278644eed05fe62cf305e5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evolve75</media:title>
		</media:content>

		<media:content url="https://slashusr.wordpress.com/wp-content/uploads/2011/09/emacs-vim-icons.png?w=300" medium="image">
			<media:title type="html">Emacs and Vim Icons</media:title>
		</media:content>
	</item>
		<item>
		<title>The Missing iSync in OS X Lion (and what to do about it)</title>
		<link>https://slashusr.wordpress.com/2011/07/22/the-missing-isync-in-os-x-lion-and-what-to-do-about-it/</link>
					<comments>https://slashusr.wordpress.com/2011/07/22/the-missing-isync-in-os-x-lion-and-what-to-do-about-it/#comments</comments>
		
		<dc:creator><![CDATA[evolve75]]></dc:creator>
		<pubDate>Fri, 22 Jul 2011 03:25:34 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[tip]]></category>
		<guid isPermaLink="false">http://slashusr.wordpress.com/2011/07/22/the-missing-isync-in-os-x-lion-and-what-to-do-about-it/</guid>

					<description><![CDATA[The short answer to someone looking for a solution: just copy over iSync from your Snow Leopard installation back to the /Applications folder in Lion, and also copy the phone plugin you need back into /Library/PhonePlugins folder. Everything will be as it was. Enjoy. The longer story requires more explanation … The Problem I have &#8230; <a href="https://slashusr.wordpress.com/2011/07/22/the-missing-isync-in-os-x-lion-and-what-to-do-about-it/" class="more-link">Continue reading <span class="screen-reader-text">The Missing iSync in OS X Lion (and what to do about&#160;it)</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>The short answer to someone looking for a solution: <em><strong>just copy over iSync</strong></em> from your Snow Leopard installation back to the <em>/Applications</em> folder in Lion, <strong>and</strong> also copy the phone plugin you need back into <em>/Library/PhonePlugins</em> folder. Everything will be as it was. <em>Enjoy</em>.</p>
<p>The longer story requires more explanation …</p>
<p><strong>The Problem</strong></p>
<p>I have been looking forward to upgrading to the latest version of OSX (<a href="http://www.apple.com/macosx/">Lion</a>) ever since the announcements were made in the <a href="http://events.apple.com.edgesuite.net/11piubpwiqubf06/event/">WWDC</a> earlier this year.</p>
<p>However, in the middle of the whole slew of new functions and features (“250+”), Lion is also leaving behind a few things – notably <a href="http://en.wikipedia.org/wiki/Rosetta_(binary_translation_software)">Rosetta</a> (the PowerPC translation layer) – and the <a href="http://en.wikipedia.org/wiki/Isync">iSync</a> and <a href="http://en.wikipedia.org/wiki/Frontrow">FrontRow</a> applications.</p>
<p>The demise of PowerPC emulation has been long in coming, and was not really a surprise, given that it has been 6 years since Intel became the official CPU for Apple machines. The main impact really seems to be for Quicken users, which might actually be a blessing in disguise, given how pathetic Quicken really was on the Mac.<br />
<span style="font-size:12pt;"><img src="https://slashusr.wordpress.com/wp-content/uploads/2011/07/isync-2011-07-21-23-25.png?w=404&#038;h=186" alt="isync-2011-07-21-23-25.png" width="404" height="186" /></span><br />
iSync has been removed <a href="http://www.tuaw.com/2011/05/26/no-more-isync-in-lion/">presumably</a> because it has been one of the “low usage” applications on the platform. iTunes is the center of most of the Mac based synchronization these days, along with MobileMe for the cloud side of things.</p>
<p>However, iSync has been a key feature of the OS for me, as I carry a non-iOS phone (a <a href="http://europe.nokia.com/support/product-support/nokia-e71">Nokia E71</a> actually), and being able to <a href="http://europe.nokia.com/support/product-support/isync/compatibility-and-download">seamlessly</a> synchronize my contacts and calendars with the phone using iSync made it a key part of my workflow (I even have some Automator scripts to make this easier). And iSync has been able to synchronize over Bluetooth, unlike the tethered experience with the iOS devices so far (though OTA sync is <a href="http://www.engadget.com/2011/06/06/apple-turns-ios-pc-free-with-ota-updates-and-wireless-sync/">on the way</a> with iOS 5 later this fall).</p>
<p>Alas, OS X Lion removes the iSync application from the hard disk once it is installed, and for a time I thought that this was end of the line for the convenience I had with the E71, and would need to go back to the darks days of manual data entry for the addresses (manual entry of calendar entries is too much of a hassle on the phone, and would need to be dropped all together).</p>
<p><strong>The Solution</strong></p>
<p>Before installation of Lion, I had taken a full disk image of my previous Snow Leopard installation using the excellent <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html">SuperDuper!</a> Disk cloner.</p>
<p>This was more from a backup and recovery perspective, but allowed me an unexpected solution to the iSync quandary – on a whim, I attached the Snow Leopard disk to the Mac running Lion, and clicked on the iSync application. Voila! iSync works exactly as it should!</p>
<p>In hindsight, this is not really surprising, since iSync really has been a front end for the underlying sync services (which are still around in Lion), and for managing phone and device specific plugins.</p>
<p>All that was needed was to just copy over iSync back into the “<em>/Applications”</em> folder, and also copy the phone plugins (just one in my case) to the “<em>/Library/PhonePlugins</em>” folder.</p>
<p><span style="font-size:12pt;"><img src="https://slashusr.wordpress.com/wp-content/uploads/2011/07/phoneplugins-2011-07-21-23-25.png?w=399&#038;h=234" alt="phoneplugins-2011-07-21-23-25.png" width="399" height="234" /></span></p>
<p>In summary, while Apple in its immense wisdom took out a feature that was useful to some (albeit a minority), getting it to work again was surprisingly easy. Will need to check out the situation with FrontRow next time.</p>
<p>[Update on July 22, 2011]</p>
<p>Looks like a similar recovery process exists for FrontRow as well.  See <a title="Recovering Frontrow" href="http://www.macworld.com/article/161284/2011/07/farewell_frontrow.html">this article</a> at Macworld.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://slashusr.wordpress.com/2011/07/22/the-missing-isync-in-os-x-lion-and-what-to-do-about-it/feed/</wfw:commentRss>
			<slash:comments>44</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/32c2e1f88d5afc13b222e541f629216a6434cd5654278644eed05fe62cf305e5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evolve75</media:title>
		</media:content>

		<media:content url="https://slashusr.wordpress.com/wp-content/uploads/2011/07/isync-2011-07-21-23-25.png" medium="image">
			<media:title type="html">isync-2011-07-21-23-25.png</media:title>
		</media:content>

		<media:content url="https://slashusr.wordpress.com/wp-content/uploads/2011/07/phoneplugins-2011-07-21-23-25.png" medium="image">
			<media:title type="html">phoneplugins-2011-07-21-23-25.png</media:title>
		</media:content>
	</item>
	</channel>
</rss>
