From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83y49725mz.fsf@gnu.org> References: <87r3f19gx0.fsf@loki.jorgenschaefer.de> <83d1ql2ebx.fsf@gnu.org> <83a8lp2bd4.fsf@gnu.org> <8360wb3mj5.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1458837570 29160 80.91.229.3 (24 Mar 2016 16:39:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Mar 2016 16:39:30 +0000 (UTC) Cc: 23098@debbugs.gnu.org To: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 24 17:39:19 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aj8Ht-0000mU-ND for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Mar 2016 17:39:09 +0100 Original-Received: from localhost ([::1]:51784 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8Ht-0000S1-1j for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Mar 2016 12:39:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8Hp-0000Rk-IS for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 12:39:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj8Hm-0001Nw-AZ for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 12:39:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8Hm-0001Ns-7I for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 12:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aj8Hm-0000yp-2J for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 12:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Mar 2016 16:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23098 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23098-submit@debbugs.gnu.org id=B23098.14588375163734 (code B ref 23098); Thu, 24 Mar 2016 16:39:02 +0000 Original-Received: (at 23098) by debbugs.gnu.org; 24 Mar 2016 16:38:36 +0000 Original-Received: from localhost ([127.0.0.1]:36387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aj8HM-0000yA-Ae for submit@debbugs.gnu.org; Thu, 24 Mar 2016 12:38:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aj8HK-0000xv-QD for 23098@debbugs.gnu.org; Thu, 24 Mar 2016 12:38:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj8HC-0001Lh-KH for 23098@debbugs.gnu.org; Thu, 24 Mar 2016 12:38:29 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8HC-0001Ld-HG; Thu, 24 Mar 2016 12:38:26 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3447 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aj8HB-0000pq-Sv; Thu, 24 Mar 2016 12:38:26 -0400 In-reply-to: (message from Jorgen =?UTF-8?Q?Sch=C3=A4fer?= on Thu, 24 Mar 2016 16:27:53 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115445 Archived-At: > From: Jorgen Schäfer > Date: Thu, 24 Mar 2016 16:27:53 +0000 > Cc: 23098@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.