Subject: 24.4.50; unexpected (prin1-to-string '(foo "bar") t)

From: Oleh <[email-masked]>
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