<?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>Arunrocks &#187; emacs</title> <atom:link href="http://www.arunrocks.com/blog/archives/category/emacs/feed/" rel="self" type="application/rss+xml" /><link>http://www.arunrocks.com/blog</link> <description>Representing Anti-monotonistic Tendencies</description> <lastBuildDate>Sun, 15 Aug 2010 06:25:55 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.8.6</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Emacs tip: Prevent too many buffers in Dired</title><link>http://www.arunrocks.com/blog/archives/2009/12/04/emacs-tip-prevent-too-many-buffers-in-dired/</link> <comments>http://www.arunrocks.com/blog/archives/2009/12/04/emacs-tip-prevent-too-many-buffers-in-dired/#comments</comments> <pubDate>Fri, 04 Dec 2009 09:47:26 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[emacs]]></category> <category><![CDATA[productivity]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/?p=158</guid> <description><![CDATA[This is for the users of the Emacs editorDired mode  is the default way of visiting directories on Emacs. Whenever you open a file using C-x C-f, you would see the current directory. If you chose to press Enter without entering a file name, you would visit the current directory in Dired mode.I don&#8217;t [...]]]></description> <content:encoded><![CDATA[<p>This is for the users of the <a
href="http://en.wikipedia.org/wiki/Emacs">Emacs</a> editor</p><p><a
href="http://www.emacswiki.org/emacs/DiredMode">Dired mode </a> is the default way of visiting directories on Emacs. Whenever you open a file using <code>C-x C-f</code>, you would see the current directory. If you chose to press Enter without entering a file name, you would visit the current directory in Dired mode.</p><p>I don&#8217;t use the Dired mode very much to browse directories. I would rather use Windows explorer or Nautilus. Don&#8217;t get me wrong, I do find Dired extremely useful to locate a file. But for every directory you visit it adds a new buffer. This quickly becomes very unmanageable.</p><p>However, I recently found out that you can make Dired re-use the same buffer if you press <code>a</code> (<code>dired-find-alternate-file</code>) rather than &#8216;Enter&#8217; for visiting a directory in Dired mode. This is can be even used to open a file which results in the last Dired buffer being completely removed (alternatively you can use <code>v</code> or <code>dired-view-file </code> to view a read-only version of the file).</p><p>With this tip, I am finding myself using Emacs more for browsing around my file system.</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2009/12/04/emacs-tip-prevent-too-many-buffers-in-dired/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Emacs Tip: A Key to open the Current Folder in Windows</title><link>http://www.arunrocks.com/blog/archives/2008/06/10/emacs-tip-a-key-to-open-the-current-folder-in-windows/</link> <comments>http://www.arunrocks.com/blog/archives/2008/06/10/emacs-tip-a-key-to-open-the-current-folder-in-windows/#comments</comments> <pubDate>Tue, 10 Jun 2008 10:22:52 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Technical]]></category> <category><![CDATA[emacs]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/archives/2008/06/10/emacs-tip-a-key-to-open-the-current-folder-in-windows/</guid> <description><![CDATA[If the over-descriptive title was not enough, this is another one of my tips to use my favorite editor &#8211; Emacs. Some of you really liked my earlier post on Emacs tips on Windows, so here is one more tip to improve your productivity.Most of the time while editing a document, we need to quickly [...]]]></description> <content:encoded><![CDATA[<p>If the over-descriptive title was not enough, this is another one of my tips to use my favorite editor &#8211; Emacs. Some of you really liked my <a
href="http://www.arunrocks.com/blog/archives/2008/02/20/5-indespensible-tips-for-emacs-on-windows/">earlier post on Emacs tips on Windows</a>, so here is one more tip to improve your productivity.</p><p>Most of the time while editing a document, we need to quickly browse the folder of that file. Add the following lines to your <code>.emacs</code> files and so that by just pressing function key F12 you can immediately view its corresponding folder:</p><div> [source:css]
;; explorer
;; &#8212;&#8212;&#8212;-
;;; Windows explorer to open current file &#8211; Arun Ravindran(defun explorer ()
&#8220;Launch the windows explorer in the current directory and selects current file&#8221;
(interactive)
(w32-shell-execute
&#8220;open&#8221;
&#8220;explorer&#8221;
(concat &#8220;/e,/select,&#8221; (convert-standard-filename buffer-file-name))))(global-set-key [f12]         &#8216;explorer)        ; F12 &#8211; Open Explorer for the current file path[/source]</div><p>A nice extra is that the opened explorer will have the current file automatically selected. Press F12 once in a while, it quickly becomes addictive ;)</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2008/06/10/emacs-tip-a-key-to-open-the-current-folder-in-windows/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>5 Indispensable Tips for Emacs on Windows</title><link>http://www.arunrocks.com/blog/archives/2008/02/20/5-indespensible-tips-for-emacs-on-windows/</link> <comments>http://www.arunrocks.com/blog/archives/2008/02/20/5-indespensible-tips-for-emacs-on-windows/#comments</comments> <pubDate>Wed, 20 Feb 2008 08:19:54 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[emacs]]></category> <category><![CDATA[featured]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/archives/2008/02/20/5-indespensible-tips-for-emacs-on-windows/</guid> <description><![CDATA[Emacs is generally not very popular on Windows based operating systems. The default installation of Emacs leaves you with a very spartan UI and a very basic editor. However, due to Emacs&#8217; extendibility, you can create a very powerful editor by customizing your .emacs file and making some OS specific tweaks. We will be concentrating [...]]]></description> <content:encoded><![CDATA[<p>Emacs is generally not very popular on Windows based operating systems. The default installation of Emacs leaves you with a very spartan UI and a very basic editor. However, due to Emacs&#8217; extendibility, you can create a very powerful editor by customizing your .emacs file and making some OS specific tweaks. We will be concentrating on the latter as there are plenty of .emacs files floating around for your reference.</p><p>I have 5 simple yet useful tips below, which I have tested with a GNU Emacs 23.0.0.1 (i386-mingw-nt5.1.2600) running on Windows XP.</p><h4>Tip 1: Starting off With a Prettier Emacs</h4><p>Most of us customize the fonts, colours and window position of Emacs. In fact, I have found that dark backgrounds are much suited to Emacs than the default light background. However, when Emacs starts up, it annoyingly shows the default fonts and colours first. As your .emacs files load, it jumps around and changes colours quite noticeably.</p><p>You can avoid this annoyance by making a simple registry modification. Create a new .reg file say <code>set-frame-and-fonts.reg</code> and copy paste the following lines. Open the file to add the changes to the registry. Restart Emacs and enjoy the difference!</p><pre><code>REGEDIT4
[HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs]
"Emacs.Foreground"="black"
"Emacs.Background"="#f5f5f5"
"Emacs.Font"="-outline-Consolas-normal-r-normal-normal-12-90-96-96-c-*-iso8859-1"
"Emacs.Geometry"="100x35+0+0"
</code></pre><p>Caveat: The lines above are my preferred colours, fonts and window positions. Your&#8217;s could be different. Please customize to your taste.</p><h4>Tip #2: Add &#8220;Open In Emacs&#8221; option to all Files</h4><p>This will be indispensable once you are more used to Emacs. You will feel like opening anything and everything with it. And being the one true swiss-army-chainsaw it is, you will be delighted at the enormous no: of filetypes that Emacs supports out of the box.</p><p>This .reg file add an &#8220;Open in Emacs&#8221; option in Windows Explorer when you right click on any file. Copy the following lines to a .reg file say <code>Add-Emacs-To-Open-Any-File.reg</code> and open it to add the changes to the registry. Make sure that you have modified the path below to point to your emacs installation path (mine is in D: drive). The <code>emacsclientw.exe</code> resides in the same place where your <code>runemacs.exe</code> resides (right-clicking on the emacs icon, generally shows you this).</p><pre><code>Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\Shell\Open In Emacs\Command]
@="\"D:\\Program Files\\Emacs23\\bin\\emacsclientw.exe\" -a \"D:\\Program Files\\Emacs23\\bin\\runemacs.exe\" \"%1\""
</code></pre><h4>Tip #3: Goodbye Capslock</h4><p>If you use Emacs a lot, you will find that you have to use the Ctrl key a lot. You might find your left thumb getting strained after prolonged use. The easiest solution for this is to reassign a less used key as the Ctrl key. Most people choose the Caps Lock key for this purpose. It is surprisingly not that much useful and soon you will forget that such a key ever existed.</p><p><img
class="alignright" src="http://farm1.static.flickr.com/77/166430479_6c71422feb_m_d.jpg"></p><p>Whenever I searched, I found that most people swap the Ctrl and Caps Lock keys. However, this is irritating as I might still want to use the old Ctrl key if I press it accidentally. Here is how to <em>replace</em> Caps Lock with the Ctrl Key.</p><p>Copy the following lines to a .reg file say <code>replace_caps.reg</code> and open it to add the changes to the registry. Now just reboot and you are done!</p><pre><code>REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
</code></pre><p>Yes, it takes some time to &#8220;unlearn&#8221; and &#8220;learn&#8221; the new key position, but trust me it&#8217;s worth the effort.</p><h4>Tip #4: Use a Spell Checker</h4><p>A spell checker is something I feel should be a part of any editor. Here is how to enable on the fly spell checking in Emacs.</p><ol><li>Install <a
href="http://aspell.net/win32/">aspell</a></li><li>Add the following lines to your .emacs file (adjust the path to aspell accordingly)</li></ol><p>Elisp:</p><pre><code>;; aspell is the spell checker that works for me
(setq-default ispell-program-name "D:\\Arun\\Home\\bin\\aspell.exe")
(setq text-mode-hook '(lambda()
                         (flyspell-mode t)       ; spellchek (sic) on the fly
                         ))
</code></pre><h4>Tip #5: Setup a Postscript Printer</h4><p>By default, you can pretty-print all your documents directly from emacs. But this requires configuring a postscript printer. There is a nice package called Ghostscript which takes care of doing this.</p><ol><li><p>Download and install <a
href="http://pages.cs.wisc.edu/~ghost/doc/GPL/gpl860.htm">Ghostscript</a> from <a
href="http://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs860/gs860w32.exe">here</a> say at D:\gs</p></li><li><p>Download and install <a
href="http://pages.cs.wisc.edu/~ghost/gsview/get49.htm">GSView</a> from <a
href="http://mirror.cs.wisc.edu/pub/mirrors/ghost/ghostgum/gsv49w32.exe">here</a> say at D:\gs\gsview</p></li><li><p>Then add the following lines to your .emacs file:</p></li></ol><p>Elisp:</p><pre><code>(if (string= system-name "CORPLAPTP65") ; Works in office only
    (progn
      ;;  Windows printer
      (setq-default ps-lpr-command (expand-file-name "/gs/gsview/gsprint.exe"))
      (setq-default ps-printer-name t)
      (setq-default ps-printer-name-option nil)
      (setq ps-lpr-switches '("-query")) ; show printer dialog
      (setq ps-right-header '("/pagenumberstring load" ps-time-stamp-mon-dd-yyyy))))
</code></pre><p>Caveat: Be sure to switch to a light background color scheme before you print, else your fonts will be so light that they won&#8217;t be readable!</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2008/02/20/5-indespensible-tips-for-emacs-on-windows/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>Happy Organised 2008</title><link>http://www.arunrocks.com/blog/archives/2008/01/08/happy-organised-2008/</link> <comments>http://www.arunrocks.com/blog/archives/2008/01/08/happy-organised-2008/#comments</comments> <pubDate>Tue, 08 Jan 2008 06:24:22 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Pocketmod]]></category> <category><![CDATA[emacs]]></category> <category><![CDATA[productivity]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/archives/2008/01/08/happy-organised-2008/</guid> <description><![CDATA[The first New Year after marriage is always special.  It will be a lot quieter (and sober?) than one&#8217;s earlier outings. In Mangalore, most of the discs were either overcrowded (Zero Degrees?) or charging like hell (GoldFinch?). So we decided to go to Palki and have a nice buffet at the rooftop. What we [...]]]></description> <content:encoded><![CDATA[<p>The first New Year after marriage is always special.  It will be a lot quieter (and sober?) than one&#8217;s earlier outings. In Mangalore, most of the discs were either overcrowded (Zero Degrees?) or charging like hell (GoldFinch?). So we decided to go to Palki and have a nice buffet at the rooftop. What we didn&#8217;t know was that it offered an amazingly close view of the fireworks in the surrounding area. It was a great way to start the new year.</p><p><img
src="http://farm1.static.flickr.com/193/472855937_3086ea8513.jpg" alt="Beginnings"></p><p>Speaking of starts, for most of us January 1st is like a reset button. Or at least we wish it is. Here comes an opportunity to cut down on that chocolate addition or make a habit of paying bills on
time. They go by the ominous term &#8216;Resolutions&#8217;. For me, a self described procrastinator, I had to bring to speed my time planning tools to the brand new 2008. In case you are wondering, they are:</p><ul><li><a
href="http://www.pocketmod.com/">Hipster PDA/PocketMod</a></li><li>My customised-till-my-fingers-bled <a
href="http://ntemacs.sourceforge.net/">Emacs 23.0</a></li></ul><p>I printed out my Pocketmod from the website directly. I was using version 2 for the first time and loved the idea of being able to customize the front page with my details. You can have print your name and address printed rather than typing it each time.</p><p><img
src="http://farm1.static.flickr.com/56/134447135_e3cb18933f_m.jpg" alt="Sorry! couldn't get a photo for 2008" class="alignright" /></p><p>I&#8217;ve been reconverted to emacs from <a
href="notepad-plus.sourceforge.net/">Notepad++</a>, after seeing the very useful <a
href="http://orgmode.org/">Org</a> mode. Once again I have spent many, many hours cutomising the my .emacs file. When it comes to emacs the word customising is really misleading, it should be actually called reprogramming ;)</p><p><img
src="http://farm3.static.flickr.com/2064/2177456672_cf1ed8622e_m.jpg" alt="My Current Emacs Screen" class="alignleft" /></p><p>Actually, this time I have added some very neat features like TextMate-like snippet expansion upon pressing TAB, personal menu, windows Postscript printer support (Emacs prepares gorgeous printouts of code). They are very useful and I hope I will be able to blog about them soon. In fact, this post was written in Emacs using a <a
href="http://jblevins.org/projects/markdown-mode/">markdown</a> mode</p><p>So for all my readers out there here is wishing you and happy, prosperous and well-planned New Year!</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2008/01/08/happy-organised-2008/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss><!--
This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 6/11 queries in 0.003 seconds using disk

Served from: zoe.asmallorange.com @ 2010-09-03 03:31:14 -->