Thursday, September 27, 2012

Making Emacs Act More Like a Text Editor

Emacs used to be a great programmer's editor. It still is, but non-text features keep creeping in making it less usable for editing and viewing text. For example, doc-view mode makes emacs render a PDF, DVI, or PS file. But PDF and PS are text formats, so I can't imagine why I'd want emacs to render them--other tools do that well.
To make emacs better-behaved, it seems the following in one's .emacs file is sufficient:

(add-to-list 'auto-mode-alist '("\\.pdf\\'" . fundamental-mode))
(add-to-list 'auto-mode-alist '("\\.ps\\'" . fundamental-mode))
Thanks to Stefan Monnier at!topic/
My .emacs file (really, my emacs-custom.el which is loaded from my .emacs) has been growing since Fall 1988, and I don't see that changing, especially as new puppies start monkeying with emacs' behavior. Of course, I do trim detritus from time-to-time.
Actually there might be some stuff in there from my time at William and Mary, 1984-1986. Zippy says "yow."

No comments: