GNU bug report logs - #68947
30.0.50; Gnus article mode keybindings

Previous Next

Package: emacs;

Reported by: Pranshu <pranshusharma366 <at> gmail.com>

Date: Tue, 6 Feb 2024 08:54:01 UTC

Severity: normal

Found in version 30.0.50

To reply to this bug, email your comments to 68947 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 bug-gnu-emacs <at> gnu.org:
bug#68947; Package emacs. (Tue, 06 Feb 2024 08:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pranshu <pranshusharma366 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 06 Feb 2024 08:54:02 GMT) Full text and rfc822 format available.

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

From: Pranshu <pranshusharma366 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Gnus article mode keybindings
Date: Tue, 06 Feb 2024 18:29:30 +1000
Recipe from emacs -q:
1. M-x gnus
2. Select any group
3. Select a random article
4. do `W C-h' or C-h m

W C-h simply does not work while C-h m works, but does not show the
bound keys.


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.41, cairo version 1.18.0) of 2024-02-02 built on localhost
Repository revision: d89e427852a63dbeed3d5e03d9deb2ae9a8e3e1b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Parabola GNU/Linux-libre

Configured using:
 'configure --with-native-compilation --with-mailutils'

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

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

Major mode: Lisp Interaction

Minor modes in effect:
  winner-mode: t
  midnight-mode: t
  global-so-long-mode: t
  electric-pair-mode: t
  delete-selection-mode: t
  fido-vertical-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  fido-mode: t
  hyperbole-mode: t
  pranshu-edit-mode: t
  which-key-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  column-number-mode: 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
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(help-fns radix-tree cl-print shadow mail-extr emacsbug warnings
cus-start kotl-autoloads hyperbole-autoloads auto-capitalize string-edit
gnus-search eieio-opt cl-extra speedbar ezimage dframe gnus-icalendar
org-capture icalendar diary-lib diary-loaddefs smtpmail gnus-dired
skeleton oc-bibtex wdired ls-lisp mandoura solar cal-dst holidays
holiday-loaddefs proced time winner esh-mode esh-var eshell esh-cmd
esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util
standard-light-theme standard-themes ef-themes midnight so-long
elec-pair delsel icomplete savehist cc-mode cc-fonts cc-guess cc-menus
cc-cmds find-file cc-styles cc-align cc-engine cc-vars cc-defs
htmlfontify cus-edit cus-load hyperbole hinit hibtypes hib-doc-id klink
hib-kbd hib-debbugs hib-social hsys-www hypb-ert ert ewoc debug
backtrace hactypes bookmark pp hui-mini hui hui-mouse hmouse-key hargs
hsys-org org-element org-persist org-id org-refile avl-tree 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 org-version org-compat org-macs hmouse-tag etags
fileloop generator xref project find-func hmouse-info info hui-menu
hyrolo-menu hyrolo sort hui-jmenu hpath tramp trampver tramp-integration
files-x tramp-message tramp-compat xdg shell pcomplete format-spec
tramp-loaddefs noutline outline icons hmouse-sh hmouse-drv hui-window
pulse color hycontrol hui-select hsettings hui-em-but hbut view hbdata
hgnus gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig
gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo
gnus-start gnus-dbus dbus comp-run comp-common rx xml gnus-cloud nnimap
nnmail mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range gnus-win gnus nnheader range wid-edit hsmail message sendmail
yank-media puny rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util
time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader hmail htz cal-julian cal-menu calendar cal-loaddefs hbmap
hmoccur help-mode browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util url-parse auth-source eieio eieio-core password-cache json map
byte-opt bytecomp byte-compile url-vars mailcap hvar hypb locate hact
hhist compile text-property-search comint ansi-osc ansi-color ring set
hversion hload-path dired-preview dired dired-loaddefs vundo subr-x
derived which-key pcase easy-mmode cl-seq cl-macs gv 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 gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 469885 55947) (symbols 48 32456 6)
 (strings 32 107154 4415) (string-bytes 1 3980293) (vectors 16 48711)
 (vector-slots 8 596940 34765) (floats 8 1009 9235)
 (intervals 56 653 0) (buffers 984 16))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68947; Package emacs. (Tue, 06 Feb 2024 15:10:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Pranshu <pranshusharma366 <at> gmail.com>
Cc: 68947 <at> debbugs.gnu.org
Subject: Re: bug#68947: 30.0.50; Gnus article mode keybindings
Date: Tue, 06 Feb 2024 07:09:30 -0800
Pranshu <pranshusharma366 <at> gmail.com> writes:

> Recipe from emacs -q:
> 1. M-x gnus
> 2. Select any group
> 3. Select a random article
> 4. do `W C-h' or C-h m
>
> W C-h simply does not work while C-h m works, but does not show the
> bound keys.

FWIW I'm unable to reproduce this, using Emacs master. I'd be pretty
surprised if Gnus were able to break such low-level functionality, too.
Can you give us any more clues? Is this something that only started
happening recently?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68947; Package emacs. (Tue, 06 Feb 2024 15:44:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> suse.de>
To: Pranshu <pranshusharma366 <at> gmail.com>
Cc: 68947 <at> debbugs.gnu.org
Subject: Re: bug#68947: 30.0.50; Gnus article mode keybindings
Date: Tue, 06 Feb 2024 16:42:47 +0100
On Feb 06 2024, Pranshu wrote:

> Recipe from emacs -q:
> 1. M-x gnus
> 2. Select any group
> 3. Select a random article
> 4. do `W C-h' or C-h m
>
> W C-h simply does not work while C-h m works, but does not show the
> bound keys.

In gnus-article-mode, all self-inserting keys are bound to
gnus-article-read-summary-keys, which does special things.  They are
_not_ prefix keys.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68947; Package emacs. (Tue, 06 Feb 2024 20:34:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Andreas Schwab <schwab <at> suse.de>
Cc: Pranshu <pranshusharma366 <at> gmail.com>, 68947 <at> debbugs.gnu.org
Subject: Re: bug#68947: 30.0.50; Gnus article mode keybindings
Date: Tue, 06 Feb 2024 12:33:28 -0800
Andreas Schwab <schwab <at> suse.de> writes:

> On Feb 06 2024, Pranshu wrote:
>
>> Recipe from emacs -q:
>> 1. M-x gnus
>> 2. Select any group
>> 3. Select a random article
>> 4. do `W C-h' or C-h m
>>
>> W C-h simply does not work while C-h m works, but does not show the
>> bound keys.
>
> In gnus-article-mode, all self-inserting keys are bound to
> gnus-article-read-summary-keys, which does special things.  They are
> _not_ prefix keys.

(I didn't realize you meant with point in the article, sorry)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68947; Package emacs. (Sat, 10 Feb 2024 18:10:01 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Pranshu <pranshusharma366 <at> gmail.com>
Cc: 68947 <at> debbugs.gnu.org
Subject: Re: bug#68947: 30.0.50; Gnus article mode keybindings
Date: Sat, 10 Feb 2024 10:09:14 -0800
On 02/07/24 22:19 PM, Pranshu wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Pranshu <pranshusharma366 <at> gmail.com> writes:
>>
>>> Recipe from emacs -q:
>>> 1. M-x gnus
>>> 2. Select any group
>>> 3. Select a random article
>>> 4. do `W C-h' or C-h m
>>>
>>> W C-h simply does not work while C-h m works, but does not show the
>>> bound keys.
>>
>> FWIW I'm unable to reproduce this, using Emacs master. I'd be pretty
>> surprised if Gnus were able to break such low-level functionality, too.
>> Can you give us any more clues? Is this something that only started
>> happening recently?
>
> With the point in article mode, are you able to reproduce it?

(Sending this back to the bug report...)

Yes, I'm able to reproduce it, and it sent me down a really awful rabbit
hole -- gnus-art.el goes to huge lengths to make summary-mode
keybindings available in article mode. It uses this:

(substitute-key-definition
 #'undefined #'gnus-article-read-summary-keys gnus-article-mode-map)

to redirect all unbound keys to the `gnus-article-read-summary-keys'
function, which manually reads keys and dispatches to tweaked versions
of summary-mode commands.

Your immediate issue is caused by the fact that
`gnus-article-describe-bindings', which theoretically should be
responsible for telling the user about all the redirections, is only
aware of the "S" keymap prefix. It doesn't know all the ways in which an
'undefined binding might get translated into a valid summary-mode
command, and can't show you those.

To be honest, I don't think I'm going to be able to fix this. If we keep
the current implementation, `gnus-article-describe-bindings' would have
to be made aware of the additional redirections, and I wouldn't even
know where to start.

It could be that Elisp has better tools for this situation by now (the
original architecture was in place before 1997), but I'm not sure what
those tools are. Perhaps someone will chime in with a helpful
suggestion...

Eric




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68947; Package emacs. (Sat, 10 Feb 2024 18:16:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: pranshusharma366 <at> gmail.com, 68947 <at> debbugs.gnu.org
Subject: Re: bug#68947: 30.0.50; Gnus article mode keybindings
Date: Sat, 10 Feb 2024 20:15:19 +0200
> Cc: 68947 <at> debbugs.gnu.org
> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
> Date: Sat, 10 Feb 2024 10:09:14 -0800
> 
> Your immediate issue is caused by the fact that
> `gnus-article-describe-bindings', which theoretically should be
> responsible for telling the user about all the redirections, is only
> aware of the "S" keymap prefix. It doesn't know all the ways in which an
> 'undefined binding might get translated into a valid summary-mode
> command, and can't show you those.
> 
> To be honest, I don't think I'm going to be able to fix this. If we keep
> the current implementation, `gnus-article-describe-bindings' would have
> to be made aware of the additional redirections, and I wouldn't even
> know where to start.
> 
> It could be that Elisp has better tools for this situation by now (the
> original architecture was in place before 1997), but I'm not sure what
> those tools are. Perhaps someone will chime in with a helpful
> suggestion...

Strange as it may sound, I see no grave problem here: C-h is not
guaranteed to work after any arbitrary prefix, anyway.  So if that is
too hard to fix, we could just punt and leave it unsolved.

What about "C-h b" -- does that work in the situation described by the
recipe?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68947; Package emacs. (Sat, 10 Feb 2024 19:00:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: pranshusharma366 <at> gmail.com, 68947 <at> debbugs.gnu.org
Subject: Re: bug#68947: 30.0.50; Gnus article mode keybindings
Date: Sat, 10 Feb 2024 10:59:21 -0800
On 02/10/24 20:15 PM, Eli Zaretskii wrote:
>> Cc: 68947 <at> debbugs.gnu.org
>> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
>> Date: Sat, 10 Feb 2024 10:09:14 -0800
>> 
>> Your immediate issue is caused by the fact that
>> `gnus-article-describe-bindings', which theoretically should be
>> responsible for telling the user about all the redirections, is only
>> aware of the "S" keymap prefix. It doesn't know all the ways in which an
>> 'undefined binding might get translated into a valid summary-mode
>> command, and can't show you those.
>> 
>> To be honest, I don't think I'm going to be able to fix this. If we keep
>> the current implementation, `gnus-article-describe-bindings' would have
>> to be made aware of the additional redirections, and I wouldn't even
>> know where to start.
>> 
>> It could be that Elisp has better tools for this situation by now (the
>> original architecture was in place before 1997), but I'm not sure what
>> those tools are. Perhaps someone will chime in with a helpful
>> suggestion...
>
> Strange as it may sound, I see no grave problem here: C-h is not
> guaranteed to work after any arbitrary prefix, anyway.  So if that is
> too hard to fix, we could just punt and leave it unsolved.

I'm inclined to say it's too hard to fix! The only cleaner solution I
can think of is to actually define article-mode versions of all the
summary-mode commands we'd want to call, which would also provide a
place to do the necessary article-specific adjustments. That's a lot of
very tightly-coupled code, though.

> What about "C-h b" -- does that work in the situation described by the
> recipe?

No, that doesn't really work. The gnus-article-mode bindings are listed
under a "fundamental-mode Major Mode Bindings:" heading (??). That
includes gnus-article-mode's own keybindings, and the summary-mode
bindings that have been explicitly attached at the "S" prefix, but
nothing else.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68947; Package emacs. (Sat, 17 Feb 2024 18:14:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: pranshusharma366 <at> gmail.com, 68947 <at> debbugs.gnu.org
Subject: Re: bug#68947: 30.0.50; Gnus article mode keybindings
Date: Sat, 17 Feb 2024 10:13:02 -0800
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> On 02/10/24 20:15 PM, Eli Zaretskii wrote:
>>> Cc: 68947 <at> debbugs.gnu.org
>>> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
>>> Date: Sat, 10 Feb 2024 10:09:14 -0800
>>> 
>>> Your immediate issue is caused by the fact that
>>> `gnus-article-describe-bindings', which theoretically should be
>>> responsible for telling the user about all the redirections, is only
>>> aware of the "S" keymap prefix. It doesn't know all the ways in which an
>>> 'undefined binding might get translated into a valid summary-mode
>>> command, and can't show you those.
>>> 
>>> To be honest, I don't think I'm going to be able to fix this. If we keep
>>> the current implementation, `gnus-article-describe-bindings' would have
>>> to be made aware of the additional redirections, and I wouldn't even
>>> know where to start.
>>> 
>>> It could be that Elisp has better tools for this situation by now (the
>>> original architecture was in place before 1997), but I'm not sure what
>>> those tools are. Perhaps someone will chime in with a helpful
>>> suggestion...
>>
>> Strange as it may sound, I see no grave problem here: C-h is not
>> guaranteed to work after any arbitrary prefix, anyway.  So if that is
>> too hard to fix, we could just punt and leave it unsolved.
>
> I'm inclined to say it's too hard to fix! The only cleaner solution I
> can think of is to actually define article-mode versions of all the
> summary-mode commands we'd want to call, which would also provide a
> place to do the necessary article-specific adjustments. That's a lot of
> very tightly-coupled code, though.
>
>> What about "C-h b" -- does that work in the situation described by the
>> recipe?
>
> No, that doesn't really work. The gnus-article-mode bindings are listed
> under a "fundamental-mode Major Mode Bindings:" heading (??). That
> includes gnus-article-mode's own keybindings, and the summary-mode
> bindings that have been explicitly attached at the "S" prefix, but
> nothing else.

I don't know, I don't see a good solution to this without a massive
rewrite, which I don't have the stomach for right now. Should we leave
the bug open, since it's a real problem?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68947; Package emacs. (Sat, 17 Feb 2024 18:16:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: pranshusharma366 <at> gmail.com, 68947 <at> debbugs.gnu.org
Subject: Re: bug#68947: 30.0.50; Gnus article mode keybindings
Date: Sat, 17 Feb 2024 20:14:46 +0200
> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
> Cc: pranshusharma366 <at> gmail.com,  68947 <at> debbugs.gnu.org
> Date: Sat, 17 Feb 2024 10:13:02 -0800
> 
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
> 
> > On 02/10/24 20:15 PM, Eli Zaretskii wrote:
> >>> Cc: 68947 <at> debbugs.gnu.org
> >>> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
> >>> Date: Sat, 10 Feb 2024 10:09:14 -0800
> >>> 
> >>> Your immediate issue is caused by the fact that
> >>> `gnus-article-describe-bindings', which theoretically should be
> >>> responsible for telling the user about all the redirections, is only
> >>> aware of the "S" keymap prefix. It doesn't know all the ways in which an
> >>> 'undefined binding might get translated into a valid summary-mode
> >>> command, and can't show you those.
> >>> 
> >>> To be honest, I don't think I'm going to be able to fix this. If we keep
> >>> the current implementation, `gnus-article-describe-bindings' would have
> >>> to be made aware of the additional redirections, and I wouldn't even
> >>> know where to start.
> >>> 
> >>> It could be that Elisp has better tools for this situation by now (the
> >>> original architecture was in place before 1997), but I'm not sure what
> >>> those tools are. Perhaps someone will chime in with a helpful
> >>> suggestion...
> >>
> >> Strange as it may sound, I see no grave problem here: C-h is not
> >> guaranteed to work after any arbitrary prefix, anyway.  So if that is
> >> too hard to fix, we could just punt and leave it unsolved.
> >
> > I'm inclined to say it's too hard to fix! The only cleaner solution I
> > can think of is to actually define article-mode versions of all the
> > summary-mode commands we'd want to call, which would also provide a
> > place to do the necessary article-specific adjustments. That's a lot of
> > very tightly-coupled code, though.
> >
> >> What about "C-h b" -- does that work in the situation described by the
> >> recipe?
> >
> > No, that doesn't really work. The gnus-article-mode bindings are listed
> > under a "fundamental-mode Major Mode Bindings:" heading (??). That
> > includes gnus-article-mode's own keybindings, and the summary-mode
> > bindings that have been explicitly attached at the "S" prefix, but
> > nothing else.
> 
> I don't know, I don't see a good solution to this without a massive
> rewrite, which I don't have the stomach for right now. Should we leave
> the bug open, since it's a real problem?

Fine with me.




This bug report was last modified 76 days ago.

Previous Next


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