all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Escaping a string for substitute-command-keys
Date: Sat, 5 Oct 2019 04:04:34 -0400	[thread overview]
Message-ID: <f324305e-4960-2a6f-20c3-5a240c8dbfb9@gmail.com> (raw)
In-Reply-To: <835zl364yx.fsf@gnu.org>

On 2019-10-05 03:12, Eli Zaretskii wrote:
>> Btw, it was surprising to me to see that very little code in Emacs actually takes advantage of this command-substitution facility in help-echo; most help-echo strings that mention commands actually hardcode the default binding.
> 
> Most probably because the call to substitute-command-keys there is a
> relatively recent addition.

Makes sense.

> I guess we need to add some feature to control whether help-echo gets
> run through substitute-command-keys, or add an alternative to
> help-echo that works exactly like it, but without substitutions.
> Patches welcome.

Sounds good, and I can work on the patch.  I think I like the first solution better, if we can come up with something elegant: the second case will force us to define priorities, and besides we already have kbd-help in addition to help-echo.

What about the following: before performing a conversion, substitute-command-keys could check a property of the string that it receives, say help-echo-conversion, and if that property is nil it would not perform the conversion.

Alternatively, there's the option of performing conversion only on those 'help-echo' properties that are string, and leaving (the output of) the ones that are functions untouched.

What do you think?
Clément.



  reply	other threads:[~2019-10-05  8:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 13:52 Escaping a string for substitute-command-keys Clément Pit-Claudel
2019-10-03 16:31 ` Eli Zaretskii
2019-10-03 16:46   ` Clément Pit-Claudel
2019-10-03 17:21     ` Eli Zaretskii
2019-10-03 18:28       ` Clément Pit-Claudel
2019-10-03 18:54         ` Eli Zaretskii
2019-10-04 13:56           ` Clément Pit-Claudel
2019-10-04 14:17             ` Eli Zaretskii
2019-10-05  4:03               ` Clément Pit-Claudel
2019-10-05  7:33                 ` Eli Zaretskii
2019-10-05 15:05                   ` Stefan Monnier
2019-10-05 15:59                     ` Eli Zaretskii
2019-10-05  4:06               ` Clément Pit-Claudel
2019-10-05  7:12                 ` Eli Zaretskii
2019-10-05  8:04                   ` Clément Pit-Claudel [this message]
2019-10-05  8:13                     ` Eli Zaretskii
2019-10-05  8:24                       ` Clément Pit-Claudel
2019-10-05  9:20                         ` Eli Zaretskii
2019-10-04 19:19         ` Stefan Monnier
2019-10-05 15:40           ` Basil L. Contovounesios
2019-10-05 16:06             ` Eli Zaretskii
2019-10-05 19:53               ` Basil L. Contovounesios
2019-10-06  2:57                 ` Clément Pit-Claudel
2019-10-06 17:21                 ` 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=f324305e-4960-2a6f-20c3-5a240c8dbfb9@gmail.com \
    --to=cpitclaudel@gmail.com \
    --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.