unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Misleading single "\" in Emacs Manual Section 25.3
Date: Tue, 16 Jul 2024 12:39:08 +0000	[thread overview]
Message-ID: <WXpNvXKIOed_ydU2L0wkqLuzR76N-3MDFRUH5bUkijhgT2L2-lZZg0NOTFlw_JcxPOoGqCsdLOD-NaViBQqxk0uHQGaH6gA3XnkcM-QZFp0=@protonmail.com> (raw)
In-Reply-To: <865xt5iq6k.fsf@gnu.org>

On Tuesday, July 16th, 2024 at 10:31 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 16 Jul 2024 08:50:15 +0000
> > From: Heime heimeborgia@protonmail.com
> > 
> > The Elisp documentation "25.3 Substituting Key Bindings in Documentation" states
> > that each '\' must be doubled when written in a string in Emacs Lisp.
> > 
> > I find this a bit confusing because the section is about writing within the documentation
> > string. Meaning that the "\" should be doubled.
> > 
> > Using "\[COMMAND]" will not work in the documentation. One has to use "\\[COMMAND]"
> > 
> > The commands in the section with a single "\" is misleading.
> 
> 
> I don't think they are misleading, since the text says right away that
> each backslash in the forms above needs to be doubled.

It is already confusing enough on how many \ are needed for some expressions to be
printed (e.g. for regex expressions).  

When the topic is about documentation strings, the commands should conform to what
one would type in the documentation string.  

After that, it can be stated that the string processing phase will strip away one layer
of backslashes.  It would be more understandable this way.  Some readers will initially 
think that they should write \= in their string directly.





  reply	other threads:[~2024-07-16 12:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16  8:50 Misleading single "\" in Emacs Manual Section 25.3 Heime
2024-07-16 10:31 ` Eli Zaretskii
2024-07-16 12:39   ` Heime [this message]
2024-07-16 13:36     ` Eli Zaretskii
2024-07-16 13:53       ` Heime
2024-07-16 14:21         ` Heime
2024-07-16 14:36           ` Eli Zaretskii
2024-07-16 15:21             ` Heime
2024-07-17  2:58               ` Stefan Monnier via Users list for the GNU Emacs text editor

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='WXpNvXKIOed_ydU2L0wkqLuzR76N-3MDFRUH5bUkijhgT2L2-lZZg0NOTFlw_JcxPOoGqCsdLOD-NaViBQqxk0uHQGaH6gA3XnkcM-QZFp0=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@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.
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).