all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: 42207@debbugs.gnu.org
Subject: bug#42207: 28.0.50; (where-is-internal) reports incorrect binding
Date: Sat, 04 Jul 2020 16:01:50 -0700	[thread overview]
Message-ID: <87o8ourijl.fsf@jpl.nasa.gov> (raw)

Hi. I'm using a pretty recent emacs built from git, although I don't
think this bug is a recent regression. From a user perspective, the
issue looks like this:

1. emacs -Q
2. Open any .py file, or just M-x python mode
3. M-x forward-se [TAB]

Step 3 asks emacs to complete. There're two matches: forward-sexp and
forward-sentence. Emacs also helpfully reports the associated bindings
with each command because suggest-key-bindings is not nil. It says
that the binding for forward-sentence is M-e, which is NOT the case
here: M-e is python-nav-forward-block.

Digging a bit, I see that the issue is that we call (where-is-internal)
in simple.el, and this is the issue:

  (key-description (where-is-internal 'forward-sentence nil t))

returns

  "M-e", even in python-mode

This maybe is related to the way this keymap is defined. python-mode-map is

  (keymap
   .... keys keys keys ...
   (remap keymap
          (mark-defun . python-mark-defun)
          (backward-up-list . python-nav-backward-up-list)
          (forward-sentence . python-nav-forward-block)
          (backward-sentence . python-nav-backward-block))
   ...
  )

I haven't read about this remap thing yet, and the docstring for
(where-is-internal) does have a NO-REMAP option, but "M-e" is reported
regardless of the value of NO-REMAP.

Thanks.





Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/28.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.0.50/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/28.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.0.50/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs-snapshot-MVBGWo/emacs-snapshot-20200426+emacs-27.0.91-703-g453ada0309d=.
 -fstack-protector-strong -Wformat -Werror=format-security -Wall
 -fno-omit-frame-pointer' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
 LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER
LCMS2 GMP

Important settings:
  value of $LC_ALL: C
  value of $LANG: C
  locale-coding-system: nil





             reply	other threads:[~2020-07-04 23:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-04 23:01 Dima Kogan [this message]
2021-10-19 23:43 ` bug#42207: 28.0.50; (where-is-internal) reports incorrect binding 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=87o8ourijl.fsf@jpl.nasa.gov \
    --to=dima@secretsauce.net \
    --cc=42207@debbugs.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.