[Top][All Lists]

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

Re: bug#1212: 23.0.60; split-string-and-unquote problems

From: Stefan Monnier
Subject: Re: bug#1212: 23.0.60; split-string-and-unquote problems
Date: Tue, 21 Oct 2008 22:04:51 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> > However, this describes roughly what the code does (which I kinda
>> > understood myself by reading it ;-), but does not explain under what
>> > circumstances would those functions be useful.  By looking at the uses
>> > of split-string-and-unquote, I deduced that the intended use is for
>> > taking apart shell command lines.  If that is not the intent, then
>> > what is it?
>> The intent is for the user to be able to enter in a minibuffer a list of
>> strings, where most of them should usually not need any quoting.
>> The most common use is to enter a list of arguments to pass to
>> a command.  Note that "arguments to pass to a command" (even if the
>> first element could be the command itself) is not the same as "shell
>> command line", since it does not include operators such as |, &, ;, $,
>> and `.

> Well, in that case my understanding of the intent of these functions
> was quite accurate.  Which also means that split-string-and-unquote
> should, indeed, handle quoting with a backslash and ".." quoting in
> the middle of a word, as in `foo" "bar'.  Right?

No.  Just because the arguments are passed to commands doesn't mean they
should use sh-style quoting.  Proof is, neither csh nor Tcl obey sh-style
quoting for the arguments to commands they run.
The list of strings will be passed to call-process or start-process
which ultimately will pass them to execv or somesuch: no shell in sight.


reply via email to

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