From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#60101: 29.0.60; help-quick should use C-/ for undo Date: Thu, 15 Dec 2022 19:21:34 +0000 Message-ID: <87sfhgtqv5.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33777"; mail-complaints-to="usenet@ciao.gmane.io" To: 60101@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 20:22:22 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5toD-0008Vo-NR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 20:22:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5tny-0005vc-S7; Thu, 15 Dec 2022 14:22:06 -0500 Original-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 ) id 1p5tnu-0005vT-DM for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 14:22:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5tnu-0005dH-5a for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 14:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5tnt-0000H6-Te for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 14:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 19:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60101 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16711321031043 (code B ref -1); Thu, 15 Dec 2022 19:22:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Dec 2022 19:21:43 +0000 Original-Received: from localhost ([127.0.0.1]:44432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5tna-0000Gl-LT for submit@debbugs.gnu.org; Thu, 15 Dec 2022 14:21:43 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:48676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5tnW-0000Ge-Rv for submit@debbugs.gnu.org; Thu, 15 Dec 2022 14:21:41 -0500 Original-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 ) id 1p5tnW-0005uZ-KS for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 14:21:38 -0500 Original-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 ) id 1p5tnT-0005Zy-4p for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 14:21:37 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id A6C79240027 for ; 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== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NY2Cb1w57z6trr for ; Thu, 15 Dec 2022 20:21:31 +0100 (CET) Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251140 Archived-At: 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-_" "" "C-/" " ") (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-_" "" "C-/" " ") (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))