GNU bug report logs - #7563
23.2; `split-string-and-unquote' mis-documented / purpose unclear

Previous Next

Package: emacs;

Reported by: Dave Abrahams <dave <at> boostpro.com>

Date: Sun, 5 Dec 2010 21:24:02 UTC

Severity: minor

Found in version 23.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dave Abrahams <dave <at> boostpro.com>
Cc: 7563 <at> debbugs.gnu.org
Subject: bug#7563: 23.2; `split-string-and-unquote' mis-documented / purpose unclear
Date: Sat, 11 Dec 2010 20:50:34 +0200
> Cc: "7563-done <at> debbugs.gnu.org" <7563-done <at> debbugs.gnu.org>,
>  "1212-done <at> debbugs.gnu.org" <1212-done <at> debbugs.gnu.org>
> From: Dave Abrahams <dave <at> boostpro.com>
> Date: Sat, 11 Dec 2010 12:57:30 -0500
> 
> Sorry, let me precise: your fix is correct inasmuch as it fulfills your intention, but the text you were working on is still wrong because it says quite clearly that backslash escaping is supported, but as I have shown, it is not. 

Quoting with backslashes _is_ supported, in the Lisp string style.
Try this, for example:

  (split-string-and-unquote "\"foo\\\"bar\" bar") => ("foo\"bar" "bar")

> Specifically it specifically states they handle backslashes, and strongly implies that they have generally-useful semantics for interacting with arbitrary shells, when in fact they are essentially implementation details of call-/start-process whose semantics are only appropriate to an undocumented set of conditions set up in those two functions. 

I tried to make it more clear that these functions are mainly for
working with command-line arguments of call-/start-process.

> >>  * The functions' design still has nothing to do with shell quoting;
> >>    they are hard-coded to work with double-quotes and only
> >>    double-quotes, which is not guaranteed to work for an arbitrary
> >>    definition of "shell."
> > 
> > I believe the manual says precisely that.  If the problem is with
> > mentioning "shell", would removing that solve this difficulty?
> 
> It would certainly help

Done.




This bug report was last modified 14 years and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.