October 26th, 2007 by Rob Christie · 1 Comment
Every few months you see a thread on the emacs news groups polling to see the age or occupation of the users. Recently someone sent out a link on gnu.emacs.help to a site called BuddyMapping with a map for Emacs Users. I have always loved maps, and I am a sucker for these map mash-ups, especially when there is no registration required in order to add yourself.
The thread also points out that the Emacs Wiki contains a list of Emacs User Locations (in text form of course). There is also a link to an Emacs Flickr tag.
Tags:misc · news
October 7th, 2007 by Ryan McGeary · 28 Comments
I give up. During the past 6 years of my emacs career, my .emacs initialization file grew to embarrassing levels. As of this morning, it is well over 1000 lines and is a looming burden of disorganization. Startup time is poor, customizations exist for modes that I don’t use anymore (ahem, csharp-mode), and it has been this way for too long.
Today, I am declaring .emacs bankruptcy.
Akin to email bankruptcy, I’m blowing everything away and starting over. Only as I realize a need for something is it going back in. I’m also starting with a better organization scheme. My intent is to have a .emacs file with nothing but load-path additions and requires.
[Read more →]
Tags:misc
September 30th, 2007 by Ryan McGeary · 11 Comments
Tab characters used as indentation of source code is a pet peeve of mine. Add this to your emacs initialization to make sure all indentation uses spaces instead.
;; I hate tabs!
(setq-default indent-tabs-mode nil)
Now, if you also use tab completion everywhere, someday, you’ll want to actually insert a real <tab> character (ASCII 9), but won’t be able too. Quoted-insert to the rescue. Type C-q C-i to insert a horizontal tab character.
Note: Even though, I’ve aired my religious preference on this topic, my intention is not to start a war but to teach those who like spaces how to configure emacs (Yes, I’ve read the heated material on the subject).
Tags:newbie · quick · tips
August 27th, 2007 by Ryan McGeary · 1 Comment
For a newcomer to emacs, learning the default set of keybindings can be daunting. There’s no substitute for C-h b (describe-bindings) and C-h k (describe-key), but sometimes it’s just easier to learn visually.

Tags:newbie · quick · tips
August 7th, 2007 by Rob Christie · 2 Comments
When show-paren-mode is enabled a matching parenthesis is highlighted based on the location of point (i.e., when your cursor is on a parenthesis).
You can tweak the behaviour of this minor mode by adjusting show-paren-style and the show-paren-delay. There are three styles to choose from:
- parenthesis – shows the matching paren
- expression – shows the entire expression enclosed by the paren, and
- mixed – shows the matching paren if it is visible, and the expression otherwise.
To obtain this behaviour, add the following to your .emacs file:
Tags:newbie · quick · tips
July 21st, 2007 by Ryan McGeary · 6 Comments
Rob recently pointed me to rcodetools and its included emacs integration. Specifically, I’ve only had the chance to play with xmpfilter, but so far, I’m very impressed. Let’s use it to annotate lines in a ruby buffer with intermediate results.
[Read more →]
Tags:faves · reviews · ruby
June 10th, 2007 by Rob Christie · 10 Comments
The emacs-rails package turns emacs into a Ruby on Rails IDE. To put it simply, I love the package. It gets me excited to see this much active development for an emacs mode. The emacs wiki has a laundry list of the functionality that the mode provides. I don’t think a single blog post can do the functionality justice, so I just want to hightlight a few of the features below (and expand on other features in later posts). [Read more →]
Tags:faves · rails · reviews · ruby
June 7th, 2007 by Ryan McGeary · 3 Comments
The delete-blank-lines function is a simple yet handy tool to have in your bag of tricks. It is bound to C-x C-o. There isn’t a whole lot of magic surrounding it’s usage, so I’ll just quote the built-in help directly:
On blank line, delete all surrounding blank lines, leaving just one.
On isolated blank line, delete that one.
On nonblank line, delete any immediately following blank lines.
Before:
After:
Tags:quick · tips
June 3rd, 2007 by Rob Christie · 9 Comments
Emacs 22 was officially released yesterday.
Emacs version 22 includes GTK+ toolkit support, enhanced mouse support, a new keyboard macro system, improved Unicode support, and drag-and-drop operation on X, plus many new modes and packages including a graphical user interface to GDB, Python mode, the mathematical tool Calc, the remote file editing system Tramp, and more.
You can get it here.
Tags:news
May 29th, 2007 by Ryan McGeary · 1 Comment
Ever wonder how people keep such organized ChangeLog files in the root of their source trees? I’m sure some are just anal enough to manually manage them. I know I’ve done so on smaller projects, but I find it too much of a hassle for anything larger.
So, what do people use on larger projects? Believe it or not, there are actually GNU conventions for styling these files, and emacs includes an add-log package to help adhere to these conventions.
The command add-change-log-entry-other-window (C-x 4 a) automatically adds a new entry to the closest change log file found up the parent directory hierarchy. If none exists, a new change log file is created in your current directory, and the formatting is organized for you:

The command vc-update-change-log (C-x v a) finds the change log file and add entries from the recent version control logs. Apparently, this only works with RCS or CVS. For subversion, you can try vc-comment-to-change-log (Emacs 21) or log-edit-comment-to-change-log (Emacs 22), but this might require some customization to suit you.
To change the email address listed in your change log entries, edit the user-mail-address variable. To change the default change log file name, edit the change-log-default-name variable.
(setq user-mail-address "ryan@example.com") ;; default: user@host
(setq change-log-default-name "CHANGELOG") ;; default: ChangeLog
Some might say that keeping a ChangeLog file is defeated by public subversion repositories. I tend to agree for most circumstances, but there are some cases where a local, easily readable ChangeLog file is a good idea. Besides, it’s the cool thing to do.
The emacs manual has more information on change logs.
Tags:quick · tips