From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vagn Johansen Newsgroups: gmane.emacs.help Subject: Re: anything.el and emacs lisp Date: Thu, 12 Jul 2007 20:46:21 +0200 Message-ID: References: <1184260464.570980.45090@g4g2000hsf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1184270593 28753 80.91.229.12 (12 Jul 2007 20:03:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Jul 2007 20:03:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 12 22:03:11 2007 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 1I94sX-0007vu-OT for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jul 2007 22:03:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I94sX-0002Zf-D8 for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jul 2007 16:03:09 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!uio.no!newsfeed1.uni2.dk!dfeeder1.cybercity.dk!dspool1.cybercity.dk!dreader2.cybercity.dk!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:zWWsXyDyBC+5+6KtpWfKIOIoEo4= Original-Lines: 18 Original-NNTP-Posting-Host: 85.81.86.122 Original-X-Trace: 1184265617 dreader2.cybercity.dk 7608 85.81.86.122:10465 Original-Xref: shelby.stanford.edu gnu.emacs.help:150058 X-Mailman-Approved-At: Thu, 12 Jul 2007 16:02:02 -0400 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:45647 Archived-At: weber writes: > (setq my-places '( > ( "Someproject" "c:/user/proj1/") > ( "Anotherone" "c:/user/proj2/"))) > > I want to match on "Someproject" but use "c:\user\proj1" on the > action. > Matching on the first element of the pair is just customizing anything- > sources like this: > > ((name . "Places") > (candidates . (lambda () (mapcar (lambda (x) (fst x)) my-places))) > (action . open-folder )) (defun open-folder (name) (find-file (cadr (assoc name my-places))))