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
> Then what is the semantics of the code snippet above, and why did you
> call with-current-buffer the second time? What did you want to
> accomplish, except make a point?
I tried to write a simple example with emacs -Q showing how code breaks
a contract stated in a manual.
> IOW, what kind of real-life situation needs such a code?
Any call of `pos-visible-in-window-p' might happen within the context of
`with-current-buffer'. Just check how often these forms are used in the
Emacs code base.
>> (pos-visible-in-window-p nil nil t) should never return nil as it
>> does in the above recipe.
>
> Why not?
Because in the manual we say that
"The argument POSITION defaults to the current position
of point in WINDOW; WINDOW defaults to the selected window."
If the current buffer is not shown in WINDOW, the first part of this
sentence is wrong.
martin
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.