GNU bug report logs - #76620
30.1.50; mouse-1 mode-line bindings are unusable when point is on a button

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Thu, 27 Feb 2025 23:14:02 UTC

Severity: normal

Found in version 30.1.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, jonas <at> bernoul.li, 76620 <at> debbugs.gnu.org
Subject: bug#76620: 30.1.50; mouse-1 mode-line bindings are unusable when point is on a button
Date: Sun, 07 Sep 2025 11:21:06 -0400
>> I'm not sure I understand the logic of this change, so please
>> elaborate, by showing the form(s) of POSITION for which the current
>> code doesn't work, and please explain how this patch fixes that.
> When you click on a part of the mode line which is after the end of
> mode-line-format, (at least on GNU/Linux) you get an event like this:
>
> (down-mouse-1 (#<window 3 on *Bugs*> mode-line (2379 . 2071) 21536370
>  nil nil (157 . 88) nil (8 . 19) (15 . 32)))
>
> posn-string is nil for this but it's still in the mode-line.  My change
> checks for whether a position is in the mode-line before checking if
> posn-string is nil, so it catches such events.

I suspect this answer (in one way or another) should find its way either
into a comment or into the commit message.
[ I tend to have that impression for most questions that occur during
  a code review, tho, so maybe it's just me.  ]

I have a more demanding request: any chance we could concoct an ERT test
for that?  I realize that it might be difficult, but we keep skipping
such "UI" tests because they're difficult, so I think we should try to
slowly get closer to having an actual test suite of the UI elements.
If you can identify one obstacle that makes it currently impossible,
maybe we can fix that obstacle, and thus make one step in that direction.


        Stefan





This bug report was last modified 10 days ago.

Previous Next


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