Search code examples
emacslispbookmarks

Long name aliases for file and directory paths in emacs


I read in the Emacs documentation that Emacs supports storing file names in registers that allows a user to quickly retrieve them via the command C-x r j r, where r is the name of the register. However, this is apparently limited to single character register names.

E.g. The following example works:

(set-register ?c '(file . "/gd/gnu/emacs/19.0/src/ChangeLog"))

i.e. it allows me to visit the file ChageLog above by just typing C-x r j z.

However, if I try to store the path to the above file in a register with a longer name, as in:

(set-register ?clog '(file . "/gd/gnu/emacs/19.0/src/ChangeLog"))

I get the following error message from he Lisp interpreter:

Invalid read syntax: "?"

My question then is: Is there a (easy) way of storing file names (and directory paths) in emacs using long name aliases, so that I can quickly visit them? (for editing a file, or loading it in dired).

Thanks


Solution

  • See Bookmarks.