Create aliases in emacs?
I'm not really clear on what you're asking for. I store my commonly-used files in registers in my .emacs:
(set-register ?c '(file . "c:/data/common.txt"))(set-register ?f '(file . "c:/data/frequent.txt"))
Then I can jump to a file with jump-to-register
(C-x r j
):
For example, "C-x r j c
" takes me to c:/data/common.txt
(loading it if necessary).
Is that what you're looking for?
If you want an alias to a function, you use defalias
:
(defalias 'nuke 'delete-trailing-whitespace)
But if you're complaining that Emacs's function names are too long, you should look into partial-completion-mode
. With that turned on,
M-x d-t-w [RET]
will run delete-trailing-whitespace
.
Here's what you need --
Define bookmarks that correspond to contexts you want to revisit. With Bookmark+ this need not be just a file. It can also be a whole Emacs desktop or a Dired buffer with its markings (saved), a set of other bookmarks,...
Use Icicles together with Bookmark+. Whenever you use C-x C-f etc. to visit a file, you can also visit a file or directory bookmark (complete against the bookmark name). Just hit C-x m when you are in the minibuffer for file-name completion.