unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Jonas Bernoulli <jonas@bernoul.li>
Cc: Robert Pluim <rpluim@gmail.com>, 62207@debbugs.gnu.org
Subject: bug#62207: 29.0.60; Trying to remove non-existent key binding instead adds a binding
Date: Mon, 20 Mar 2023 17:25:35 -0400	[thread overview]
Message-ID: <jwvy1nrgmea.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87lejrqmzj.fsf@bernoul.li> (Jonas Bernoulli's message of "Mon, 20 Mar 2023 19:46:56 +0100")

> The other part hasn't landed on master yet.  I agree it shouldn't go on
> emacs-29, but would like to see it in master.  Stefan seems to have some
> objections, which I believe boil down to "nobody has demonstrated a real
> need yet, beside 'making the api complete'".

I can't remember exactly what "the other part" entails, but w.r.t
providing an optional arg that makes lookup-key ignores parents, I don't
think it would make the API complete (I can still see needs for yet more
optional arguments, most importantly one that doesn't look inside
`menu-item`s).

So I'd prefer to have a new lower-level function which does "the
minimum" but returns enough info that we can build something like
`lookup-key` on top of it.

I guess it would return 2 pieces of info: the binding that was found (if
any, potentially annotated with whether it was a default binding or
not), and the rest of the keymap.  Or maybe return the binding together
with the `cons` cell where that binding was found (i.e. along the lines
of what `member/memq` do).

> At this point it would be nice if there were some indication in what
> keymap the default binding, this-mode-map or parent-mode-map.  The UI
> could even allow directly jumping to the definition of the appropriate
> keymap.  Eventually it might even be possible to make the changes
> directly from the popup buffer.

`C-h k` tries to identify the keymap, but indeed it doesn't distinguish
between the keymap and its parent(s).  Patch welcome to improve this.


        Stefan






  reply	other threads:[~2023-03-20 21:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 16:07 bug#62207: 29.0.60; Trying to remove non-existent key binding instead adds a binding Jonas Bernoulli
2023-03-15 16:51 ` Jonas Bernoulli
2023-03-15 17:36   ` Robert Pluim
2023-03-15 18:12     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-15 22:26       ` Jonas Bernoulli
2023-03-17 21:09         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-20 18:46           ` Jonas Bernoulli
2023-03-20 21:25             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-03-15 17:13 ` Eli Zaretskii
2023-03-15 17:39   ` Robert Pluim
2023-03-15 18:02   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-17  8:23     ` Eli Zaretskii
2023-03-17  8:54       ` Robert Pluim
2023-03-17  9:55         ` Robert Pluim
2023-03-17 11:36           ` Eli Zaretskii
2023-03-17 13:20             ` Robert Pluim
2023-03-17 11:32         ` Eli Zaretskii
2023-03-17 13:20           ` Robert Pluim
2023-03-20 18:14             ` Jonas Bernoulli
2023-03-17 20:51           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-18  5:51             ` Eli Zaretskii
2023-03-18 14:05               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-18  9:43             ` Robert Pluim
2023-03-18 14:07               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-20  9:09                 ` Robert Pluim
2023-03-20 12:17                   ` Eli Zaretskii
2023-03-20 15:03                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-20 15:27                     ` Robert Pluim

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=jwvy1nrgmea.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=62207@debbugs.gnu.org \
    --cc=jonas@bernoul.li \
    --cc=monnier@iro.umontreal.ca \
    --cc=rpluim@gmail.com \
    /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 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).