Package: emacs;
Reported by: Omar Antolín Camarena <omar <at> matem.unam.mx>
Date: Fri, 4 Dec 2020 01:01:02 UTC
Severity: normal
Tags: fixed
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45035 in the body.
You can then email your comments to 45035 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#45035
; Package emacs
.
(Fri, 04 Dec 2020 01:01:02 GMT) Full text and rfc822 format available.Omar Antolín Camarena <omar <at> matem.unam.mx>
:bug-gnu-emacs <at> gnu.org
.
(Fri, 04 Dec 2020 01:01:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Omar Antolín Camarena <omar <at> matem.unam.mx> To: bug-gnu-emacs <at> gnu.org Subject: 28.0.50; Command completion annotations show minibuffer keybindings Date: Thu, 03 Dec 2020 19:00:03 -0600
If from M-x you switch to the *Completions* buffer, it will show keybindings as annotations next to the command names. Unfortunately, it shows the key bindings that are active in the minibuffer, while it would be more useful to show the keybindings active in the buffer in which you pressed M-x. Here's a simple recipe to see the issue from emacs -Q: Run emacs -Q. You will have eval-print-last-sexp bound to C-j in the scratch buffer, and minibuffer-complete-and-exit bound to C-j in the minibuffer, of course. Try this: while in the scratch buffer, type M-x and part of either of those two commands, and then press M-v to switch to the *Completions* buffer. For eval-print-last-sexp you'll see no annotation, and for minibuffer-complete-and-exit you'll see C-j. This illustrates the fact that the key bindings in the annotation are those from the minibuffer. The problem is that when the function read-extended-command--annotation is called, the minibuffer is active. If people agree that it would be better to show the key bindings in the last buffer active before the minibuffer, one way to get this behavior is by modifying minibuffer-completion-help. That function obtains the annotation-function metadatum and stores it in a variable called afun. The form that actually calls afun could be wrapped in with-minibuffer-selected-window, for example. In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2020-10-13, unofficial emacs-snapshot build: http://emacs.ganneff.de/, git commit 8d241e8840fdb02dcfce52425626dd8f2125e51a built on runner-f98bf451-project-26-concurrent-0 Repository revision: 477b2e1134f358938ef4e9cff151d59f0c4ff8e8 Repository branch: HEAD Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Debian GNU/Linux 10 (buster) 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=/builds/joerg/emacs/buster_amd64/emacs-snapshot-20200927+emacs-27.1-2446-g8d241e8840=. -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 PDUMPER LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: minibuffer-electric-default-mode: t flimenu-global-mode: t flimenu-mode: t magit-auto-revert-mode: t auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t show-paren-mode: t electric-pair-mode: t beginend-global-mode: t beginend-prog-mode: t global-dot-mode: t dot-mode: t marginalia-mode: t icomplete-vertical-mode: t icomplete-mode: t gcmh-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: ~/my-elisp-packages/completing-history/completing-history hides ~/.emacs.d/my-lisp/completing-history /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox hides /usr/share/emacs/28.0.50/lisp/org/ox /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-texinfo hides /usr/share/emacs/28.0.50/lisp/org/ox-texinfo /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-publish hides /usr/share/emacs/28.0.50/lisp/org/ox-publish /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-org hides /usr/share/emacs/28.0.50/lisp/org/ox-org /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-odt hides /usr/share/emacs/28.0.50/lisp/org/ox-odt /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-md hides /usr/share/emacs/28.0.50/lisp/org/ox-md /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-man hides /usr/share/emacs/28.0.50/lisp/org/ox-man /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-latex hides /usr/share/emacs/28.0.50/lisp/org/ox-latex /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-icalendar hides /usr/share/emacs/28.0.50/lisp/org/ox-icalendar /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-html hides /usr/share/emacs/28.0.50/lisp/org/ox-html /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-beamer hides /usr/share/emacs/28.0.50/lisp/org/ox-beamer /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ox-ascii hides /usr/share/emacs/28.0.50/lisp/org/ox-ascii /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org hides /usr/share/emacs/28.0.50/lisp/org/org /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-version hides /usr/share/emacs/28.0.50/lisp/org/org-version /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-timer hides /usr/share/emacs/28.0.50/lisp/org/org-timer /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-tempo hides /usr/share/emacs/28.0.50/lisp/org/org-tempo /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-table hides /usr/share/emacs/28.0.50/lisp/org/org-table /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-src hides /usr/share/emacs/28.0.50/lisp/org/org-src /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-protocol hides /usr/share/emacs/28.0.50/lisp/org/org-protocol /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-plot hides /usr/share/emacs/28.0.50/lisp/org/org-plot /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-pcomplete hides /usr/share/emacs/28.0.50/lisp/org/org-pcomplete /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-num hides /usr/share/emacs/28.0.50/lisp/org/org-num /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-mouse hides /usr/share/emacs/28.0.50/lisp/org/org-mouse /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-mobile hides /usr/share/emacs/28.0.50/lisp/org/org-mobile /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-macs hides /usr/share/emacs/28.0.50/lisp/org/org-macs /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-macro hides /usr/share/emacs/28.0.50/lisp/org/org-macro /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-loaddefs hides /usr/share/emacs/28.0.50/lisp/org/org-loaddefs /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-list hides /usr/share/emacs/28.0.50/lisp/org/org-list /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-lint hides /usr/share/emacs/28.0.50/lisp/org/org-lint /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-keys hides /usr/share/emacs/28.0.50/lisp/org/org-keys /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-install hides /usr/share/emacs/28.0.50/lisp/org/org-install /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-inlinetask hides /usr/share/emacs/28.0.50/lisp/org/org-inlinetask /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-indent hides /usr/share/emacs/28.0.50/lisp/org/org-indent /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-id hides /usr/share/emacs/28.0.50/lisp/org/org-id /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-habit hides /usr/share/emacs/28.0.50/lisp/org/org-habit /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-goto hides /usr/share/emacs/28.0.50/lisp/org/org-goto /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-footnote hides /usr/share/emacs/28.0.50/lisp/org/org-footnote /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-feed hides /usr/share/emacs/28.0.50/lisp/org/org-feed /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-faces hides /usr/share/emacs/28.0.50/lisp/org/org-faces /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-entities hides /usr/share/emacs/28.0.50/lisp/org/org-entities /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-element hides /usr/share/emacs/28.0.50/lisp/org/org-element /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-duration hides /usr/share/emacs/28.0.50/lisp/org/org-duration /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-datetree hides /usr/share/emacs/28.0.50/lisp/org/org-datetree /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-ctags hides /usr/share/emacs/28.0.50/lisp/org/org-ctags /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-crypt hides /usr/share/emacs/28.0.50/lisp/org/org-crypt /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-compat hides /usr/share/emacs/28.0.50/lisp/org/org-compat /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-colview hides /usr/share/emacs/28.0.50/lisp/org/org-colview /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-clock hides /usr/share/emacs/28.0.50/lisp/org/org-clock /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-capture hides /usr/share/emacs/28.0.50/lisp/org/org-capture /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-attach hides /usr/share/emacs/28.0.50/lisp/org/org-attach /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-attach-git hides /usr/share/emacs/28.0.50/lisp/org/org-attach-git /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-archive hides /usr/share/emacs/28.0.50/lisp/org/org-archive /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/org-agenda hides /usr/share/emacs/28.0.50/lisp/org/org-agenda /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol hides /usr/share/emacs/28.0.50/lisp/org/ol /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-w3m hides /usr/share/emacs/28.0.50/lisp/org/ol-w3m /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-rmail hides /usr/share/emacs/28.0.50/lisp/org/ol-rmail /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-mhe hides /usr/share/emacs/28.0.50/lisp/org/ol-mhe /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-irc hides /usr/share/emacs/28.0.50/lisp/org/ol-irc /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-info hides /usr/share/emacs/28.0.50/lisp/org/ol-info /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-gnus hides /usr/share/emacs/28.0.50/lisp/org/ol-gnus /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-eww hides /usr/share/emacs/28.0.50/lisp/org/ol-eww /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-eshell hides /usr/share/emacs/28.0.50/lisp/org/ol-eshell /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-docview hides /usr/share/emacs/28.0.50/lisp/org/ol-docview /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-bibtex hides /usr/share/emacs/28.0.50/lisp/org/ol-bibtex /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ol-bbdb hides /usr/share/emacs/28.0.50/lisp/org/ol-bbdb /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob hides /usr/share/emacs/28.0.50/lisp/org/ob /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-vala hides /usr/share/emacs/28.0.50/lisp/org/ob-vala /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-tangle hides /usr/share/emacs/28.0.50/lisp/org/ob-tangle /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-table hides /usr/share/emacs/28.0.50/lisp/org/ob-table /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-stan hides /usr/share/emacs/28.0.50/lisp/org/ob-stan /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-sqlite hides /usr/share/emacs/28.0.50/lisp/org/ob-sqlite /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-sql hides /usr/share/emacs/28.0.50/lisp/org/ob-sql /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-shen hides /usr/share/emacs/28.0.50/lisp/org/ob-shen /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-shell hides /usr/share/emacs/28.0.50/lisp/org/ob-shell /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-sed hides /usr/share/emacs/28.0.50/lisp/org/ob-sed /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-screen hides /usr/share/emacs/28.0.50/lisp/org/ob-screen /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-scheme hides /usr/share/emacs/28.0.50/lisp/org/ob-scheme /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-sass hides /usr/share/emacs/28.0.50/lisp/org/ob-sass /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-ruby hides /usr/share/emacs/28.0.50/lisp/org/ob-ruby /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-ref hides /usr/share/emacs/28.0.50/lisp/org/ob-ref /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-python hides /usr/share/emacs/28.0.50/lisp/org/ob-python /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-processing hides /usr/share/emacs/28.0.50/lisp/org/ob-processing /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-plantuml hides /usr/share/emacs/28.0.50/lisp/org/ob-plantuml /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-picolisp hides /usr/share/emacs/28.0.50/lisp/org/ob-picolisp /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-perl hides /usr/share/emacs/28.0.50/lisp/org/ob-perl /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-org hides /usr/share/emacs/28.0.50/lisp/org/ob-org /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-octave hides /usr/share/emacs/28.0.50/lisp/org/ob-octave /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-ocaml hides /usr/share/emacs/28.0.50/lisp/org/ob-ocaml /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-mscgen hides /usr/share/emacs/28.0.50/lisp/org/ob-mscgen /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-maxima hides /usr/share/emacs/28.0.50/lisp/org/ob-maxima /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-matlab hides /usr/share/emacs/28.0.50/lisp/org/ob-matlab /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-makefile hides /usr/share/emacs/28.0.50/lisp/org/ob-makefile /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-lua hides /usr/share/emacs/28.0.50/lisp/org/ob-lua /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-lob hides /usr/share/emacs/28.0.50/lisp/org/ob-lob /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-lisp hides /usr/share/emacs/28.0.50/lisp/org/ob-lisp /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-lilypond hides /usr/share/emacs/28.0.50/lisp/org/ob-lilypond /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-ledger hides /usr/share/emacs/28.0.50/lisp/org/ob-ledger /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-latex hides /usr/share/emacs/28.0.50/lisp/org/ob-latex /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-js hides /usr/share/emacs/28.0.50/lisp/org/ob-js /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-java hides /usr/share/emacs/28.0.50/lisp/org/ob-java /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-io hides /usr/share/emacs/28.0.50/lisp/org/ob-io /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-hledger hides /usr/share/emacs/28.0.50/lisp/org/ob-hledger /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-haskell hides /usr/share/emacs/28.0.50/lisp/org/ob-haskell /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-groovy hides /usr/share/emacs/28.0.50/lisp/org/ob-groovy /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-gnuplot hides /usr/share/emacs/28.0.50/lisp/org/ob-gnuplot /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-fortran hides /usr/share/emacs/28.0.50/lisp/org/ob-fortran /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-forth hides /usr/share/emacs/28.0.50/lisp/org/ob-forth /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-exp hides /usr/share/emacs/28.0.50/lisp/org/ob-exp /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-eval hides /usr/share/emacs/28.0.50/lisp/org/ob-eval /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-eshell hides /usr/share/emacs/28.0.50/lisp/org/ob-eshell /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-emacs-lisp hides /usr/share/emacs/28.0.50/lisp/org/ob-emacs-lisp /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-ebnf hides /usr/share/emacs/28.0.50/lisp/org/ob-ebnf /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-dot hides /usr/share/emacs/28.0.50/lisp/org/ob-dot /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-ditaa hides /usr/share/emacs/28.0.50/lisp/org/ob-ditaa /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-css hides /usr/share/emacs/28.0.50/lisp/org/ob-css /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-core hides /usr/share/emacs/28.0.50/lisp/org/ob-core /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-coq hides /usr/share/emacs/28.0.50/lisp/org/ob-coq /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-comint hides /usr/share/emacs/28.0.50/lisp/org/ob-comint /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-clojure hides /usr/share/emacs/28.0.50/lisp/org/ob-clojure /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-calc hides /usr/share/emacs/28.0.50/lisp/org/ob-calc /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-awk hides /usr/share/emacs/28.0.50/lisp/org/ob-awk /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-asymptote hides /usr/share/emacs/28.0.50/lisp/org/ob-asymptote /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-abc hides /usr/share/emacs/28.0.50/lisp/org/ob-abc /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-R hides /usr/share/emacs/28.0.50/lisp/org/ob-R /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-J hides /usr/share/emacs/28.0.50/lisp/org/ob-J /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201130/ob-C hides /usr/share/emacs/28.0.50/lisp/org/ob-C Features: (shadow sort bbdb-message mailalias bbdb-mua bbdb-com bbdb bbdb-site timezone mail-extr emacsbug sendmail misc minibuffer-extras minibuf-eldef eieio-opt speedbar ezimage dframe dabbrev misc-text vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher bug-reference magit-extras face-remap magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func flimenu imenu magit-diff smerge-mode diff magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit transient format-spec magit-git magit-section magit-utils crm log-edit message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor async-bytecomp advice async shell pcomplete server dash derived compile comint ansi-color executable view jka-compr pulse xref project isearch-extras misearch multi-isearch vc-git diff-mode cl-print debug backtrace find-func mule-util help-fns radix-tree cus-edit cus-start cus-load wid-edit time-date email-config markdown-mode rx color noutline outline pdf-loader paren elec-pair ace-link avy ring beginend dot-mode marginalia embark ffap thingatpt icomplete-vertical icomplete orderless completing-history block-undo modus-vivendi-theme modus-operandi-theme pcase gcmh diminish cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core finder-inf edmacro kmacro tex-site slime-autoloads info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 479513 142115) (symbols 48 28479 2) (strings 32 122570 11474) (string-bytes 1 3390131) (vectors 16 47955) (vector-slots 8 1232246 99268) (floats 8 264 828) (intervals 56 3228 738) (buffers 992 29))
bug-gnu-emacs <at> gnu.org
:bug#45035
; Package emacs
.
(Sat, 05 Dec 2020 21:16:02 GMT) Full text and rfc822 format available.Message #8 received at 45035 <at> debbugs.gnu.org (full text, mbox):
From: Juri Linkov <juri <at> linkov.net> To: Omar Antolín Camarena <omar <at> matem.unam.mx> Cc: 45035 <at> debbugs.gnu.org Subject: Re: bug#45035: 28.0.50; Command completion annotations show minibuffer keybindings Date: Sat, 05 Dec 2020 22:51:41 +0200
> If from M-x you switch to the *Completions* buffer, it will show > keybindings as annotations next to the command names. Unfortunately, it > shows the key bindings that are active in the minibuffer, while it would > be more useful to show the keybindings active in the buffer in which you pressed M-x. > > Here's a simple recipe to see the issue from emacs -Q: > > Run emacs -Q. You will have eval-print-last-sexp bound to C-j in the > scratch buffer, and minibuffer-complete-and-exit bound to C-j in the > minibuffer, of course. > > Try this: while in the scratch buffer, type M-x and part of either of > those two commands, and then press M-v to switch to the *Completions* > buffer. For eval-print-last-sexp you'll see no annotation, and for > minibuffer-complete-and-exit you'll see C-j. > > This illustrates the fact that the key bindings in the annotation are > those from the minibuffer. > > The problem is that when the function read-extended-command--annotation > is called, the minibuffer is active. If people agree that it would be > better to show the key bindings in the last buffer active before the > minibuffer, one way to get this behavior is by modifying > minibuffer-completion-help. That function obtains the > annotation-function metadatum and stores it in a variable called afun. > The form that actually calls afun could be wrapped in with-minibuffer-selected-window, for example. Thanks, I think your idea is correct. But I'm not sure if minibuffer-completion-help is the right place for wrapping in with-minibuffer-selected-window. This means that all calls of annotation-function will be in the original buffer, whereas only read-extended-command--annotation needs such wrapping. Or do you care that such wrapping will be called for every command in read-extended-command--annotation? Then instead of annotation-function you could try to use a new function affixation-function that is called only once, so you could add wrapping to it.
bug-gnu-emacs <at> gnu.org
:bug#45035
; Package emacs
.
(Mon, 07 Dec 2020 02:51:01 GMT) Full text and rfc822 format available.Message #11 received at 45035 <at> debbugs.gnu.org (full text, mbox):
From: Omar Antolín Camarena <omar <at> matem.unam.mx> To: Juri Linkov <juri <at> linkov.net> Cc: 45035 <at> debbugs.gnu.org Subject: Re: bug#45035: 28.0.50; Command completion annotations show minibuffer keybindings Date: Sun, 06 Dec 2020 20:50:04 -0600
> Thanks, I think your idea is correct. But I'm not sure if > minibuffer-completion-help is the right place for wrapping in > with-minibuffer-selected-window. This means that all calls of > annotation-function will be in the original buffer, whereas > only read-extended-command--annotation needs such wrapping. Oh, that's a very good point. Probably it would be best to leave minibuffer-completion-help as is, and change only read-extended-command--annotation. > Or do you care that such wrapping will be called for every command > in read-extended-command--annotation? Then instead of annotation-function > you could try to use a new function affixation-function that is called > only once, so you could add wrapping to it. My Emacs doesn't have affixation-function yet, so I don't really know anything about it. -- Omar
bug-gnu-emacs <at> gnu.org
:bug#45035
; Package emacs
.
(Wed, 16 Dec 2020 09:31:01 GMT) Full text and rfc822 format available.Message #14 received at 45035 <at> debbugs.gnu.org (full text, mbox):
From: Juri Linkov <juri <at> linkov.net> To: Omar Antolín Camarena <omar <at> matem.unam.mx> Cc: 45035 <at> debbugs.gnu.org Subject: Re: bug#45035: 28.0.50; Command completion annotations show minibuffer keybindings Date: Wed, 16 Dec 2020 11:15:40 +0200
[Message part 1 (text/plain, inline)]
>> Thanks, I think your idea is correct. But I'm not sure if >> minibuffer-completion-help is the right place for wrapping in >> with-minibuffer-selected-window. This means that all calls of >> annotation-function will be in the original buffer, whereas >> only read-extended-command--annotation needs such wrapping. > > Oh, that's a very good point. Probably it would be best to leave > minibuffer-completion-help as is, and change only > read-extended-command--annotation. > >> Or do you care that such wrapping will be called for every command >> in read-extended-command--annotation? Then instead of annotation-function >> you could try to use a new function affixation-function that is called >> only once, so you could add wrapping to it. > > My Emacs doesn't have affixation-function yet, so I don't really know > anything about it. I'm sorry that your version of Emacs is not updated too often. So here I created a patch based on current master, and after pushing it, sometimes it will arrive to your updated version.
[read-extended-command--affixation.patch (text/x-diff, inline)]
diff --git a/lisp/simple.el b/lisp/simple.el index c309df11ad..f669996c2f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1958,22 +1958,27 @@ read-extended-command (lambda (string pred action) (if (and suggest-key-bindings (eq action 'metadata)) '(metadata - (annotation-function . read-extended-command--annotation) + (affixation-function . read-extended-command--affixation) (category . command)) (complete-with-action action obarray string pred))) #'commandp t nil 'extended-command-history))) -(defun read-extended-command--annotation (command-name) - (let* ((fun (and (stringp command-name) (intern-soft command-name))) - (binding (where-is-internal fun overriding-local-map t)) - (obsolete (get fun 'byte-obsolete-info)) - (alias (symbol-function fun))) - (cond ((symbolp alias) - (format " (%s)" alias)) - (obsolete - (format " (%s)" (car obsolete))) - ((and binding (not (stringp binding))) - (format " (%s)" (key-description binding)))))) +(defun read-extended-command--affixation (command-names) + (with-selected-window (or (minibuffer-selected-window) (selected-window)) + (mapcar + (lambda (command-name) + (let* ((fun (and (stringp command-name) (intern-soft command-name))) + (binding (where-is-internal fun overriding-local-map t)) + (obsolete (get fun 'byte-obsolete-info)) + (alias (symbol-function fun)) + (suffix (cond ((symbolp alias) + (format " (%s)" alias)) + (obsolete + (format " (%s)" (car obsolete))) + ((and binding (not (stringp binding))) + (format " (%s)" (key-description binding)))))) + (if suffix (list command-name suffix) command-name))) + command-names))) (defcustom suggest-key-bindings t "Non-nil means show the equivalent key-binding when M-x command has one.
bug-gnu-emacs <at> gnu.org
:bug#45035
; Package emacs
.
(Wed, 16 Dec 2020 21:28:02 GMT) Full text and rfc822 format available.Message #17 received at 45035 <at> debbugs.gnu.org (full text, mbox):
From: Omar Antolín Camarena <omar <at> matem.unam.mx> To: Juri Linkov <juri <at> linkov.net> Cc: 45035 <at> debbugs.gnu.org Subject: Re: bug#45035: 28.0.50; Command completion annotations show minibuffer keybindings Date: Wed, 16 Dec 2020 15:27:30 -0600
> I'm sorry that your version of Emacs is not updated too often. > So here I created a patch based on current master, and after > pushing it, sometimes it will arrive to your updated version. Fantastic, thank you! -- Omar
bug-gnu-emacs <at> gnu.org
:bug#45035
; Package emacs
.
(Wed, 16 Dec 2020 21:29:01 GMT) Full text and rfc822 format available.Message #20 received at 45035 <at> debbugs.gnu.org (full text, mbox):
From: Juri Linkov <juri <at> linkov.net> To: Omar Antolín Camarena <omar <at> matem.unam.mx> Cc: 45035 <at> debbugs.gnu.org Subject: Re: bug#45035: 28.0.50; Command completion annotations show minibuffer keybindings Date: Wed, 16 Dec 2020 23:27:48 +0200
tags 45035 fixed close 45035 28.0.50 thanks >>> Thanks, I think your idea is correct. But I'm not sure if >>> minibuffer-completion-help is the right place for wrapping in >>> with-minibuffer-selected-window. This means that all calls of >>> annotation-function will be in the original buffer, whereas >>> only read-extended-command--annotation needs such wrapping. >> >> Oh, that's a very good point. Probably it would be best to leave >> minibuffer-completion-help as is, and change only >> read-extended-command--annotation. >> >>> Or do you care that such wrapping will be called for every command >>> in read-extended-command--annotation? Then instead of annotation-function >>> you could try to use a new function affixation-function that is called >>> only once, so you could add wrapping to it. >> >> My Emacs doesn't have affixation-function yet, so I don't really know >> anything about it. > > I'm sorry that your version of Emacs is not updated too often. > So here I created a patch based on current master, and after > pushing it, sometimes it will arrive to your updated version. Now pushed to master, and closed.
Juri Linkov <juri <at> linkov.net>
to control <at> debbugs.gnu.org
.
(Wed, 16 Dec 2020 21:29:03 GMT) Full text and rfc822 format available.Juri Linkov <juri <at> linkov.net>
to control <at> debbugs.gnu.org
.
(Wed, 16 Dec 2020 21:29:03 GMT) Full text and rfc822 format available.Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Thu, 14 Jan 2021 12:24:04 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.