GNU bug report logs -
#105
(split-string-and-unquote (combine-and-quote-strings STRINGS)) fails on trivial case
Previous Next
Reported by: Joe Wells <jbw <at> macs.hw.ac.uk>
Date: Tue, 1 Apr 2008 03:05:06 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 105 <at> emacsbugs.donarmstrong.com (full text, mbox):
> The documentation strings for both split-string-and-unquote and
> combine-and-quote-strings state that they attempt to achieve this
> property:
>
> (split-string-and-unquote (combine-and-quote-strings strs)) == strs
>
> Here is a trivial case that they fail on; the following sexp wrongly
> evaluates to nil:
>
> (let ((l '("a b" "c")))
> (equal l
> (split-string-and-unquote (combine-and-quote-strings l))))
I think this is a docstring mistake. IIUC, the equation
(split-string-and-unquote (combine-and-quote-strings strs)) == strs
only holds if STRS is a list containing a single string. The point the
docstrings are trying to make is that combine-and-quote-strings performs
string quoting, while split-string-and-unquote performs unquoting.
If there are no objections to this interpretation, I'll check in a doc
fix shortly.
This bug report was last modified 17 years and 105 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.