E-Scribe : a programmer’s blog

About Me

PBX I'm Paul Bissex. I build web applications using open source software, especially Django. Started my career doing graphic design for newspapers and magazines in the '90s. Then wrote tech commentary and reviews for Wired, Salon, Chicago Tribune, and others you never heard of. Then I built operations software at a photography school. Then I helped big media serve 40 million pages a day. Then I worked on a translation services API doing millions of dollars of business. Now I'm building the core platform of a global startup accelerator. Feel free to email me.

Book

I co-wrote "Python Web Development with Django". It was the first book to cover the long-awaited Django 1.0. Published by Addison-Wesley and still in print!

Colophon

Built using Django, served with gunicorn and nginx. The database is SQLite. Hosted on a FreeBSD VPS at Johncompanies.com. Comment-spam protection by Akismet.

Elsewhere

Pile o'Tags

Stuff I Use

bitbucket, Django, Emacs, FreeBSD, Git, jQuery, LaunchBar, Markdown, Mercurial, OS X, Python, Review Board, S3, SQLite, Sublime Text, Ubuntu Linux

Spam Report

At least 236528 pieces of comment spam killed since 2008, mostly via Akismet.

Keeping emacs backup files tidy

In the shell, emacs is my editor of choice. However, it has one default behavior that has gotten in the way more often than it has helped -- automatic generation of backup files in the same directory as the original.

Emacs is great for making quick edits to files on the web server. But I don't want or need all those *~ files sitting around. The material is all in version control, so I can revert to any point in history already.

I went to the #emacs IRC channel on Freenode to ask about this, and was prompty handed a canned help message that led right to the solution to my problem: backup-directory-alist lets you specify a directory where backup files get saved.

A little googling yielded the following nice snippet from Sean B. Palmer which I prompty deployed in my .emacs file. Problem solved. Thanks, everyone!

;; Turn off the annoying default backup behaviour
(if (file-directory-p "~/.emacs.d/backup")
    (setq backup-directory-alist '(("." . "~/.emacs.d/backup")))
    (message "Directory does not exist: ~/.emacs.d/backup"))

Monday, February 2nd, 2009
+ +
3 comments

Comment from Andrew , later that day

Emacs is great for making quick edits to files on the web server.

Usually people like to complain that Emacs takes forever to start since it's an "OS," not a text editor. :)

Comment from simeon , later that day

Usually people like to complain that Emacs takes forever to start

Yeah back when Emacs stood for "Eight Megs And Constantly Swapping" this was a problem. Not so much nowadays...

Comment from m , 1 day later

Try M-x customize-group backup

The first item is "Make Backup Files". Turn it off.

Comments are closed for this post. But I welcome questions/comments via email or Twitter.