all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* lisp code to use short cuts to launch file
@ 2008-10-19 18:22 Graham Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Graham Smith @ 2008-10-19 18:22 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: lisp code to use short cuts to launch file
       [not found] <mailman.1525.1224440536.25473.help-gnu-emacs@gnu.org>
@ 2008-10-19 22:51 ` Xah
  2008-10-20  2:04 ` David Golden
  1 sibling, 0 replies; 3+ messages in thread
From: Xah @ 2008-10-19 22:51 UTC (permalink / raw)
  To: help-gnu-emacs

On Oct 19, 11:22 am, "Graham Smith" <myotis...@gmail.com> 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.

perhaps you mean something like this?

; open my unicode template with F8 key
(global-set-key (kbd "<f8>")
  (lambda () (interactive) (find-file "~/my_unicode_template.txt")))

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: lisp code to use short cuts to launch file
       [not found] <mailman.1525.1224440536.25473.help-gnu-emacs@gnu.org>
  2008-10-19 22:51 ` lisp code to use short cuts to launch file Xah
@ 2008-10-20  2:04 ` David Golden
  1 sibling, 0 replies; 3+ messages in thread
From: David Golden @ 2008-10-20  2:04 UTC (permalink / raw)
  To: help-gnu-emacs

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.









^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-20  2:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1525.1224440536.25473.help-gnu-emacs@gnu.org>
2008-10-19 22:51 ` lisp code to use short cuts to launch file Xah
2008-10-20  2:04 ` David Golden
2008-10-19 18:22 Graham Smith

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.