From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Golden Newsgroups: gmane.emacs.help Subject: Re: lisp code to use short cuts to launch file Date: Mon, 20 Oct 2008 03:04:33 +0100 Organization: Orbital Laser Death Rays R Us Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: ger.gmane.org 1224488399 30037 80.91.229.12 (20 Oct 2008 07:39:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Oct 2008 07:39:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 20 09:41:02 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KrkiL-0003b0-0n for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Oct 2008 04:41:49 +0200 Original-Received: from localhost ([127.0.0.1]:33890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrkhF-0004ry-U3 for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Oct 2008 22:40:41 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.k-dsl.de!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: qBnedhERbHXm/74FpvBFcw.user.aioe.org Original-X-Complaints-To: abuse@aioe.org Original-NNTP-Posting-Date: Mon, 20 Oct 2008 02:04:33 +0000 (UTC) User-Agent: KNode/0.10.9 Original-Xref: news.stanford.edu gnu.emacs.help:163607 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58934 Archived-At: 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.