GNU bug report logs - #23098
25.0.92; (recenter -1) can leave point in the middle of the window

Previous Next

Package: emacs;

Reported by: Jorgen Schaefer <jorgen.schaefer <at> gmail.com>

Date: Wed, 23 Mar 2016 18:41:01 UTC

Severity: normal

Found in version 25.0.92

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jorgen Schäfer <jorgen.schaefer <at> gmail.com>
Cc: 23098 <at> debbugs.gnu.org
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Date: Thu, 24 Mar 2016 18:38:12 +0200
> From: Jorgen Schäfer <jorgen.schaefer <at> gmail.com>
> Date: Thu, 24 Mar 2016 16:27:53 +0000
> Cc: 23098 <at> debbugs.gnu.org
> 
> > If you do the above, do you still get the cursor recentered in the
> > window?
> 
> Hm. That seems to work.

OK, so at least we see the same behavior.

> I was using let-binding around recenter, which does not work.

Indeed, it won't work because the value of scroll-conservatively needs
to be seen by redisplay, which runs after the code of the test case
finishes execution.  You could try let-binding it around a call to
'redisplay', but that's probably gross.

>  Even resetting
> scroll-conservatively after the call to recenter will exhibit the bug again. So setting scroll-conservatively is a
> possible workaround, although it means that *all* scrolling will be affected by scroll-conservatively. E.g.
> scrolling through the backlog of a M-x shell session would be affected, even though it just should affect the
> scrolling when the last line of the buffer is visible at all.

Well, setting scroll-conservatively is the only way in Emacs to
reliably avoid recentering of point in all kinds of corner cases.  So
if you cannot use that setting, I'm afraid I'm out of ideas.

Thanks.




This bug report was last modified 9 years and 88 days ago.

Previous Next


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