unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18909: 24.4.50; unexpected (prin1-to-string '(foo "bar") t)
@ 2014-10-30 16:58 Oleh
  2014-10-31 18:16 ` Stefan Monnier
  2014-10-31 19:21 ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: Oleh @ 2014-10-30 16:58 UTC (permalink / raw)
  To: 18909

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-10  3:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-30 16:58 bug#18909: 24.4.50; unexpected (prin1-to-string '(foo "bar") t) Oleh
2014-10-31 18:16 ` Stefan Monnier
2014-10-31 19:21 ` Andreas Schwab
2018-02-10  3:10   ` Noam Postavsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).