GNU bug report logs - #18909
24.4.50; unexpected (prin1-to-string '(foo "bar") t)

Previous Next

Package: emacs;

Reported by: Oleh <ohwoeowho <at> gmail.com>

Date: Fri, 31 Oct 2014 15:41:02 UTC

Severity: minor

Tags: notabug

Found in version 24.4.50

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Oleh <ohwoeowho <at> gmail.com>
Cc: 18909 <at> debbugs.gnu.org
Subject: bug#18909: 24.4.50; unexpected (prin1-to-string '(foo "bar") t)
Date: Fri, 31 Oct 2014 20:21:00 +0100
Oleh <ohwoeowho <at> gmail.com> writes:

> To my surprise,
>
>     (prin1-to-string '(foo "bar") t)
>
> evaluates as "(foo bar)". This seems like a bug to me, since it doesn't
> conform to the doc (it's not the printed representation of the OBJECT any more).

"This function outputs quoting characters when necessary to make output
that `read' can handle, whenever possible, unless the optional second
argument NOESCAPE is non-nil."

Escaping is about _all_ quotation, not only the backslash.  It's the
difference between prin1 and princ.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




This bug report was last modified 7 years and 103 days ago.

Previous Next


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