GNU bug report logs - #50256
thing-at-mouse

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 29 Aug 2021 17:44:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

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

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50256 <at> debbugs.gnu.org
Subject: Re: bug#50256: thing-at-mouse
Date: Tue, 31 Aug 2021 20:52:43 +0300
> 3. mouse-set-point calls (posn-set-point (event-end event))
>
> 4. in posn-set-point:
> 4.1. (select-window (posn-window position))
>      switches back to the original *info* buffer
>      that was selected in the window;
>
> 4.2. (goto-char (posn-point position))
>      goes to the position that event-end got from the *Help* buffer,
>      so in the *info* buffer moves to the position from the *Help* buffer.
>
> So maybe need to add the same condition that I already added to 2 places:
>
>     (eq (window-buffer (posn-window (event-start event)))
>                        (current-buffer))
>
> but I have no idea at what level to add it: in mouse-set-point?
> Or deeper in posn-set-point?  Both are quite low-level,
> and I don't know if this might break something.

There are more context-menu-functions that use mouse-set-point
that fails with 'C-h m', e.g.:

  (defun context-menu-ffap (menu)
    "File at point menu."
    (save-excursion
      (mouse-set-point last-input-event)
      (when (ffap-guess-file-name-at-point)

So maybe the check for current-buffer above should be added
to mouse-set-point.  Or maybe it's not backward-compatible,
I'm not sure.




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

Previous Next


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