GNU bug report logs - #78186
31.0.50; Register Selection Broken

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Thu, 1 May 2025 12:15:02 UTC

Severity: normal

Found in version 31.0.50

To reply to this bug, email your comments to 78186 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org:
bug#78186; Package emacs. (Thu, 01 May 2025 12:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philip Kaludercic <philipk <at> posteo.net>:
New bug report received and forwarded. Copy sent to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org. (Thu, 01 May 2025 12:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Register Selection Broken
Date: Thu, 01 May 2025 12:14:30 +0000

If the user has customised `register-use-preview', selecting a register,
e.g. via `jump-to-register' errors with "No suitable register".  It
appears this due to changes to recent changes in register.el (I believe
b2904e06 is specifically the critical commit), so I've CC'ed Stefan in
case he has anything to add.

To reproduce the issue from master, start "emacs -Q", evaluate

  (setopt register-use-preview 'never)
  (set-register ?h  '(file . "~"))

and then invoke `jump-to-register'.  This should fail. 


In GNU Emacs 31.0.50 (build 28, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.16.0, Xaw scroll bars) of 2025-05-01 built on icterid
Repository revision: 5920f749a70383a085331062c7e16a6b92afb39d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --with-imagemagick --with-x-toolkit=lucid
 --without-native-compilation --with-tree-sitter 'CFLAGS=-O2
 -march=native -mtune=native -pipe''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT
MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS
TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2
XPM XRANDR LUCID ZLIB

Important settings:
  value of $EMACSLOADPATH: 
  value of $LC_ALL: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Elisp/l

Minor modes in effect:
  flyspell-mode: t
  flymake-mode: t
  outline-minor-mode: t
  yas-minor-mode: t
  repeat-mode: t
  display-time-mode: t
  diff-hl-flydiff-mode: t
  diff-hl-mode: t
  winner-mode: t
  windmove-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
  tooltip-mode: t
  global-eldoc-mode: t
  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
  font-lock-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  auto-save-visited-mode: t

Load-path shadows:
/home/philip/.config/emacs/elpa/git-commit-3.3.0/git-commit hides /home/philip/.config/emacs/elpa/magit-4.1.0/git-commit
/home/philip/.config/emacs/elpa/magit-4.1.0/magit-autorevert hides /home/philip/.config/emacs/elpa/magit-section-4.1.0/magit-autorevert
~/.config/emacs/site-lisp/typo hides /home/philip/.config/emacs/elpa/typo/typo
/home/philip/.config/emacs/elpa/sweeprolog-0.27.6/theme-loaddefs hides /home/philip/Source/emacs/lisp/theme-loaddefs

Features:
(shadow sort writegood-mode ecomplete mail-extr emacsbug pulse color
xref edebug cl-print debug backtrace vc-backup copyright qp gnus-async
gnus-draft 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 dbus xml gnus-cloud nnimap nnmail
mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win char-fold
misearch multi-isearch smerge-mode whitespace vc-git bug-reference
find-func shortdoc comp-common help-fns flyspell ispell tramp-adb
checkdoc flymake yasnippet-snippets yasnippet noutline outline init
repeat shell-command+ thingatpt dired-x time gnus nnheader range
diff-hl-flydiff diff diff-hl log-view log-edit message sendmail
yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg
rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev
mail-utils gmm-utils mailheader add-log pcvs-util vc-dir ewoc vc
vc-dispatcher diff-mode track-changes easy-mmode hippie-exp winner
windmove project elec-pair tramp-cache time-stamp tramp-sh tramp rx
trampver tramp-integration files-x tramp-message tramp-compat shell
pcomplete parse-time iso8601 time-date format-spec tramp-loaddefs
recentf tree-widget saveplace savehist pixel-scroll cua-base xt-mouse
typo cus-edit pp wid-edit icomplete cus-load .auto-site compile
text-property-search comint ansi-osc ansi-color ring loaddefs-gen
lisp-mnt radix-tree site-lisp setup auctex-autoloads tex-site
auto-header-autoloads autocrypt-autoloads avy-autoloads
bash-completion-autoloads debbugs-autoloads diff-hl-autoloads
do-at-point-autoloads flymake-proselint-autoloads focus-autoloads
forth-mode-autoloads git-commit-autoloads gnu-apl-mode-autoloads
go-mode-autoloads gtags-mode-autoloads haskell-mode-autoloads finder-inf
htmlize-autoloads js2-mode-autoloads magit-autoloads pcase
magit-section-autoloads dash-autoloads markdown-mode-autoloads
proof-general-autoloads proof-site proof-autoloads setup-autoloads
shell-command+-autoloads site-lisp-autoloads slime-autoloads warnings
macrostep-autoloads sml-mode-autoloads sp-tutor-autoloads
sweeprolog-autoloads typo-autoloads vc-backup-autoloads
vc-fossil-autoloads info with-editor-autoloads writegood-mode-autoloads
xref-union-autoloads yasnippet-snippets-autoloads yasnippet-autoloads
package browse-url xdg url url-proxy url-privacy url-expand url-methods
url-history url-cookie generate-lisp-file 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 bytecomp byte-compile
url-vars cl-extra help-mode icons cl-loaddefs cl-lib rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
touch-screen 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 lcms2 dynamic-setting system-font-setting
font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar
make-network-process tty-child-frames emacs)

Memory information:
((conses 16 301781 602075) (symbols 48 26072 3)
 (strings 32 93866 6760) (string-bytes 1 2467431) (vectors 16 51174)
 (vector-slots 8 1241095 158126) (floats 8 506 96)
 (intervals 56 3445 1563) (buffers 992 28))

-- 
	Philip Kaludercic on icterid




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78186; Package emacs. (Thu, 01 May 2025 12:43:02 GMT) Full text and rfc822 format available.

Message #8 received at 78186 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: 78186 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#78186: 31.0.50; Register Selection Broken
Date: Thu, 01 May 2025 12:42:27 +0000
Philip Kaludercic <philipk <at> posteo.net> writes:

> If the user has customised `register-use-preview', selecting a register,
> e.g. via `jump-to-register' errors with "No suitable register".  It
> appears this due to changes to recent changes in register.el (I believe
> b2904e06 is specifically the critical commit), so I've CC'ed Stefan in
> case he has anything to add.
>
> To reproduce the issue from master, start "emacs -Q", evaluate
>
>   (setopt register-use-preview 'never)

Actually, this appears to be broken with everything but the default
value?

>   (set-register ?h  '(file . "~"))
>
> and then invoke `jump-to-register'.  This should fail. 
>
>
> In GNU Emacs 31.0.50 (build 28, x86_64-pc-linux-gnu, X toolkit, cairo
>  version 1.16.0, Xaw scroll bars) of 2025-05-01 built on icterid
> Repository revision: 5920f749a70383a085331062c7e16a6b92afb39d
> Repository branch: master
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
> System Description: Debian GNU/Linux 12 (bookworm)
>
> Configured using:
>  'configure --with-imagemagick --with-x-toolkit=lucid
>  --without-native-compilation --with-tree-sitter 'CFLAGS=-O2
>  -march=native -mtune=native -pipe''
>
> Configured features:
> ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
> IMAGEMAGICK JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT
> MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS
> TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2
> XPM XRANDR LUCID ZLIB
>
> Important settings:
>   value of $EMACSLOADPATH: 
>   value of $LC_ALL: en_US.UTF-8
>   value of $LC_CTYPE: en_US.UTF-8
>   value of $LANG: en_US.UTF-8
>   locale-coding-system: utf-8-unix
>
> Major mode: Elisp/l
>
> Minor modes in effect:
>   flyspell-mode: t
>   flymake-mode: t
>   outline-minor-mode: t
>   yas-minor-mode: t
>   repeat-mode: t
>   display-time-mode: t
>   diff-hl-flydiff-mode: t
>   diff-hl-mode: t
>   winner-mode: t
>   windmove-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
>   tooltip-mode: t
>   global-eldoc-mode: t
>   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
>   font-lock-mode: t
>   minibuffer-regexp-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   auto-save-visited-mode: t
>
> Load-path shadows:
> /home/philip/.config/emacs/elpa/git-commit-3.3.0/git-commit hides /home/philip/.config/emacs/elpa/magit-4.1.0/git-commit
> /home/philip/.config/emacs/elpa/magit-4.1.0/magit-autorevert hides /home/philip/.config/emacs/elpa/magit-section-4.1.0/magit-autorevert
> ~/.config/emacs/site-lisp/typo hides /home/philip/.config/emacs/elpa/typo/typo
> /home/philip/.config/emacs/elpa/sweeprolog-0.27.6/theme-loaddefs hides /home/philip/Source/emacs/lisp/theme-loaddefs
>
> Features:
> (shadow sort writegood-mode ecomplete mail-extr emacsbug pulse color
> xref edebug cl-print debug backtrace vc-backup copyright qp gnus-async
> gnus-draft 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 dbus xml gnus-cloud nnimap nnmail
> mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win char-fold
> misearch multi-isearch smerge-mode whitespace vc-git bug-reference
> find-func shortdoc comp-common help-fns flyspell ispell tramp-adb
> checkdoc flymake yasnippet-snippets yasnippet noutline outline init
> repeat shell-command+ thingatpt dired-x time gnus nnheader range
> diff-hl-flydiff diff diff-hl log-view log-edit message sendmail
> yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg
> rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse
> rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev
> mail-utils gmm-utils mailheader add-log pcvs-util vc-dir ewoc vc
> vc-dispatcher diff-mode track-changes easy-mmode hippie-exp winner
> windmove project elec-pair tramp-cache time-stamp tramp-sh tramp rx
> trampver tramp-integration files-x tramp-message tramp-compat shell
> pcomplete parse-time iso8601 time-date format-spec tramp-loaddefs
> recentf tree-widget saveplace savehist pixel-scroll cua-base xt-mouse
> typo cus-edit pp wid-edit icomplete cus-load .auto-site compile
> text-property-search comint ansi-osc ansi-color ring loaddefs-gen
> lisp-mnt radix-tree site-lisp setup auctex-autoloads tex-site
> auto-header-autoloads autocrypt-autoloads avy-autoloads
> bash-completion-autoloads debbugs-autoloads diff-hl-autoloads
> do-at-point-autoloads flymake-proselint-autoloads focus-autoloads
> forth-mode-autoloads git-commit-autoloads gnu-apl-mode-autoloads
> go-mode-autoloads gtags-mode-autoloads haskell-mode-autoloads finder-inf
> htmlize-autoloads js2-mode-autoloads magit-autoloads pcase
> magit-section-autoloads dash-autoloads markdown-mode-autoloads
> proof-general-autoloads proof-site proof-autoloads setup-autoloads
> shell-command+-autoloads site-lisp-autoloads slime-autoloads warnings
> macrostep-autoloads sml-mode-autoloads sp-tutor-autoloads
> sweeprolog-autoloads typo-autoloads vc-backup-autoloads
> vc-fossil-autoloads info with-editor-autoloads writegood-mode-autoloads
> xref-union-autoloads yasnippet-snippets-autoloads yasnippet-autoloads
> package browse-url xdg url url-proxy url-privacy url-expand url-methods
> url-history url-cookie generate-lisp-file 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 bytecomp byte-compile
> url-vars cl-extra help-mode icons cl-loaddefs cl-lib rmc iso-transl
> tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
> lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
> touch-screen 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 lcms2 dynamic-setting system-font-setting
> font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar
> make-network-process tty-child-frames emacs)
>
> Memory information:
> ((conses 16 301781 602075) (symbols 48 26072 3)
>  (strings 32 93866 6760) (string-bytes 1 2467431) (vectors 16 51174)
>  (vector-slots 8 1241095 158126) (floats 8 506 96)
>  (intervals 56 3445 1563) (buffers 992 28))

-- 
	Philip Kaludercic on icterid




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78186; Package emacs. (Thu, 01 May 2025 16:41:02 GMT) Full text and rfc822 format available.

Message #11 received at 78186 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 78186 <at> debbugs.gnu.org
Subject: Re: bug#78186: 31.0.50; Register Selection Broken
Date: Thu, 01 May 2025 12:39:59 -0400
[Message part 1 (text/plain, inline)]
> Actually, this appears to be broken with everything but the default value?

Yes, the problem was in `register--jumpable-p` which always
returned nil.
I pushed the patch to `master` which should fix it.


        Stefan
[register.patch (text/x-diff, inline)]
commit 311ea96ccfae813f5cb55a5bc9a13be19c0a4127
Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date:   Thu May 1 12:38:33 2025 -0400

    register.el (register--jumpable-p): Fix bug#78186
    
    While `register--get-method-type` worked fine for `register-val-insert`
    it always returns nil for `register-val-jump-to` because it presumed the
    method took a single argument.  Make it work for multi-arg generic functions.
    
    * lisp/register.el (register--get-method-type): Add `other-args-type` arg.
    (register--jumpable-p): Use it.

diff --git a/lisp/register.el b/lisp/register.el
index a36d0e6648e..a7afc7e08e4 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -575,16 +575,17 @@ buffer-to-register
     (add-hook 'kill-buffer-hook #'register-buffer-to-file-query nil t))
   (set-register register (cons 'buffer buffer)))
 
-(defun register--get-method-type (val genfun)
+(defun register--get-method-type (val genfun &optional other-args-type)
   (let* ((type (cl-type-of val))
 	 (types (cl--class-allparents (cl-find-class type))))
-    (while (and types (not (cl-find-method genfun nil (list (car types)))))
+    (while (and types (not (cl-find-method genfun nil
+                                           (cons (car types) other-args-type))))
       (setq types (cdr types)))
     (car types)))
 
 (defun register--jumpable-p (regval)
   "Return non-nil if `register-val-insert' is implemented for REGVAL."
-  (pcase (register--get-method-type regval 'register-val-jump-to)
+  (pcase (register--get-method-type regval 'register-val-jump-to '(t))
     ('t nil)
     ('registerv (registerv-jump-func regval))
     ('cons

This bug report was last modified 13 days ago.

Previous Next


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