all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: david.chappaz@free.fr
To: help-gnu-emacs@gnu.org
Subject: Get a list with edit-and-eval-command
Date: Sun, 12 Feb 2012 17:25:15 +0100 (CET)	[thread overview]
Message-ID: <2f113867-1467-4df7-b6b0-f8c13872a615@zimbra62-e11.priv.proxad.net> (raw)
In-Reply-To: <9601423a-874e-4e7e-a2d7-a90c5ea80503@zimbra62-e11.priv.proxad.net>

Hi all,

I'm trying to get an elisp object (more specifically a list) from the minibuffer, using the function edit-and-eval-command, as documented in
http://www.gnu.org/software/emacs/manual/html_mono/elisp.html#Object-from-Minibuffer

For example say I first evaluate:
(setq wildcard '("*.c" "*.h" "*.v"))

Next I am trying to do something like:
(setq newwildcard (edit-and-eval-command  "Enter an expression: " (format "%s" wildcard))

but it does not achieves what I really want, which is to provide as initial argument a valid lisp list [e.g. '("*.c" "*.h" "*.v")] so no error is generated if the user simply hits [Enter]. The above generates double quotes and misses the single quote, which causes the problem.

Can anyone give me some insight to do this properly ?

Many thanks,
David.



       reply	other threads:[~2012-02-12 16:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9601423a-874e-4e7e-a2d7-a90c5ea80503@zimbra62-e11.priv.proxad.net>
2012-02-12 16:25 ` david.chappaz [this message]
2012-02-14  4:08   ` Get a list with edit-and-eval-command Kevin Rodgers

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

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

  git send-email \
    --in-reply-to=2f113867-1467-4df7-b6b0-f8c13872a615@zimbra62-e11.priv.proxad.net \
    --to=david.chappaz@free.fr \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.