From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: Reading in a variable list of strings Date: Mon, 14 Mar 2005 13:21:41 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1110803440 20940 80.91.229.2 (14 Mar 2005 12:30:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Mar 2005 12:30:40 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 14 13:30:39 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DAoiR-0002zv-If for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Mar 2005 13:30:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAoy7-00064k-Fc for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Mar 2005 07:46:47 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-X-Trace: individual.net C9SMOrY+7MVGMcUzOAiEVg24UAu8RDBU4j/nvuVo1bT6+mKCk4 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:5mhbYTTnmK+HZ9f7zom4OWhVpQg= Original-Xref: shelby.stanford.edu gnu.emacs.help:129257 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.help:24809 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24809 Florian von Savigny writes: > I am writing (better, trying to write) a function the core of which > is call-process. The problem is that I would like to be able to > supply a variable number of arguments to the process called, by user > input. > > I have no clear idea of how to read in an unknown-length list of > strings. It must be something with (while ...) and (read-string > ...), but (while what?), i. e. how can the user say he's done now? > > For the moment, I am reading in just one string and splitting it at > spaces, but this is quick and dirty at best. How about something like this: (while (not (string-equal "" (setq test (read-string "Enter string. and press enter. (When ready, just input an empty string: "))))) The prompt could be better, but you should get the picture. /Mathias