GNU bug report logs -
#50256
thing-at-mouse
Previous Next
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
View this message in rfc822 format
> Cc: larsi <at> gnus.org, juri <at> linkov.net, 50256 <at> debbugs.gnu.org
> From: martin rudalics <rudalics <at> gmx.at>
> Date: Thu, 2 Sep 2021 16:43:02 +0200
>
> >> >> pos_visible_p already does
> >> >>
> >> >> if (XBUFFER (w->contents) != current_buffer)
> >> >> {
> >> >> old_buffer = current_buffer;
> >> >> set_buffer_internal_1 (XBUFFER (w->contents));
> >> >> }
> >> >
> >> > I'm asking if this is the desired behavior, when Lisp runs this inside
> >> > with-current-buffer?
> >>
> >> It is the _necessary_ behavior when WINDOW is not the selected window
> >> and its buffer is not current.
> >
> > But in the case in point, WINDOWS _was_ the selected window. That's
> > why pos-visible-in-window-p used PT. Which is what you said was the
> > bug. Or am I missing something?
>
> No. The above was meant in response to your earlier:
>
> If we want to support the current documentation to the letter, the
> only way of doing that I know of is to force WINDOW to display the
> current buffer, at least internally, i.e. to switch to the WINDOW's
> buffer for the duration of pos-visible-in-window-p.
>
> I mean that we needn't do that because pos_visible_p already does it.
> So I'd just propose to do the trivial (line numbers are not trunk's);
Yes, but I'd prefer that we first established what is the desired
behavior in this case:
> (pop-to-buffer "*Messages*")
> (with-current-buffer "*scratch*"
> (pos-visible-in-window-p nil nil t)))
IOW, what to do when WINDOW is the selected window, but the current
buffer is not the buffer shown in WINDOW?
Would you please humor me with an answer to my question? I'd also
like to hear from Lars and Juri about this. Without the agreement
about the behavior in that use case, I don't see how we can reason
about the fix.
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.