all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pankaj Jangid <pankaj@codeisgreat.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: How to actually print single ‘\’ character?
Date: Wed, 23 Dec 2020 22:14:06 +0530	[thread overview]
Message-ID: <878s9otquh.fsf@codeisgreat.org> (raw)
In-Reply-To: <E595DE50-0AB2-4CBE-99C9-F447FC1A8223@gnu.org> (Eli Zaretskii's message of "Wed, 23 Dec 2020 14:35:09 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> Now I have confusion with single backslash. See following two forms,
>> their output and return values:
>> 
>> (message "this \\ is a single embedded backslash") ⊣ "this \ is a
>> single
>> embedded backslash" ⇒ "this \\ is a single embedded backslash"
>> 
>> (message "this \ is a single embedded backslash") ⊣ "this is a single
>> embedded backslash" ⇒ "this is a single embedded backslash"
>> 
>> Why the output and return same for string with single backslash?
>
> Because the return value should be suitable for the Lisp reader.

Got it.

whatever is the output (print), the consumer of the return value should
be able to produce the same output. i.e.

(message "this \ is a single embedded backslash")

and

(message (message "this \ is a single embedded backslash"))

should produce same output.



  reply	other threads:[~2020-12-23 16:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23  5:21 How to actually print single ‘\’ character? Pankaj Jangid
2020-12-23  8:08 ` Lars Ingebrigtsen
2020-12-23 10:04   ` Pankaj Jangid
2020-12-23 10:29     ` Eli Zaretskii
2020-12-23 11:55       ` Pankaj Jangid
2020-12-23 12:35         ` Eli Zaretskii
2020-12-23 16:44           ` Pankaj Jangid [this message]
2020-12-23  8:17 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878s9otquh.fsf@codeisgreat.org \
    --to=pankaj@codeisgreat.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.