GNU bug report logs - #53910
29.0.50; context-menu-mode breaks help in read-only buffers

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Thu, 10 Feb 2022 00:17:01 UTC

Severity: normal

Tags: confirmed

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Ergus <spacibba <at> aol.com>, 53910 <at> debbugs.gnu.org
Subject: bug#53910: 29.0.50; context-menu-mode breaks help in read-only buffers
Date: Thu, 10 Feb 2022 10:54:29 +0200
>> M-x context-menu-mode
>> C-h b
>>
>> Just a message is shown in the echo area like an error because the
>> buffer is read only (and such text can't be inserted...).
>
> I can reproduce this bug, and I can't get a backtrace either, even with
> debug-on-signal, which is unusual.
>
> I had a brief peek at context-menu-mode to see whether it was obvious
> what was breaking, but nothing really stood out (but then again, I'm not
> very familiar with that code).

I can't reproduce this bug in Emacs 28, only in Emacs 29.
This means that the problem is new.  In describe-map
this line switches buffers from *Help* to the window buffer:

  (eq definition (lookup-key tail (vector event) t))

And indeed

  (with-temp-buffer
    (message "%S" (current-buffer))
    (lookup-key (cddr context-menu-mode-map) [down-mouse-3] t)
    (message "%S" (current-buffer)))

displays:

  #<buffer  *temp*>
  #<buffer *scratch*>

This is because of this line recently added to context-menu-map:

  (select-window (posn-window (event-start click)))

that switches buffers.

But the question remains: does describe-map really need to build
the complete context menu or should it ignore its :filter keyword?




This bug report was last modified 3 years and 149 days ago.

Previous Next


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