[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: anything.el and emacs lisp
From: |
weber |
Subject: |
Re: anything.el and emacs lisp |
Date: |
Thu, 12 Jul 2007 12:16:48 -0700 |
User-agent: |
G2/1.0 |
On 12 jul, 15:46, Vagn Johansen <gonz...@hotmail.com> wrote:
> weber <hug...@gmail.com> 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))))
Yep, works beautifuly.
Many thanks Vagn!
Regards,
weber