Subject: Re: bug#50256: thing-at-mouse

From: Juri Linkov <[email-masked]>
Date: Wed, 01 Sep 2021 18:44:49 +0300

> I don't understand this: are you saying that in a selected window you
> see point different from window-point?  How does that happen?
>
>> Both 'event-start' and 'event-end' created an event
>> with the window equal to the selected window,
>> but point from some random buffer,
>> not from selected window's buffer.
>
> Can you show the recipe that produces this strange result?  (I looked
> at bug#9923, which you say is where this was reported, but couldn't
> find a recipe there for which you described the sequence of calls.)

Martin sent a test case for pos-visible-in-window-p, and here is
the test case for mouse-set-point that uses pos-visible-in-window-p.
In emacs -Q evaluate:

  (with-current-buffer "*Messages*"
    (mouse-set-point last-input-event))

and it moves point in *scratch* to the position of point of
the *Messages* buffer.