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

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

Re: Reading in a variable list of strings


From: Mathias Dahl
Subject: Re: Reading in a variable list of strings
Date: Mon, 14 Mar 2005 13:21:41 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (windows-nt)

Florian von Savigny <sawitzky2000@yahoo.de> 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


reply via email to

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