From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Get a list with edit-and-eval-command Date: Mon, 13 Feb 2012 21:08:26 -0700 Message-ID: References: <9601423a-874e-4e7e-a2d7-a90c5ea80503@zimbra62-e11.priv.proxad.net> <2f113867-1467-4df7-b6b0-f8c13872a615@zimbra62-e11.priv.proxad.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1329192454 6001 80.91.229.3 (14 Feb 2012 04:07:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2012 04:07:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 14 05:07:32 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rx9fv-0007gt-MM for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Feb 2012 05:07:31 +0100 Original-Received: from localhost ([::1]:40725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rx9fv-0007u1-2o for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Feb 2012 23:07:31 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:54378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rx9fp-0007s1-13 for help-gnu-emacs@gnu.org; Mon, 13 Feb 2012 23:07:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rx9fn-0006lz-Rz for help-gnu-emacs@gnu.org; Mon, 13 Feb 2012 23:07:25 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:58451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rx9fn-0006lo-Mx for help-gnu-emacs@gnu.org; Mon, 13 Feb 2012 23:07:23 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Rx9fk-0007WQ-N2 for help-gnu-emacs@gnu.org; Tue, 14 Feb 2012 05:07:20 +0100 Original-Received: from c-71-237-25-24.hsd1.co.comcast.net ([71.237.25.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Feb 2012 05:07:20 +0100 Original-Received: from kevin.d.rodgers by c-71-237-25-24.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Feb 2012 05:07:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-25-24.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.26) Gecko/20120129 Thunderbird/3.1.18 In-Reply-To: <2f113867-1467-4df7-b6b0-f8c13872a615@zimbra62-e11.priv.proxad.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83743 Archived-At: On 2/12/12 9:25 AM, david.chappaz@free.fr wrote: > 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 ? Do not pass a string as the COMMAND argument to edit-and-eval-command. (edit-and-eval-command "Edit and eval: " '(quote ("*.c" "*.h" "*.v"))) or equivalently (edit-and-eval-command "Edit and eval: " (quote '("*.c" "*.h" "*.v"))) -- Kevin Rodgers Denver, Colorado, USA