all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Juri Linkov <juri@linkov.net>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	Sean Whitton <spwhitton@spwhitton.name>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: master a6a5d6a: Move 'revert-buffer' global binding to 'C-x g g'
Date: Wed, 10 Mar 2021 12:33:38 -0600	[thread overview]
Message-ID: <CADwFkm=c1sSbn9GhyKRHaZog_zQy9X8hDDgU9ROM70KPT1bisQ@mail.gmail.com> (raw)
In-Reply-To: <87lfauq5tw.fsf@mail.linkov.net>

Juri Linkov <juri@linkov.net> writes:

>> I don't know what notation to use here though.  Maybe something like:
>>
>>     \\[cmd]  -> works as today
>>     \\[=C-h] -> just adds the formatting to the exact string
>>     \\[+cmd] -> adds both the key binding and its M-x form
>>
>> (This would of course break for symbols starting with = or +.)
>
> Maybe displaying both the keybinding and the command name should be
> defined by a command symbol's property like 'advertised-binding'
> defines the default keybinding to display:
>
>   (put 'revert-buffer :advertised-binding "M-x revert-buffer or C-x x g")

Good idea; it has the benefit that it would be more consistent.  It
would also be nice to add a corresponding `declare'-form.

But we should be careful to make it to also respect local bindings, for
example `revert-buffer' is bound to "g" in `special-mode-map'.

I'm thinking out loud here, but perhaps in some cases we don't want
consistency?  Could it be different in some situations?  Perhaps we
could first review some examples, to see if consistency is indeed what
always we want.  If it always makes sense, then your proposal is a
no-brainer.

Do we have any other commands than `revert-buffer' that could be
candidates for such a property?  I'm asking because it might be useful
to review them with consistency in mind too.



  reply	other threads:[~2021-03-10 18:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210207123046.20692.80429@vcs0.savannah.gnu.org>
     [not found] ` <20210207123048.3D5A8211A5@vcs0.savannah.gnu.org>
2021-03-10  2:53   ` master a6a5d6a: Move 'revert-buffer' global binding to 'C-x g g' Stefan Kangas
2021-03-10  3:04     ` Stefan Monnier
2021-03-10  4:56       ` Stefan Kangas
2021-03-10 17:23         ` Juri Linkov
2021-03-10 18:33           ` Stefan Kangas [this message]
2021-03-10 19:13             ` Juri Linkov
2021-03-11 16:19         ` Stefan Kangas
2021-03-11 16:56     ` Dmitry Gutov
2021-03-11 17:22       ` Stefan Kangas

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='CADwFkm=c1sSbn9GhyKRHaZog_zQy9X8hDDgU9ROM70KPT1bisQ@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=spwhitton@spwhitton.name \
    /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.