ArunRocks

Representing Anti-Monotonistic Tendencies
  • rss
  • Home
  • A little intro to Thrissur
  • Archives
    • Search
  • Resumé
  • About Me
    • Comment policy

Emacs Tip: A Key to open the Current Folder in Windows

Arun bhai | Tue, Jun 10, 2008

If the over-descriptive title was not enough, this is another one of my tips to use my favorite editor - 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 browse the folder of that file. Add the following lines to your .emacs files and so that by just pressing function key F12 you can immediately view its corresponding folder:

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 ;)

Bookmark this to del.icio.us | Digg | Furl | Netscape | Google Bookmarks | Technorati | reddit |

Comments
4 Comments »
Categories
General, Technical, emacs
Comments rss Comments rss
Trackback Trackback

5 Indispensable Tips for Emacs on Windows

Arun bhai | Wed, Feb 20, 2008

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’ 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.

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.

Tip 1: Starting off With a Prettier Emacs

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.

You can avoid this annoyance by making a simple registry modification. Create a new .reg file say set-frame-and-fonts.reg and copy paste the following lines. Open the file to add the changes to the registry. Restart Emacs and enjoy the difference!

Caveat: The lines above are my preferred colours, fonts and window positions. Your’s could be different. Please customize to your taste.

Tip #2: Add “Open In Emacs” option to all Files

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.

This .reg file add an “Open in Emacs” option in Windows Explorer when you right click on any file. Copy the following lines to a .reg file say Add-Emacs-To-Open-Any-File.reg 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 emacsclientw.exe resides in the same place where your runemacs.exe resides (right-clicking on the emacs icon, generally shows you this).

Tip #3: Goodbye Capslock

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.

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 replace Caps Lock with the Ctrl Key.

Copy the following lines to a .reg file say replace_caps.reg and open it to add the changes to the registry. Now just reboot and you are done!

Yes, it takes some time to “unlearn” and “learn” the new key position, but trust me it’s worth the effort.

Tip #4: Use a Spell Checker

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.

  1. Install aspell
  2. Add the following lines to your .emacs file (adjust the path to aspell accordingly)

Tip #5: Setup a Postscript Printer

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.

  1. Download and install Ghostscript from here say at D:\gs

  2. Download and install GSView from here say at D:\gs\gsview

  3. Then add the following lines to your .emacs file:

Caveat: Be sure to switch to a light background color scheme before you print, else your fonts will be so light that they won’t be readable!

Bookmark this to del.icio.us | Digg | Furl | Netscape | Google Bookmarks | Technorati | reddit |

Comments
12 Comments »
Categories
General, emacs
Comments rss Comments rss
Trackback Trackback

Happy Organised 2008

Arun bhai | Tue, Jan 8, 2008

The first New Year after marriage is always special. It will be a lot quieter (and sober?) than one’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’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.

Beginnings

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 ‘Resolutions’. 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:

  • Hipster PDA/PocketMod
  • My customised-till-my-fingers-bled Emacs 23.0

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.

Sorry! couldn't get a photo for 2008

I’ve been reconverted to emacs from Notepad++, after seeing the very useful Org 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 ;)

My Current Emacs Screen

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 markdown mode

So for all my readers out there here is wishing you and happy, prosperous and well-planned New Year!

Bookmark this to del.icio.us | Digg | Furl | Netscape | Google Bookmarks | Technorati | reddit |

Comments
No Comments »
Categories
General, Pocketmod, emacs, productivity
Comments rss Comments rss
Trackback Trackback

Your Email:

Categories

  • emacs
  • General
  • greasemonkey
  • indie
  • launchy
  • Pocketmod
  • productivity
  • py2exe
  • Reviews
    • Books
    • Movies
  • Short Stories
  • Technical
    • Gaming
      • Unni
    • Python
    • WordPress

Recent Posts

  • Ledger’s Joker Chills, Thrills and Entralls
  • Reading Hindu Online Made Better with Greasemonkey
  • Better Fonts Tip: Biggest Improvement in Ubuntu Appearance
  • Best Dialogs of Salim Kumar
  • Learning Pylons Through Tutorials

Recent Comments

  • Arun bhai on Best Dialogs of Salim Kumar
  • Thomas on Best Dialogs of Salim Kumar
  • Nidhish on Best Dialogs of Salim Kumar
  • abhilash on Learning Pylons Through Tutorials
  • Bookmarks about Ubuntu on Better Fonts Tip: Biggest Improvement in Ubuntu Appearance

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Bookmarks

del.icio.us/arun_ravindran I am arun_ravindran on del.icio.us
add arun_ravindran to your network Add me to your network
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox