GNU bug report logs - #57837
29.0.50; fit-window-to-buffer should reposition the buffer

Previous Next

Package: emacs;

Reported by: sds <at> gnu.org

Date: Thu, 15 Sep 2022 17:32:01 UTC

Severity: normal

Found in version 29.0.50

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: 57837 <at> debbugs.gnu.org, sds <at> gnu.org
Subject: Re: bug#57837: 29.0.50;
 fit-window-to-buffer should reposition the buffer
Date: Sat, 17 Sep 2022 09:48:43 +0300
> Cc: 57837 <at> debbugs.gnu.org
> Date: Fri, 16 Sep 2022 21:34:01 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> 
> > is it possible for Emacs return nil from (pos-visible-in-window-p 
> > (point))
> 
> It is not impossible, but if it happens, it's a bug.

Actually, it _is_ possible and is not a bug, but only as long as
redisplay didn't happen.  IOW, you can, for example, write a command
that moves point in a way that would make point be outside of the
window, and then pos-visible-in-window-p will return nil for it.  But
as soon as the command finishes, redisplay will scroll the window to
bring point into view.

This is exactly what you see in this case.

> I get that that's your preference, but I hope you understand that this is 
> a corner case, and that what the code does is not a bug.

Right.




This bug report was last modified 2 years and 325 days ago.

Previous Next


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