GNU bug report logs - #60101
29.0.60; help-quick should use C-/ for undo

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Philip Kaludercic <philipk@HIDDEN>; dated Thu, 15 Dec 2022 19:22:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 60101 <at> debbugs.gnu.org:


Received: (at 60101) by debbugs.gnu.org; 15 Dec 2022 19:34:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 15 14:34:48 2022
Received: from localhost ([127.0.0.1]:44504 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p5u0G-0000Qd-16
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2022 14:34:48 -0500
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:38433)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1p5u0A-0000QV-EL
 for 60101 <at> debbugs.gnu.org; Thu, 15 Dec 2022 14:34:46 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 1F1FDFF802;
 Thu, 15 Dec 2022 19:34:34 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
Subject: Re: bug#60101: 29.0.60; help-quick should use C-/ for undo
In-Reply-To: <87sfhgtqv5.fsf@HIDDEN> (Philip Kaludercic's message of "Thu, 
 15 Dec 2022 19:21:34 +0000")
Organization: LINKOV.NET
References: <87sfhgtqv5.fsf@HIDDEN>
Date: Thu, 15 Dec 2022 21:34:09 +0200
Message-ID: <86tu1w31hq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 60101
Cc: 60101 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> I think some general mechanism to associate preferred binding with keys
> would be nice to have.  What I wonder is if this is general enough of a
> use-case to be added to where-is-internal, or should this be fixed
> inside of help-quick?

In lisp/bindings.el its preferred binding is defined by this line:

  (put 'undo :advertised-binding [?\C-x ?u])




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60101; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Dec 2022 19:21:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 15 14:21:43 2022
Received: from localhost ([127.0.0.1]:44432 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p5tna-0000Gl-LT
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2022 14:21:43 -0500
Received: from lists.gnu.org ([209.51.188.17]:48676)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1p5tnW-0000Ge-Rv
 for submit <at> debbugs.gnu.org; Thu, 15 Dec 2022 14:21:41 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philipk@HIDDEN>)
 id 1p5tnW-0005uZ-KS
 for bug-gnu-emacs@HIDDEN; Thu, 15 Dec 2022 14:21:38 -0500
Received: from mout01.posteo.de ([185.67.36.65])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philipk@HIDDEN>)
 id 1p5tnT-0005Zy-4p
 for bug-gnu-emacs@HIDDEN; Thu, 15 Dec 2022 14:21:37 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id A6C79240027
 for <bug-gnu-emacs@HIDDEN>; Thu, 15 Dec 2022 20:21:31 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1671132091; bh=Tu0oA5nedeIXKEmnLfEUNDH/kVS/8FwcvFtpdOHAdUU=;
 h=From:To:Subject:Date:From;
 b=rXr0OsvLBu7Drqqn0YymWTw/Me73b3YCGpJ+d273RIlpG7611x8Y1CaeCdoG9j4Ud
 pprB3+vsnCm/41A2mNJL7rbaFqSrVAfQ566LzXDIj102m0L5MQKxHNYHLluuSEd1PG
 7yEk1JcF/456OH5NBezJs9Wdu+De/Y0BNuYqgL8G2t7Y6I2AWo5Uur+/0R+ZGcUICL
 ppPrxHqJXlbrgB4HKFjL8pNufaF3iwRRBqL/rdzipU3fE3H6M7+lORGGZGzrYCSGGt
 ++XLA/kNRVLNZuLWSSIF41Jy3sSXJj9heVORmQjdMpFKs0HFSfWDQQeVSYdkFLV+Am
 dgOJZmnG3Lt6Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4NY2Cb1w57z6trr
 for <bug-gnu-emacs@HIDDEN>; Thu, 15 Dec 2022 20:21:31 +0100 (CET)
From: Philip Kaludercic <philipk@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.60; help-quick should use C-/ for undo
Date: Thu, 15 Dec 2022 19:21:34 +0000
Message-ID: <87sfhgtqv5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@HIDDEN;
 helo=mout01.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


The new help-quick command makes use of `where-is-internal' to find the
binding for a command ti displays.  This works fine if a command has
only one binding, but in the case of `undo', C-_ is the first one it
suggests, since

    (mapcar #'key-description (where-is-internal 'undo))
    ;; => ("C-_" "<undo>" "C-/" "<menu-bar> <edit> <undo>")

    (key-description (where-is-internal 'undo nil t))
    ;; => "C-_"

It appears this issue can be resolved by setting

    (setq where-is-preferred-modifier 'C)

    (mapcar #'key-description (where-is-internal 'undo))
    ;; => ("C-_" "<undo>" "C-/" "<menu-bar> <edit> <undo>")

    (key-description (where-is-internal 'undo nil t))
    ;; => "C-/"

But to be honest, I don't understand why, nor do I think the solution is
particularly robust.

I think some general mechanism to associate preferred binding with keys
would be nice to have.  What I wonder is if this is general enough of a
use-case to be added to where-is-internal, or should this be fixed
inside of help-quick?

The other issue is how does one determine what binding is preferable.  I
had previously generalised that C-/ is obviously preferable, but that
differs from layout to layout and depending on what keys Emacs can even
detect (I believe C-x u is often the only key that can be used in TUI
mode).

In GNU Emacs 29.0.60 (build 5, x86_64-pc-linux-gnu, GTK+ Version
 3.24.35, cairo version 1.16.0) of 2022-12-14 built on quetzal
Repository revision: 622838b957e240d700585050e9ddbd036e690513
Repository branch: emacs-29
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --with-pgtk --with-imagemagick'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES
NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER XIM GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH: 
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  rcirc-color-mode: t
  rcirc-track-minor-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  server-mode: t
  shell-dirtrack-mode: t
  editorconfig-mode: t
  repeat-mode: t
  display-battery-mode: t
  display-time-mode: t
  diff-hl-flydiff-mode: t
  winner-mode: t
  windmove-mode: t
  corfu-history-mode: t
  vertico-multiform-mode: t
  vertico-mode: t
  electric-pair-mode: t
  recentf-mode: t
  save-place-mode: t
  savehist-mode: t
  pixel-scroll-precision-mode: t
  pixel-scroll-mode: t
  xterm-mouse-mode: t
  which-function-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/philip/.config/emacs/site-lisp/sbbs-pld/sbbs hides /home/philip/.config/emacs/site-lisp/sbbs/sbbs
/home/philip/.config/emacs/site-lisp/flymake-proselint/flymake-proselint hides /home/philip/.config/emacs/elpa/flymake-proselint-0.3.0/flymake-proselint
/home/philip/.config/emacs/site-lisp/writegood-mode/writegood-mode hides /home/philip/.config/emacs/elpa/writegood-mode-2.2.0/writegood-mode
/home/philip/.config/emacs/site-lisp/writegood-mode/writegood-mode-autoloads hides /home/philip/.config/emacs/elpa/writegood-mode-2.2.0/writegood-mode-autoloads
/home/philip/.config/emacs/site-lisp/writegood-mode/writegood-mode-pkg hides /home/philip/.config/emacs/elpa/writegood-mode-2.2.0/writegood-mode-pkg
/home/philip/.config/emacs/elpa/transient-0.3.7/transient hides /home/philip/Source/emacs/lisp/transient

Features:
(shadow emacsbug tutorial goto-addr emacs-authors-mode view find-dired
macrostep flymake-proselint mhtml-mode css-mode js sgml-mode facemenu
trace flow-fill ibuf-ext flymake-cc ox-texinfo org-timer org-tempo
org-protocol org-num org-lint org-feed org-datetree org-colview
org-duration org-capture org-attach-git org-archive test-ox
org-inlinetask ob-sed ob-plantuml ob-lilypond org-test ert-x org-clock
tempo ox-odt rng-loc rng-uri rng-parse rng-match rng-pttrn nxml-parse
nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table
ox-ascii ox-publish ox org-agenda org-attach esh-mode ob-sql geiser
python ob-octave eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg
esh-module esh-groups esh-util calc-store calc-trail calc-ext calc
calc-loaddefs rect calc-macs cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs org-autoloads avy 0x0
0x0-autoloads tar-mode arc-mode archive-mode term/xterm xterm eat ert
eat-autoloads nndoc gnus-dup debbugs-gnu debbugs-compat debbugs
soap-client rng-xsd rng-dt rng-util xsd-regexp rcirc-color rcirc
cap-words superword subword go-mode find-file etags fileloop nroff-mode
org-element org-persist org-id org-refile avl-tree generator oc-basic
ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus
nnselect ol-docview doc-view jka-compr image-mode exif ol-bibtex bibtex
ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-src ob-comint org-pcomplete org-list
org-footnote org-faces org-entities ob-emacs-lisp ob-core ob-eval
org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs
cal-menu calendar cal-loaddefs org-version org-compat org-macs
modus-vivendi-theme vc-filewise follow magit-extras face-remap
magit-bookmark 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
magit-diff git-commit log-edit add-log magit-core magit-autorevert
autorevert filenotify magit-margin magit-transient magit-process
with-editor server magit-mode transient edmacro magit-git magit-section
magit-utils crm dash vc-src vc-sccs vc-cvs vc-rcs vertico-buffer
mailalias smtpmail ecomplete bug-reference dictionary
dictionary-connection ibuffer ibuffer-loaddefs whitespace vc-annotate
descr-text pulse color shortdoc ffap edebug reposition consult-imenu
cl-print debug backtrace find-func grep agda2-mode xref agda2-abbrevs
skeleton agda2-highlight agda2 agda-input quail eri char-fold misearch
multi-isearch smerge-mode mule-util package-vc inline url-cache url-http
url-auth url-gw display-line-numbers vc-hg vc-bzr vertico-directory
sh-script smie treesit executable orderless vertico-flat vc-svn vc-git
tramp-cache tramp-sh tramp tramp-loaddefs trampver tramp-integration
cus-start tramp-compat shell pcomplete ls-lisp consult-register
consult-vertico consult compat-28 kmacro bookmark files-x vc-backup
copyright time-stamp mm-archive dired-aux gnus-dired buffer-env compat
compat-macs sort smiley gnus-cite mail-extr textsec uni-scripts
idna-mapping ucs-normalize uni-confusable textsec-check gnus-async
gnus-bcklg qp gnus-ml disp-table nndraft nnmh utf-7 nnfolder epa-file
network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig nntp
gnus-cache gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group
gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7
nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message yank-media
puny dired-x dired dired-loaddefs rfc822 mml mml-sec epa derived epg
rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader gnus-win noutline outline checkdoc
flymake-proc flymake yasnippet-snippets warnings yasnippet editorconfig
editorconfig-core editorconfig-core-handle editorconfig-fnmatch flyspell
ispell init repeat project format-spec battery dbus xml shell-command+
thingatpt rx time sendmail rfc2047 rfc2045 ietf-drums gnus nnheader
gnus-util time-date mail-utils range mm-util mail-prsvr finder-inf
diff-hl-flydiff diff diff-hl log-view pcvs-util vc-dir ewoc vc
vc-dispatcher diff-mode easy-mmode hippie-exp winner windmove
corfu-history corfu vertico-multiform vertico cl-extra elec-pair recentf
tree-widget saveplace savehist pixel-scroll cua-base xt-mouse
modus-operandi-theme modus-themes pcase which-func imenu cus-edit pp
cus-load icons wid-edit package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs password-cache json subr-x map byte-opt gv url-vars setup
site-lisp auto-site compile text-property-search comint ansi-osc
ansi-color bytecomp byte-compile loaddefs-gen generate-lisp-file
lisp-mnt info caml-autoloads consult-autoloads
flymake-proselint-autoloads corfu-autoloads diff-hl-autoloads
focus-autoloads haskell-mode-autoloads buffer-env-autoloads
avy-autoloads yasnippet-snippets-autoloads magit-autoloads
geiser-mit-autoloads inspector-autoloads bash-completion-autoloads
ef-themes-autoloads auctex-autoloads tex-site git-commit-autoloads
with-editor-autoloads geiser-guile-autoloads geiser-impl help-fns
radix-tree help-mode cl-loaddefs cl-lib geiser-custom geiser-base ring
geiser-autoloads transient-autoloads magit-section-autoloads
vertico-autoloads debbugs-autoloads compat-autoloads
editorconfig-autoloads rcirc-color-autoloads orderless-autoloads
yasnippet-autoloads markdown-mode-autoloads slime-autoloads
macrostep-autoloads writegood-mode-autoloads go-mode-autoloads
dash-autoloads rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/pgtk-win pgtk-win term/common-win pgtk-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 2434927 285156)
 (symbols 48 80808 3175)
 (strings 32 393048 106951)
 (string-bytes 1 11497968)
 (vectors 16 174618)
 (vector-slots 8 3411953 405729)
 (floats 8 3321 2460)
 (intervals 56 128930 7495)
 (buffers 984 158))




Acknowledgement sent to Philip Kaludercic <philipk@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#60101; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 15 Dec 2022 19:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.