help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: anything.el and emacs lisp


From: Vagn Johansen
Subject: Re: anything.el and emacs lisp
Date: Thu, 12 Jul 2007 20:46:21 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt)

weber <hugows@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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]