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

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

Re: combine-and-quote-strings


From: Philipp Stephani
Subject: Re: combine-and-quote-strings
Date: Tue, 14 Apr 2015 18:54:15 +0000

Pascal J. Bourguignon <address@hidden> schrieb am So., 12. Apr. 2015
um 13:05 Uhr:

> Philipp Stephani <address@hidden> writes:
>
> > Hi,
> >
> > the Lisp manual explains (in the section "Shell Arguments"):
> >
> >     The following two functions are useful for combining a list of
> >     individual command-line argument strings into a single string,
> >
> > This is about combine-and-quote-strings (and
> > split-strings-and-unquote).  However, combine-and-quote-strings can't
> > really be used for that purpose because it doesn't quote many shell
> > metacharacters.  The correct way to shell-quote a list of arguments is
> >
> >     (mapconcat #'shell-quote-argument ARGS " ")
> >
> > Should combine-and-quote-strings be reimplemented in terms of
> > shell-quote-argument?  The current definition doesn't seem to be optimal
> > for shell quoting because many inputs aren't properly quoted.
> >
> > Or is combine-and-quote-strings not intended for shell quoting at all
> > and the documentation should be adapted?
>
> The documentation ofcombine-and-quote-strings doesn't mention shell
> quoting at all.
>
>
True, but it sounds as if it could be used for shell quoting, and only
careful reading of the Elisp manual or the source code will tell otherwise.
At least I was initially confused about this. Maybe a warning could be
added to both the function documentation and the Elisp manual that these
functions are not intended for shell quoting?


reply via email to

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