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: Wed, 23 Mar 2016 21:18:10 +0200 Message-ID: <83d1ql2ebx.fsf@gnu.org> References: <87r3f19gx0.fsf@loki.jorgenschaefer.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1458760764 18501 80.91.229.3 (23 Mar 2016 19:19:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 19:19:24 +0000 (UTC) Cc: 23098@debbugs.gnu.org To: Jorgen Schaefer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 23 20:19:13 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 1aioJF-0007VY-6S for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Mar 2016 20:19:13 +0100 Original-Received: from localhost ([::1]:45552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aioJE-0001vl-He for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Mar 2016 15:19:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aioJ8-0001va-8W for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 15:19:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aioJ4-0002HI-6Y for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 15:19:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aioJ4-0002HC-3I for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 15:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aioJ3-0002go-V3 for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 15:19: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: Wed, 23 Mar 2016 19:19: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.145876072010312 (code B ref 23098); Wed, 23 Mar 2016 19:19:01 +0000 Original-Received: (at 23098) by debbugs.gnu.org; 23 Mar 2016 19:18:40 +0000 Original-Received: from localhost ([127.0.0.1]:34761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aioIi-0002gG-8e for submit@debbugs.gnu.org; Wed, 23 Mar 2016 15:18:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aioIg-0002g3-42 for 23098@debbugs.gnu.org; Wed, 23 Mar 2016 15:18:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aioIX-000211-23 for 23098@debbugs.gnu.org; Wed, 23 Mar 2016 15:18:33 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aioIW-00020x-Us; Wed, 23 Mar 2016 15:18:28 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2371 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aioIV-0002mU-99; Wed, 23 Mar 2016 15:18:28 -0400 In-reply-to: <87r3f19gx0.fsf@loki.jorgenschaefer.de> (message from Jorgen Schaefer on Wed, 23 Mar 2016 19:40:27 +0100) 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:115407 Archived-At: > From: Jorgen Schaefer > Date: Wed, 23 Mar 2016 19:40:27 +0100 > > Evaluating the following code in "emacs -Q" leaves point in the middle > of the window, instead of at the end of the window as expected. Certain > modes (IRC) want to keep the buffer flushed at the end of the window, > this problem interferes with that behavior and causes very weird jumpy > scrolling. > > > (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) > (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)) > > > That is, if there is a multi-line overlay that would be shown only > halfway. I'm not sure I understand: are you trying to display a window whose start point is in the middle of an overlay string? That's not possible, AFAIK. The window-start point must be a buffer position.