Opening Frequently Accessed Files In Emacs

While browsing around in the EmacsWiki, I came across a nice way of quickly opening frequently accessed files. The idea is to put the target file in a register and then jump to the register. For example, I frequently open my steps file to record my walking and a tax file in which I list deductible expenses. I can preload the s and t registers with the locations of these files by adding the following to my init.el file.

(set-register ?s '(file . "~/medical/steps.org"))
(set-register ?t '(file . "~/org/tax2011.org"))

Then I can open them by jumping to the appropriate register. For instance, to open the tax file, I would type 【Ctrl+x r j t】.

To be sure, you can do the same thing with bookmarks and even have more descriptive names but I like this solution because it’s just a few keystrokes. Doubtless, Xah Lee would chide me for wasting keystrokes by not using function keys for this sort of operation but given the Mac keyboard it’s a method that works well for me.

Registers are a nice feature of Emacs and it’s worth investigating their uses. Perhaps I’ll write more on the subject later.

This entry was posted in General and tagged . Bookmark the permalink.