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 17:47:58 +0200 Message-ID: <8360wb3mj5.fsf@gnu.org> References: <87r3f19gx0.fsf@loki.jorgenschaefer.de> <83d1ql2ebx.fsf@gnu.org> <83a8lp2bd4.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 1458834562 10501 80.91.229.3 (24 Mar 2016 15:49:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Mar 2016 15:49:22 +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 16:49:12 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 1aj7VX-000393-Fu for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Mar 2016 16:49:11 +0100 Original-Received: from localhost ([::1]:51156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj7VW-0002nk-C7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Mar 2016 11:49:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj7VR-0002mg-61 for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 11:49:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj7VO-0002tP-00 for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 11:49:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj7VN-0002tL-Sc for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 11:49:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aj7VN-00081K-Lf for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 11:49:01 -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 15:49:01 +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.145883450430784 (code B ref 23098); Thu, 24 Mar 2016 15:49:01 +0000 Original-Received: (at 23098) by debbugs.gnu.org; 24 Mar 2016 15:48:24 +0000 Original-Received: from localhost ([127.0.0.1]:36302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aj7Um-00080S-E7 for submit@debbugs.gnu.org; Thu, 24 Mar 2016 11:48:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aj7Uk-00080E-Hf for 23098@debbugs.gnu.org; Thu, 24 Mar 2016 11:48:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj7Ua-0002p1-Db for 23098@debbugs.gnu.org; Thu, 24 Mar 2016 11:48:17 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj7Ua-0002ov-Ar; Thu, 24 Mar 2016 11:48:12 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3353 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aj7UZ-0007dn-Ne; Thu, 24 Mar 2016 11:48:12 -0400 In-reply-to: (message from Jorgen =?UTF-8?Q?Sch=C3=A4fer?= on Thu, 24 Mar 2016 08:12:08 +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:115440 Archived-At: > From: Jorgen Schäfer > Date: Thu, 24 Mar 2016 08:12:08 +0000 > Cc: 23098@debbugs.gnu.org > > > If you set scroll-conservatively to a value larger than 100, don't you > > get point as low as possible? > > No. That's strange. Let me be absolutely sure we are trying the same thing. What I did is the following: . emacs -Q . paste the following into *scratch*, which is exactly the code you posted with a single line added: (require 'cl) (let* ((b (get-buffer-create "*Bug Repro*")) (w (selected-window)) (l (window-height w)) o) (set-window-buffer w b) (select-window w) (set-buffer b) (erase-buffer) (setq scroll-conservatively 101) ;; <<<<< this line was added (cl-dotimes (i (* l 2)) (insert "foo\n")) (goto-char (point-min)) (forward-line (+ l 2)) (setq o (make-overlay (point) (point))) (overlay-put o 'after-string "\n") (goto-char (point-max)) (recenter -1)) . M-x eval-region RET After this, buffer "*Bug Repro*" pops up, with point at EOB positioned on the 2nd line from bottom of the window (instead of the last line). If you do the above, do you still get the cursor recentered in the window? If so, I will try to play with display defaults in order to reproduce what you see. Thanks.