[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lisp code to use short cuts to launch file
From: |
David Golden |
Subject: |
Re: lisp code to use short cuts to launch file |
Date: |
Mon, 20 Oct 2008 03:04:33 +0100 |
User-agent: |
KNode/0.10.9 |
Graham Smith wrote:
> When I used emacs before, I used some code in .emacs that allowed me
> to open a file using a shortcut name, the path and file associated
> with the shortcut being set up in .emacs.
>
> Of course now that I want to use it again, I can't find any reference
> to the code I need to use.
>
> Can someone tell me what it is I need to use.
>
> Many thanks,
>
> Graham
Probably nothing to do with windoze explorer shell "shortcut" files...
One thing you might do is associate short filenames with longer real
files with your own file-name-handler (see file-name-handler-alist).
That all seems like a lot of boilerplate to code up though.
so.. why bother? environment variables are usable in vaguely recent gnu
emacs (not sure what part actually implements it, might be tramp, might
be core, either way, they work...)
So, if you want a bunch of "shortcut" pseudo-filenames, then just set a
bunch of env vars in your .emacs (or elsewhere, like your
shell .profile, seeing as they're just as handy outside emacs) e.g.
in .emacs
(setenv "inky" "/home/david/src/inky-0.9.7/inkymain.c")
Then you can do e.g.
C-x C-f C-S-backspace $inky
to open it. (C-S-backspace just to clear away the default path)
They even tab-complete.