January 7th, 2008 by Rob Christie · 18 Comments
Recently, I have been doing more remote pair programming at my day job, and I was copying some code snippets into pastie. Pastie is a site that allows you to share code snippets with nice syntax highlighting. One thing led to another, and next I was searching for emacs integration with pastie. I found it here, but unfortunately the lisp package no longer seemed to work. It turned out that the package just needed to support a minor change to the pastie API. I have fixed it, and added support for sniffing more of the emacs modes associated with Ruby on Rails and java. Here is the updated version of pastie.el. (Note: After publishing I added it to the emacs wiki based on a user’s suggestion: pastie.el). The package has the following functions:
pastie-buffer – Posts the current buffer as a new paste at pastie.caboo.se.
pastie-region – Posts the selected region as a new paste at pastie.caboo.se.
pastie-get – Fetches the contents of a paste from pastie.caboo.se into a new buffer.
Tags:misc · rails · ruby
October 26th, 2007 by Rob Christie · 2 Comments
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 · 30 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