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


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Oleh <ohwoeowho <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; unexpected (prin1-to-string '(foo "bar") t)
Date: Thu, 30 Oct 2014 17:58:39 +0100
Hi,

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).

I want to use the NOESCAPE option to obtain instead of:

    (prin1-to-string '(foo.bar)) => "(foo\\.bar)"

this output:

    (prin1-to-string '(foo.bar) t) => "(foo.bar)"

But the downside is that the strings are unquoted as well:

    (prin1-to-string '(foo "bar") t) => "(foo bar)"

Please let me know if it's a bug or not, and maybe suggest how I can
obtain the behavior of (prin1-to-string x t) without unquoting the strings in x.

regards,
Oleh




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.