* (split-string-and-unquote (combine-and-quote-strings STRINGS)) fails on trivial case
@ 2008-04-01 1:17 Joe Wells
0 siblings, 0 replies; 2+ messages in thread
From: Joe Wells @ 2008-04-01 1:17 UTC (permalink / raw)
To: bug-gnu-emacs
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 hope this problem report is helpful.
Joe
======================================================================
In GNU Emacs 22.2.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
of 2008-04-01 on artemis
Windowing system distributor `The X.Org Foundation', version 11.0.70000000
configured using `configure '--prefix=/home/jbw/local4' '--enable-debug' '--disable-nls' '--with-x-toolkit=gtk' 'CFLAGS=-O0 -g3 -ggdb -fno-crossjumping -DGLYPH_DEBUG=1''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: en_US.UTF-8
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: jbw
value of $LANG: nil
locale-coding-system: utf-8
default-enable-multibyte-characters: t
--
Heriot-Watt University is a Scottish charity
registered under charity number SC000278
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: (split-string-and-unquote (combine-and-quote-strings STRINGS)) fails on trivial case
@ 2008-04-07 5:31 Chong Yidong
0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2008-04-07 5:31 UTC (permalink / raw)
To: Joe Wells; +Cc: 105, emacs-devel
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-07 5:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-01 1:17 (split-string-and-unquote (combine-and-quote-strings STRINGS)) fails on trivial case Joe Wells
-- strict thread matches above, loose matches on Subject: below --
2008-04-07 5:31 Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.