unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: weber <hugows@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: anything.el and emacs lisp
Date: Thu, 12 Jul 2007 12:16:48 -0700	[thread overview]
Message-ID: <1184267808.044579.166930@57g2000hsv.googlegroups.com> (raw)
In-Reply-To: <uabu1v4si.fsf@hotmail.com>

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

      reply	other threads:[~2007-07-12 19:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-12 17:14 anything.el and emacs lisp weber
2007-07-12 18:46 ` Vagn Johansen
2007-07-12 19:16   ` weber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1184267808.044579.166930@57g2000hsv.googlegroups.com \
    --to=hugows@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).