GNU logs - #23098, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Jorgen Schaefer <jorgen.schaefer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 23 Mar 2016 18:41:01 +0000
Resent-Message-ID: <handler.23098.B.14587584406908 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 23098 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.14587584406908
          (code B ref -1); Wed, 23 Mar 2016 18:41:01 +0000
Received: (at submit) by debbugs.gnu.org; 23 Mar 2016 18:40:40 +0000
Received: from localhost ([127.0.0.1]:34743 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ainhw-0001nM-JU
	for submit <at> debbugs.gnu.org; Wed, 23 Mar 2016 14:40:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44006)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1ainhv-0001n9-7G
 for submit <at> debbugs.gnu.org; Wed, 23 Mar 2016 14:40:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1ainho-0000up-Jf
 for submit <at> debbugs.gnu.org; Wed, 23 Mar 2016 14:40:33 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:59141)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1ainho-0000uk-H1
 for submit <at> debbugs.gnu.org; Wed, 23 Mar 2016 14:40:32 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34974)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1ainhn-0007mS-LN
 for bug-gnu-emacs@HIDDEN; Wed, 23 Mar 2016 14:40:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1ainhm-0000uP-JR
 for bug-gnu-emacs@HIDDEN; Wed, 23 Mar 2016 14:40:31 -0400
Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:32817)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1ainhm-0000uJ-CZ
 for bug-gnu-emacs@HIDDEN; Wed, 23 Mar 2016 14:40:30 -0400
Received: by mail-wm0-x22e.google.com with SMTP id l68so245503666wml.0
 for <bug-gnu-emacs@HIDDEN>; Wed, 23 Mar 2016 11:40:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:date:message-id:mime-version;
 bh=NGxjo6dogXAXussS96ZmrJrLS41ARqdczWqpYhbBLEA=;
 b=e7ZrPip9SBe1vMHfTlrVsgjeywvS99eWwKBATPixTJvQzKMiv4QjXYobV7iOuK5vIv
 WRuReEdV94q9eLzmr/yewsPQaqKlgqk/6jJ2Jj7dBb4PWjLJg1NV1n6r0fgYgyn8zase
 BBENoeS24zhNfYGd3r+JTCkKsldmvqszEav3d4lGqzK1uzKFyovNnQZ4kJC+4AI+DaDf
 zu1M10AJX7KuKxeF4UWyWwLvwJIx91wj9HRn1pKS1giu7g9WaSkG3ewG4Qv0YhPSaRL7
 u95tfiKgdspa7EaiAM49vZn9kWLrJIhp3qzw7a/vA4cokYXBu0jvso+JgnhRdv6CMHmO
 9H6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=NGxjo6dogXAXussS96ZmrJrLS41ARqdczWqpYhbBLEA=;
 b=CtTF/vPBk18jWpzNHlGTD1PbE2ck7Kg+ogtdnxQ+FIalfYuchP8g9Rq+Cd5mrRCrms
 LTqq0YgcxZel42Cr8Xb3rLYlRuUYATXMli4TwsyhMUvaINpu834w3CNsoY5lBgAUERki
 mLI0Tn6vQFjKCx7liqZKtB7h0E3Ja0unnGX4rin21F9ohkzlEM+GH7d9tfLoOZ9X+QfP
 t7AUOkXTuPcQ1EArgWT9phJvGVaBOvc4c3bVCDOPMVLyC0OW5/1tni8ZNcCh1XvTnLrn
 GGWESsrH1THjpacMxrC+217JmJSQhsTaxaKD1fIy9R43hcUe9hhmgMtC6VonR2GUGfWo
 CvVA==
X-Gm-Message-State: AD7BkJJx/1a9mwQXt5Z/Xjo76gcb5JQr3sQsauRMxu7nn6ykQpx2VEs9V+AGTya6VYV7cw==
X-Received: by 10.194.223.104 with SMTP id qt8mr5061000wjc.11.1458758429160;
 Wed, 23 Mar 2016 11:40:29 -0700 (PDT)
Received: from loki.jorgenschaefer.de (loki.jorgenschaefer.de.
 [2a01:488:66:1000:5c33:a55f:0:1])
 by smtp.gmail.com with ESMTPSA id d2sm3821595wjf.28.2016.03.23.11.40.27
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 23 Mar 2016 11:40:27 -0700 (PDT)
From: Jorgen Schaefer <jorgen.schaefer@HIDDEN>
X-Google-Original-From: Jorgen Schaefer <contact@HIDDEN>
Received: (nullmailer pid 15106 invoked by uid 1000);
 Wed, 23 Mar 2016 18:40:27 -0000
Date: Wed, 23 Mar 2016 19:40:27 +0100
Message-ID: <87r3f19gx0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Hello!

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 have seen similar behavior with some forms of invisible text, but have
not been able to create reproduction steps for that.

Regards,
Jorgen


In GNU Emacs 25.0.92.1 (x86_64-unknown-linux-gnu)
 of 2016-03-14 built on loki.jorgenschaefer.de
Repository revision: 1b9d6163b023aaefd15d38ea28e968a113202402
System Description:	Debian GNU/Linux 8.3 (jessie)

Configured using:
 'configure --enable-checking --without-x 'CFLAGS=-ggdb3 -O0'
 LDFLAGS=-ggdb3'




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Jorgen Schaefer <jorgen.schaefer@HIDDEN>
Subject: bug#23098: Acknowledgement (25.0.92; (recenter -1) can leave
 point in the middle of the window)
Message-ID: <handler.23098.B.14587584406908.ack <at> debbugs.gnu.org>
References: <87r3f19gx0.fsf@HIDDEN>
X-Gnu-PR-Message: ack 23098
X-Gnu-PR-Package: emacs
Reply-To: 23098 <at> debbugs.gnu.org
Date: Wed, 23 Mar 2016 18:41:01 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 23098 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
23098: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D23098
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 23 Mar 2016 19:19:01 +0000
Resent-Message-ID: <handler.23098.B23098.145876072010312 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jorgen Schaefer <jorgen.schaefer@HIDDEN>
Cc: 23098 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.145876072010312
          (code B ref 23098); Wed, 23 Mar 2016 19:19:01 +0000
Received: (at 23098) by debbugs.gnu.org; 23 Mar 2016 19:18:40 +0000
Received: from localhost ([127.0.0.1]:34761 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aioIi-0002gG-8e
	for submit <at> debbugs.gnu.org; Wed, 23 Mar 2016 15:18:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53704)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1aioIg-0002g3-42
 for 23098 <at> debbugs.gnu.org; Wed, 23 Mar 2016 15:18:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1aioIX-000211-23
 for 23098 <at> debbugs.gnu.org; Wed, 23 Mar 2016 15:18:33 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56964)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1aioIW-00020x-Us; Wed, 23 Mar 2016 15:18:28 -0400
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 <eliz@HIDDEN>)
 id 1aioIV-0002mU-99; Wed, 23 Mar 2016 15:18:28 -0400
Date: Wed, 23 Mar 2016 21:18:10 +0200
Message-Id: <83d1ql2ebx.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <87r3f19gx0.fsf@HIDDEN> (message from Jorgen
 Schaefer on Wed, 23 Mar 2016 19:40:27 +0100)
References: <87r3f19gx0.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Jorgen Schaefer <jorgen.schaefer@HIDDEN>
> 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.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 23 Mar 2016 19:42:01 +0000
Resent-Message-ID: <handler.23098.B23098.145876206812865 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 23098 <at> debbugs.gnu.org
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.145876206812865
          (code B ref 23098); Wed, 23 Mar 2016 19:42:01 +0000
Received: (at 23098) by debbugs.gnu.org; 23 Mar 2016 19:41:08 +0000
Received: from localhost ([127.0.0.1]:34766 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aioeS-0003LQ-61
	for submit <at> debbugs.gnu.org; Wed, 23 Mar 2016 15:41:08 -0400
Received: from mail-lf0-f50.google.com ([209.85.215.50]:33208)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1aioeQ-0003Kz-Px
 for 23098 <at> debbugs.gnu.org; Wed, 23 Mar 2016 15:41:07 -0400
Received: by mail-lf0-f50.google.com with SMTP id o73so19220849lfe.0
 for <23098 <at> debbugs.gnu.org>; Wed, 23 Mar 2016 12:41:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=qt3E6pcPr7Soqv2NmK/CQP5xQMwntWpQ26esfcSCcSo=;
 b=i4v9duHNLuxvMi21/p6z4HpNISm+1n0idVvCH56NDyNArkPpt/ZkF5mfKBv/BodpHI
 2J4wbCN7MZwXfgmgC0vcRK3NKsE1HmP/IjN1y46W1vzgFbNyFuqdAeI1QLI+WK6gg60g
 Nh2IbV9N30/aJ9FPM0LAw8500sQYiRqeoeTkDQlztZF5qrDd8dmdCo/8NLflWnq0ALf1
 zwK/BFDpmCf7hRR5JDL0EV6908YwAmG/5Wa9t1CeBrxl76iMLmBX4xacv35wKqkrl8Ww
 TBaaLlB5fs49iWqEBbRizkvDi+R9ZJGYOyc0zHx/CPs6g3T5lP3P+rj3v5rya8NWNc9S
 eCQg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=qt3E6pcPr7Soqv2NmK/CQP5xQMwntWpQ26esfcSCcSo=;
 b=gM3a6h+lD5nCuiXew0C4RIDcMJXWhCNTvzvptOLAUEjpRBJLYzeiuzPxnYY1feQcdW
 pCTe18TaInWaHXFcLfwoDhcqV8YnJQAqXm4EfduoVdsgW5JH5W565rCLfe2cEiQmgFhp
 tuhlQoN5UlWFEO0oix0uGmMVnAzZv1D+wiryGR6zla/bWJArDPAnfxinCQch80EuJ2u+
 rlhKpfTGzIEmgeC5KM/fm+diuk7RSGgdiiyEazUTK7beBkTRHfvKCngBPXF6IipqAL05
 O++JgkyZmPpg0gTKn4L/LE7DfhGCrCfviaPk+6u45LHpIoYgCahW7f8/oQJmrmlinjnd
 I5GQ==
X-Gm-Message-State: AD7BkJLs2x2iAM0KLdUxG56YUxGZn7h5F1KaGJFUikqtvpJk+MC5eYabJX87lbmDrx+X4uFE1aaKx2K5rMmBOA==
X-Received: by 10.25.21.94 with SMTP id l91mr1963262lfi.25.1458762060806; Wed,
 23 Mar 2016 12:41:00 -0700 (PDT)
MIME-Version: 1.0
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
In-Reply-To: <83d1ql2ebx.fsf@HIDDEN>
From: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Date: Wed, 23 Mar 2016 19:40:50 +0000
Message-ID: <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
Content-Type: multipart/alternative; boundary=001a113f17d6723f3e052ebc82d8
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a113f17d6723f3e052ebc82d8
Content-Type: text/plain; charset=UTF-8

Hello!
The use case here are buffers like comint or IRC chat buffers. It's nice to
keep the last line of the buffer flush with the last line of the window, to
show the maximum amount of data. (recenter -1) at the end of a buffer is
supposed to do just that. In this case, it does not, but instead leaves
point in the *middle* of the window.

If it is not possible to display that line halfway (which sounds like a
missing feature to begin with), I would expect Emacs to least try to leave
point as low in the window as possible, instead of in the middle of the
window. C-l likewise won't move point any further down, for example.

Regards,
Jorgen

On Wed, Mar 23, 2016 at 8:18 PM Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Jorgen Schaefer <jorgen.schaefer@HIDDEN>
> > 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.
>

--001a113f17d6723f3e052ebc82d8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello!<div>The use case here are buffers like comint or IR=
C chat buffers. It&#39;s nice to keep the last line of the buffer flush wit=
h the last line of the window, to show the maximum amount of data. (recente=
r -1) at the end of a buffer is supposed to do just that. In this case, it =
does not, but instead leaves point in the *middle* of the window.</div><div=
><br></div><div>If it is not possible to display that line halfway (which s=
ounds like a missing feature to begin with), I would expect Emacs to least =
try to leave point as low in the window as possible, instead of in the midd=
le of the window. C-l likewise won&#39;t move point any further down, for e=
xample.</div><div><br></div><div>Regards,</div><div>Jorgen</div></div><br><=
div class=3D"gmail_quote"><div dir=3D"ltr">On Wed, Mar 23, 2016 at 8:18 PM =
Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrot=
e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex">&gt; From: Jorgen Schaefer &lt;<=
a href=3D"mailto:jorgen.schaefer@HIDDEN" target=3D"_blank">jorgen.schaef=
er@HIDDEN</a>&gt;<br>
&gt; Date: Wed, 23 Mar 2016 19:40:27 +0100<br>
&gt;<br>
&gt; Evaluating the following code in &quot;emacs -Q&quot; leaves point in =
the middle<br>
&gt; of the window, instead of at the end of the window as expected. Certai=
n<br>
&gt; modes (IRC) want to keep the buffer flushed at the end of the window,<=
br>
&gt; this problem interferes with that behavior and causes very weird jumpy=
<br>
&gt; scrolling.<br>
&gt;<br>
&gt;<br>
&gt; (require &#39;cl)<br>
&gt; (let* ((b (get-buffer-create &quot;*Bug Repro*&quot;))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 (w (selected-window))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 (l (window-height w))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 o)<br>
&gt;=C2=A0 =C2=A0(set-window-buffer w b)<br>
&gt;=C2=A0 =C2=A0(select-window w)<br>
&gt;=C2=A0 =C2=A0(set-buffer b)<br>
&gt;=C2=A0 =C2=A0(erase-buffer)<br>
&gt;=C2=A0 =C2=A0(cl-dotimes (i (* l 2))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(insert &quot;fo=
o\n&quot;))<br>
&gt;=C2=A0 =C2=A0(goto-char (point-min))<br>
&gt;=C2=A0 =C2=A0(forward-line (+ l 2))<br>
&gt;=C2=A0 =C2=A0(setq o (make-overlay (point) (point)))<br>
&gt;=C2=A0 =C2=A0(overlay-put o &#39;after-string &quot;\n&quot;)<br>
&gt;=C2=A0 =C2=A0(goto-char (point-max))<br>
&gt;=C2=A0 =C2=A0(recenter -1))<br>
&gt;<br>
&gt;<br>
&gt; That is, if there is a multi-line overlay that would be shown only<br>
&gt; halfway.<br>
<br>
I&#39;m not sure I understand: are you trying to display a window whose<br>
start point is in the middle of an overlay string?=C2=A0 That&#39;s not<br>
possible, AFAIK.=C2=A0 The window-start point must be a buffer position.<br=
>
</blockquote></div>

--001a113f17d6723f3e052ebc82d8--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 23 Mar 2016 20:23:02 +0000
Resent-Message-ID: <handler.23098.B23098.145876456217025 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Cc: 23098 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.145876456217025
          (code B ref 23098); Wed, 23 Mar 2016 20:23:02 +0000
Received: (at 23098) by debbugs.gnu.org; 23 Mar 2016 20:22:42 +0000
Received: from localhost ([127.0.0.1]:34808 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aipIg-0004QX-FW
	for submit <at> debbugs.gnu.org; Wed, 23 Mar 2016 16:22:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48666)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1aipIe-0004QH-9y
 for 23098 <at> debbugs.gnu.org; Wed, 23 Mar 2016 16:22:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1aipIW-0002mo-55
 for 23098 <at> debbugs.gnu.org; Wed, 23 Mar 2016 16:22:35 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58223)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1aipIW-0002mk-1K; Wed, 23 Mar 2016 16:22:32 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2447
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1aipIV-0004Z0-1X; Wed, 23 Mar 2016 16:22:31 -0400
Date: Wed, 23 Mar 2016 22:22:15 +0200
Message-Id: <83a8lp2bd4.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 (message from Jorgen =?UTF-8?Q?Sch=C3=A4fer?= on Wed, 23 Mar 2016 19:40:50
 +0000)
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Jorgen Schäfer <jorgen.schaefer@HIDDEN>
> Date: Wed, 23 Mar 2016 19:40:50 +0000
> Cc: 23098 <at> debbugs.gnu.org
> 
> The use case here are buffers like comint or IRC chat buffers. It's nice to keep the last line of the buffer flush
> with the last line of the window, to show the maximum amount of data. (recenter -1) at the end of a buffer is
> supposed to do just that. In this case, it does not, but instead leaves point in the *middle* of the window.

Yes, because the scrolling fails, and Emacs falls back on recentering.

> If it is not possible to display that line halfway (which sounds like a missing feature to begin with), I would
> expect Emacs to least try to leave point as low in the window as possible, instead of in the middle of the
> window. C-l likewise won't move point any further down, for example.

If you set scroll-conservatively to a value larger than 100, don't you
get point as low as possible?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 24 Mar 2016 08:13:02 +0000
Resent-Message-ID: <handler.23098.B23098.14588071465248 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 23098 <at> debbugs.gnu.org
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.14588071465248
          (code B ref 23098); Thu, 24 Mar 2016 08:13:02 +0000
Received: (at 23098) by debbugs.gnu.org; 24 Mar 2016 08:12:26 +0000
Received: from localhost ([127.0.0.1]:35046 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aj0NW-0001Ma-Gd
	for submit <at> debbugs.gnu.org; Thu, 24 Mar 2016 04:12:26 -0400
Received: from mail-lb0-f176.google.com ([209.85.217.176]:34095)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1aj0NU-0001MN-Pk
 for 23098 <at> debbugs.gnu.org; Thu, 24 Mar 2016 04:12:25 -0400
Received: by mail-lb0-f176.google.com with SMTP id k12so25387209lbb.1
 for <23098 <at> debbugs.gnu.org>; Thu, 24 Mar 2016 01:12:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=E8DTXFGMcfnmT14H37CZGGpxa18FKhE+siIxxCxEwhY=;
 b=q4u2aChS2WU0j2HmWZlU4Iq8ZOej7lwGn9QsnuZRQuKza0dWKBaJa3WkqkTpg8+U0F
 QreO9FK7/yrjow3s8ojr5xwFXuT2fpmp1+J/OkSevgfnocAiYzU5tKKM2dLTWkUigp8i
 8Xodgvdj7lOdbK8f7BtRUfHQHW7NFvfJpGcc2VNwHzvXYaGyR+CsxjgkJpy/Nxutx1Y0
 YyTemBqYruH+B97GqxknlXgnc26KyOC18672bv4OtSWjLmNHvJw9iFoa85IXaQ1xWVG/
 LuQaqlEjUkHn3q626qXZ6oTMGj8ajDqETOmgBRN9lDkMFUt6RSbz6+ptSSc1f3motHDk
 1+NQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=E8DTXFGMcfnmT14H37CZGGpxa18FKhE+siIxxCxEwhY=;
 b=iAWCvI/LXjaigV8QzCcNq1nu8jeAHbpDYVjFBmCEoDKe/wx8WE77LvCpRxc0RqOWVK
 WUDZNbaxgeKM25MUD+0hC6xAQCeh+A6fP2eV7YxXXVoTh1rd5pzbG7VM/vep3zN+uC9Y
 wfjrQR9Y5I8BgESWCWYe/ktkb0Myf/F1VuuFve1yoDyfrL4POotSuFmhO0ouczLV1wO7
 1EnhY8/I/l/EhM6M7hJy7ASQrYD7fPdiQo18aceZXJgmR5004ldr0mX8IWZaobERmxjn
 /VIHSsoiW2xwx/pgGsTcvC8S6o41c7L2Rb2d5HZMNtvC1SxLWcmTJeMjGpWgzUbv6rSV
 v+JA==
X-Gm-Message-State: AD7BkJJg3op4pAUd4vObh2tv1UxmkAtA0+Fsd0FjMvdC0ZiuAMqqlqlEUUNY1DkOXFRMELUSzsOyfMFnhNBjYQ==
X-Received: by 10.112.161.131 with SMTP id xs3mr2851806lbb.65.1458807138819;
 Thu, 24 Mar 2016 01:12:18 -0700 (PDT)
MIME-Version: 1.0
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 <83a8lp2bd4.fsf@HIDDEN>
In-Reply-To: <83a8lp2bd4.fsf@HIDDEN>
From: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Date: Thu, 24 Mar 2016 08:12:08 +0000
Message-ID: <CALqDrSfFddK7B_nMuuDHe+eHgq=dhWOAE2rZk0C1JZ4nmbMqFw@HIDDEN>
Content-Type: multipart/alternative; boundary=001a11c31f524e2447052ec701cc
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11c31f524e2447052ec701cc
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

> If you set scroll-conservatively to a value larger than 100, don't you
> get point as low as possible?

No.

On Wed, Mar 23, 2016 at 9:22 PM Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Jorgen Sch=C3=A4fer <jorgen.schaefer@HIDDEN>
> > Date: Wed, 23 Mar 2016 19:40:50 +0000
> > Cc: 23098 <at> debbugs.gnu.org
> >
> > The use case here are buffers like comint or IRC chat buffers. It's nic=
e
> to keep the last line of the buffer flush
> > with the last line of the window, to show the maximum amount of data.
> (recenter -1) at the end of a buffer is
> > supposed to do just that. In this case, it does not, but instead leaves
> point in the *middle* of the window.
>
> Yes, because the scrolling fails, and Emacs falls back on recentering.
>
> > If it is not possible to display that line halfway (which sounds like a
> missing feature to begin with), I would
> > expect Emacs to least try to leave point as low in the window as
> possible, instead of in the middle of the
> > window. C-l likewise won't move point any further down, for example.
>
> If you set scroll-conservatively to a value larger than 100, don't you
> get point as low as possible?
>

--001a11c31f524e2447052ec701cc
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt;=C2=A0If you set scroll-conservatively to a value larg=
er than 100, don&#39;t you<br>&gt; get point as low as possible?<div><br></=
div><div>No.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On =
Wed, Mar 23, 2016 at 9:22 PM Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN=
rg">eliz@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" =
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt=
; From: Jorgen Sch=C3=A4fer &lt;<a href=3D"mailto:jorgen.schaefer@HIDDEN=
" target=3D"_blank">jorgen.schaefer@HIDDEN</a>&gt;<br>
&gt; Date: Wed, 23 Mar 2016 19:40:50 +0000<br>
&gt; Cc: <a href=3D"mailto:23098 <at> debbugs.gnu.org" target=3D"_blank">23098@d=
ebbugs.gnu.org</a><br>
&gt;<br>
&gt; The use case here are buffers like comint or IRC chat buffers. It&#39;=
s nice to keep the last line of the buffer flush<br>
&gt; with the last line of the window, to show the maximum amount of data. =
(recenter -1) at the end of a buffer is<br>
&gt; supposed to do just that. In this case, it does not, but instead leave=
s point in the *middle* of the window.<br>
<br>
Yes, because the scrolling fails, and Emacs falls back on recentering.<br>
<br>
&gt; If it is not possible to display that line halfway (which sounds like =
a missing feature to begin with), I would<br>
&gt; expect Emacs to least try to leave point as low in the window as possi=
ble, instead of in the middle of the<br>
&gt; window. C-l likewise won&#39;t move point any further down, for exampl=
e.<br>
<br>
If you set scroll-conservatively to a value larger than 100, don&#39;t you<=
br>
get point as low as possible?<br>
</blockquote></div>

--001a11c31f524e2447052ec701cc--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 24 Mar 2016 15:49:01 +0000
Resent-Message-ID: <handler.23098.B23098.145883450430784 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Cc: 23098 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.145883450430784
          (code B ref 23098); Thu, 24 Mar 2016 15:49:01 +0000
Received: (at 23098) by debbugs.gnu.org; 24 Mar 2016 15:48:24 +0000
Received: from localhost ([127.0.0.1]:36302 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aj7Um-00080S-E7
	for submit <at> debbugs.gnu.org; Thu, 24 Mar 2016 11:48:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50775)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1aj7Uk-00080E-Hf
 for 23098 <at> debbugs.gnu.org; Thu, 24 Mar 2016 11:48:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1aj7Ua-0002p1-Db
 for 23098 <at> debbugs.gnu.org; Thu, 24 Mar 2016 11:48:17 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51870)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1aj7Ua-0002ov-Ar; Thu, 24 Mar 2016 11:48:12 -0400
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 <eliz@HIDDEN>)
 id 1aj7UZ-0007dn-Ne; Thu, 24 Mar 2016 11:48:12 -0400
Date: Thu, 24 Mar 2016 17:47:58 +0200
Message-Id: <8360wb3mj5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <CALqDrSfFddK7B_nMuuDHe+eHgq=dhWOAE2rZk0C1JZ4nmbMqFw@HIDDEN>
 (message from Jorgen =?UTF-8?Q?Sch=C3=A4fer?= on Thu, 24 Mar 2016 08:12:08
 +0000)
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 <83a8lp2bd4.fsf@HIDDEN>
 <CALqDrSfFddK7B_nMuuDHe+eHgq=dhWOAE2rZk0C1JZ4nmbMqFw@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Jorgen Schäfer <jorgen.schaefer@HIDDEN>
> Date: Thu, 24 Mar 2016 08:12:08 +0000
> Cc: 23098 <at> 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.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 24 Mar 2016 16:29:01 +0000
Resent-Message-ID: <handler.23098.B23098.14588368912239 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 23098 <at> debbugs.gnu.org
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.14588368912239
          (code B ref 23098); Thu, 24 Mar 2016 16:29:01 +0000
Received: (at 23098) by debbugs.gnu.org; 24 Mar 2016 16:28:11 +0000
Received: from localhost ([127.0.0.1]:36370 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aj87G-0000a3-O1
	for submit <at> debbugs.gnu.org; Thu, 24 Mar 2016 12:28:11 -0400
Received: from mail-lf0-f46.google.com ([209.85.215.46]:35757)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1aj87F-0000Zq-H2
 for 23098 <at> debbugs.gnu.org; Thu, 24 Mar 2016 12:28:09 -0400
Received: by mail-lf0-f46.google.com with SMTP id q73so36603995lfe.2
 for <23098 <at> debbugs.gnu.org>; Thu, 24 Mar 2016 09:28:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=VwZUeB1SVWheAy7IyfBsW4CzLZ6rkp8b4O/8Z4JRTLM=;
 b=Sjq8DO0uybHi+Er+VxbGIDkzgcQ8Lef7q5XLayJcG0fVCkcfno0m480gWHDjqcrAO4
 e0Zr3WvlZS1IUI4rt85toLBULDH7RdE33eJ+EifPzXCU7mYhhMiFeMvuNLldxNCb8mTO
 6xaPeB60m5S3F+5c/LH/XuxkAMd8z7nXQmQNDH8ZUlmf5SMhNQDl+PMrV6ASaVAURSCj
 Dt3AeY9Ng5xFK7b4UBl3NDCAOE/LuB9Ohb+yHZfQ88lWS4L0KDHtQwjWicMyyT28BlYG
 HV7GsEZICeMbWgEZjiCO4voGjcjdQO3K+lObEkQQGWkdVes7jzzKuDSIetGsIGHxKpuD
 Edug==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=VwZUeB1SVWheAy7IyfBsW4CzLZ6rkp8b4O/8Z4JRTLM=;
 b=GTv0HIuZKcJ6g/SS/Q12yRRkkR2L3YJwhWs1WhTg63UjXSE0IiKMSnVZtSunE4Vw5o
 ZBl1Xe4RLfRI8fRmVD+vHiRUNNJ53il9/X7kpbR+HzWgWdK/ZzN6uplv5tGuvUwgGE2j
 rbS8k4T/RzX2o2+1rPD0y4olxGlUp8Oqc7JpW19bA9ZUhacGY/VBeRgTsTzBmaduJdmM
 HjdNSjne4gr4ZY/zpBWEnrOnDnA6ankbcKvd6jXepfjETHvhYJGsr6se06FX45B34JG6
 FsIuW/mbm1Cq4I8rUnbN4T2R47zaaMqZQeAUWuf3X/ihYFMAu12AlKjwxhZMMy2Dk5fK
 Hz0w==
X-Gm-Message-State: AD7BkJKxrI+1Jdt+qBU19Sxm7m7dY6P528yIpVJSDvv3syJSXWCFyeLTx1ChOs0TLsFVqXvFCdd9SyRJU6qXJg==
X-Received: by 10.25.86.195 with SMTP id k186mr3883534lfb.155.1458836883732;
 Thu, 24 Mar 2016 09:28:03 -0700 (PDT)
MIME-Version: 1.0
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 <83a8lp2bd4.fsf@HIDDEN>
 <CALqDrSfFddK7B_nMuuDHe+eHgq=dhWOAE2rZk0C1JZ4nmbMqFw@HIDDEN>
 <8360wb3mj5.fsf@HIDDEN>
In-Reply-To: <8360wb3mj5.fsf@HIDDEN>
From: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Date: Thu, 24 Mar 2016 16:27:53 +0000
Message-ID: <CALqDrSdksWUz35oL47GX66YLRmw1pq+-CBfp80RSPTF4-0gyVQ@HIDDEN>
Content-Type: multipart/alternative; boundary=001a11410d843d7ffb052ecdee81
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11410d843d7ffb052ecdee81
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

> If you do the above, do you still get the cursor recentered in the
> window?

Hm. That seems to work. I was using let-binding around recenter, which does
not work. 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.

On Thu, Mar 24, 2016 at 4:48 PM Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Jorgen Sch=C3=A4fer <jorgen.schaefer@HIDDEN>
> > Date: Thu, 24 Mar 2016 08:12:08 +0000
> > Cc: 23098 <at> debbugs.gnu.org
> >
> > > If you set scroll-conservatively to a value larger than 100, don't yo=
u
> > > 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.
>

--001a11410d843d7ffb052ecdee81
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt;=C2=A0If you do the above, do you still get the cursor=
 recentered in the<br>&gt; window?<div><br></div><div>Hm. That seems to wor=
k. I was using let-binding around recenter, which does not work. Even reset=
ting 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 b=
uffer is visible at all.</div></div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr">On Thu, Mar 24, 2016 at 4:48 PM Eli Zaretskii &lt;<a href=3D"mailt=
o:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex">&gt; From: Jorgen Sch=C3=A4fer &lt;<a href=3D"mailto:jorgen.schaef=
er@HIDDEN" target=3D"_blank">jorgen.schaefer@HIDDEN</a>&gt;<br>
&gt; Date: Thu, 24 Mar 2016 08:12:08 +0000<br>
&gt; Cc: <a href=3D"mailto:23098 <at> debbugs.gnu.org" target=3D"_blank">23098@d=
ebbugs.gnu.org</a><br>
&gt;<br>
&gt; &gt; If you set scroll-conservatively to a value larger than 100, don&=
#39;t you<br>
&gt; &gt; get point as low as possible?<br>
&gt;<br>
&gt; No.<br>
<br>
That&#39;s strange.<br>
<br>
Let me be absolutely sure we are trying the same thing.=C2=A0 What I did is=
<br>
the following:<br>
<br>
=C2=A0 . emacs -Q<br>
=C2=A0 . paste the following into *scratch*, which is exactly the code you<=
br>
=C2=A0 =C2=A0 posted with a single line added:<br>
<br>
=C2=A0 =C2=A0 (require &#39;cl)<br>
=C2=A0 =C2=A0 (let* ((b (get-buffer-create &quot;*Bug Repro*&quot;))<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(w (selected-window))<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(l (window-height w))<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0o)<br>
=C2=A0 =C2=A0 =C2=A0 (set-window-buffer w b)<br>
=C2=A0 =C2=A0 =C2=A0 (select-window w)<br>
=C2=A0 =C2=A0 =C2=A0 (set-buffer b)<br>
=C2=A0 =C2=A0 =C2=A0 (erase-buffer)<br>
=C2=A0 =C2=A0 =C2=A0 (setq scroll-conservatively 101) ;; &lt;&lt;&lt;&lt;&l=
t; this line was added<br>
=C2=A0 =C2=A0 =C2=A0 (cl-dotimes (i (* l 2))<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (insert &quo=
t;foo\n&quot;))<br>
=C2=A0 =C2=A0 =C2=A0 (goto-char (point-min))<br>
=C2=A0 =C2=A0 =C2=A0 (forward-line (+ l 2))<br>
=C2=A0 =C2=A0 =C2=A0 (setq o (make-overlay (point) (point)))<br>
=C2=A0 =C2=A0 =C2=A0 (overlay-put o &#39;after-string &quot;\n&quot;)<br>
=C2=A0 =C2=A0 =C2=A0 (goto-char (point-max))<br>
=C2=A0 =C2=A0 =C2=A0 (recenter -1))<br>
<br>
=C2=A0 . M-x eval-region RET<br>
<br>
After this, buffer &quot;*Bug Repro*&quot; pops up, with point at EOB posit=
ioned<br>
on the 2nd line from bottom of the window (instead of the last line).<br>
<br>
If you do the above, do you still get the cursor recentered in the<br>
window?=C2=A0 If so, I will try to play with display defaults in order to<b=
r>
reproduce what you see.<br>
<br>
Thanks.<br>
</blockquote></div>

--001a11410d843d7ffb052ecdee81--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 24 Mar 2016 16:39:02 +0000
Resent-Message-ID: <handler.23098.B23098.14588375163734 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Cc: 23098 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.14588375163734
          (code B ref 23098); Thu, 24 Mar 2016 16:39:02 +0000
Received: (at 23098) by debbugs.gnu.org; 24 Mar 2016 16:38:36 +0000
Received: from localhost ([127.0.0.1]:36387 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aj8HM-0000yA-Ae
	for submit <at> debbugs.gnu.org; Thu, 24 Mar 2016 12:38:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41122)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1aj8HK-0000xv-QD
 for 23098 <at> debbugs.gnu.org; Thu, 24 Mar 2016 12:38:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1aj8HC-0001Lh-KH
 for 23098 <at> debbugs.gnu.org; Thu, 24 Mar 2016 12:38:29 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53113)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1aj8HC-0001Ld-HG; Thu, 24 Mar 2016 12:38:26 -0400
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 <eliz@HIDDEN>)
 id 1aj8HB-0000pq-Sv; Thu, 24 Mar 2016 12:38:26 -0400
Date: Thu, 24 Mar 2016 18:38:12 +0200
Message-Id: <83y49725mz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <CALqDrSdksWUz35oL47GX66YLRmw1pq+-CBfp80RSPTF4-0gyVQ@HIDDEN>
 (message from Jorgen =?UTF-8?Q?Sch=C3=A4fer?= on Thu, 24 Mar 2016 16:27:53
 +0000)
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 <83a8lp2bd4.fsf@HIDDEN>
 <CALqDrSfFddK7B_nMuuDHe+eHgq=dhWOAE2rZk0C1JZ4nmbMqFw@HIDDEN>
 <8360wb3mj5.fsf@HIDDEN>
 <CALqDrSdksWUz35oL47GX66YLRmw1pq+-CBfp80RSPTF4-0gyVQ@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Jorgen Schäfer <jorgen.schaefer@HIDDEN>
> 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.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: John Wiegley <jwiegley@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 26 Mar 2016 23:34:02 +0000
Resent-Message-ID: <handler.23098.B23098.145903523616467 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 23098 <at> debbugs.gnu.org
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.145903523616467
          (code B ref 23098); Sat, 26 Mar 2016 23:34:02 +0000
Received: (at 23098) by debbugs.gnu.org; 26 Mar 2016 23:33:56 +0000
Received: from localhost ([127.0.0.1]:38985 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ajxiO-0004HW-0B
	for submit <at> debbugs.gnu.org; Sat, 26 Mar 2016 19:33:56 -0400
Received: from mail-pa0-f47.google.com ([209.85.220.47]:35074)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jwiegley@HIDDEN>) id 1ajxiM-0004HD-Fy
 for 23098 <at> debbugs.gnu.org; Sat, 26 Mar 2016 19:33:54 -0400
Received: by mail-pa0-f47.google.com with SMTP id td3so70513437pab.2
 for <23098 <at> debbugs.gnu.org>; Sat, 26 Mar 2016 16:33:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:in-reply-to:date:message-id:references
 :user-agent:mime-version:content-transfer-encoding;
 bh=2CdCI3IODtdC6k3fQRPlQWhTG2kNqhN21ZCs6lHCtXQ=;
 b=HPmedh7vYIRuT0SrG4v3gztPRG2TmaF9VL9AkWzEYo5yn+ZgUiM8AVpjOq0Emo+wBD
 w9rHfmUz3CbhJTpy8vXImHFl2VKpzP1w6w8tNH3/6JRPadp2WO2e2pyt/3W5GyRJ7A5o
 AiBGnB2PceLByKP0ULjk/kXNgG//XXd5kNxAX/y6fIgK8D91XKsH1KQWWNwAYVBWQwy9
 hxTn75IMm6QLgF1kwSOhKpr3CtDkvDR2S52bM13SSEUdct3j/U4NPhOCjnfhFXdmiCP7
 ZcptzQr7VGjbbQgiH4LDkxc3FgquF+C09ZqdRmx9adswdgSmd6MafMfk+w7bEdgWjaLa
 z9sg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id
 :references:user-agent:mime-version:content-transfer-encoding;
 bh=2CdCI3IODtdC6k3fQRPlQWhTG2kNqhN21ZCs6lHCtXQ=;
 b=MfeCW667g3Jn5fAkzdcJ3pMm/9w2T8qrYTKuaX/EORRZ1c29KwrABRseehqLOsENdg
 +v5Q9YEcFjzvDaOeK1+is5CKREZPJ32K+Ila4y38bnIgRcMjobtWwlDv7hioDARByMJO
 0lVNEpNBFdsH5hzlZ5LihOjvRcXZFqs77AgBShSAlkguJ+snpFBIOmra1umLN4sew5KQ
 TkfhQX9t0oUwX2aWabRjLwEeb4aPzf2zdTU0hf9acNhMpBBu66uvXPtzO5b/wf22wjar
 sndtqyh4DcPWjCOUA0Cxy2sC1bTvbvMfRKD1E1A6o3CYx0uMru/ljjD+yxsqA+fgFYo/
 fz9g==
X-Gm-Message-State: AD7BkJJX4skQmu2QGZ87yaVhs1P1mwMpi01sbtTpij2dSrUexag3VVgZ/gDYnHxwf9XYuw==
X-Received: by 10.67.24.104 with SMTP id ih8mr31806946pad.124.1459035228591;
 Sat, 26 Mar 2016 16:33:48 -0700 (PDT)
Received: from Hermes.local (76-234-68-79.lightspeed.frokca.sbcglobal.net.
 [76.234.68.79])
 by smtp.gmail.com with ESMTPSA id 8sm25342708pfk.69.2016.03.26.16.33.47
 (version=TLS1 cipher=AES128-SHA bits=128/128);
 Sat, 26 Mar 2016 16:33:47 -0700 (PDT)
From: John Wiegley <jwiegley@HIDDEN>
X-Google-Original-From: "John Wiegley" <johnw@HIDDEN>
Received: by Hermes.local (Postfix, from userid 501)
 id D18394FB445E; Sat, 26 Mar 2016 16:33:46 -0700 (PDT)
In-Reply-To: <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 ("Jorgen \=\?utf-8\?Q\?Sch\=C3\=A4fer\=22's\?\= message of "Wed, 23 Mar 2016
 19:40:50 +0000")
Date: Sat, 26 Mar 2016 16:27:51 -0700
Message-ID: <m2r3ewstu0.fsf@HIDDEN>
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.92 (darwin)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

>>>>> Jorgen Sch=C3=A4fer <jorgen.schaefer@HIDDEN> writes:

> The use case here are buffers like comint or IRC chat buffers.

FWIW, I use "scroll to bottom" in ERC, and all I had to do to make it work =
was
the following:

  (add-to-list
   'erc-mode-hook
   #'(lambda () (set (make-local-variable 'scroll-conservatively) 100)))

So is the bug here that it can't be done, or that (recenter -1) by itself
doesn't do what you think it should?

--=20
John Wiegley                  GPG fingerprint =3D 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Andreas Schwab <schwab@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 27 Mar 2016 08:36:02 +0000
Resent-Message-ID: <handler.23098.B23098.14590677492384 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: John Wiegley <jwiegley@HIDDEN>
Cc: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>, 23098 <at> debbugs.gnu.org
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.14590677492384
          (code B ref 23098); Sun, 27 Mar 2016 08:36:02 +0000
Received: (at 23098) by debbugs.gnu.org; 27 Mar 2016 08:35:49 +0000
Received: from localhost ([127.0.0.1]:39131 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ak6An-0000cO-5q
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2016 04:35:49 -0400
Received: from mail-out.m-online.net ([212.18.0.10]:36925)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <whitebox@HIDDEN>) id 1ak6Al-0000cG-HS
 for 23098 <at> debbugs.gnu.org; Sun, 27 Mar 2016 04:35:47 -0400
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 3qXr363Ndnz3hjkG;
 Sun, 27 Mar 2016 10:35:46 +0200 (CEST)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.68])
 by mail.m-online.net (Postfix) with ESMTP id 3qXr361Ct3zvhPC;
 Sun, 27 Mar 2016 10:35:46 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new,
 port 10024)
 with ESMTP id EjjC3RlHRzgV; Sun, 27 Mar 2016 10:35:44 +0200 (CEST)
X-Auth-Info: +fNVBTZpuVCM0vZwFDA0g1SWWqe/ai7TdAartH+bYu1in0seiEB6smcRUjP761ib
Received: from linux.local (ppp-88-217-9-29.dynamic.mnet-online.de
 [88.217.9.29]) by mail.mnet-online.de (Postfix) with ESMTPA;
 Sun, 27 Mar 2016 10:35:44 +0200 (CEST)
Received: by linux.local (Postfix, from userid 501)
 id 3A8701E5465; Sun, 27 Mar 2016 10:35:30 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 <m2r3ewstu0.fsf@HIDDEN>
X-Yow: The LOGARITHM of an ISOSCELES TRIANGLE is TUESDAY WELD!!
Date: Sun, 27 Mar 2016 10:35:18 +0200
In-Reply-To: <m2r3ewstu0.fsf@HIDDEN> (John Wiegley's message of "Sat, 
 26 Mar 2016 16:27:51 -0700")
Message-ID: <m28u14z5bt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

John Wiegley <jwiegley@HIDDEN> writes:

>   (add-to-list
>    'erc-mode-hook
>    #'(lambda () (set (make-local-variable 'scroll-conservatively) 100)))

You should use add-hook for hook variables.

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 27 Mar 2016 15:08:01 +0000
Resent-Message-ID: <handler.23098.B23098.145909125413290 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Andreas Schwab <schwab@HIDDEN>, John Wiegley <jwiegley@HIDDEN>
Cc: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>, 23098 <at> debbugs.gnu.org
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.145909125413290
          (code B ref 23098); Sun, 27 Mar 2016 15:08:01 +0000
Received: (at 23098) by debbugs.gnu.org; 27 Mar 2016 15:07:34 +0000
Received: from localhost ([127.0.0.1]:40183 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1akCHu-0003SI-9I
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2016 11:07:34 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:36959)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1akCHr-0003S5-TW
 for 23098 <at> debbugs.gnu.org; Sun, 27 Mar 2016 11:07:32 -0400
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 u2RF7PKA010045
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sun, 27 Mar 2016 15:07:25 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u2RF7PkY006714
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sun, 27 Mar 2016 15:07:25 GMT
Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8])
 by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u2RF7PKC017387;
 Sun, 27 Mar 2016 15:07:25 GMT
MIME-Version: 1.0
Message-ID: <d994a790-b704-47ef-8c40-c33eda845db0@default>
Date: Sun, 27 Mar 2016 08:07:24 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 <m2r3ewstu0.fsf@HIDDEN> <m28u14z5bt.fsf@HIDDEN>
In-Reply-To: <m28u14z5bt.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6744.5000 (x86)]
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0022.oracle.com [141.146.126.234]
X-Spam-Score: -3.3 (---)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> >   (add-to-list
> >    'erc-mode-hook
> >    #'(lambda () (set (make-local-variable 'scroll-conservatively) 100))=
)
>=20
> You should use add-hook for hook variables.

Also (nits):

1. No need to use #' with lambdas (no advantage in a context that
   expects a function).

2. It is generally a good idea to use a named function (not a
   lambda) on a hook.  For one thing, removing it is easier and
   more robust (`remove-hook') - no worries about differences in
   whitespace etc.

3. Emacs now has `setq-local': `(setq-local VAR VALUE)'.  (I too
   use `(set (make-local-variable VAR) VALUE)', but mainly because
   I usually need code that works also for older Emacs versions.)




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 28 Mar 2016 13:11:02 +0000
Resent-Message-ID: <handler.23098.B23098.145917064131388 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: John Wiegley <jwiegley@HIDDEN>
Cc: 23098 <at> debbugs.gnu.org
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.145917064131388
          (code B ref 23098); Mon, 28 Mar 2016 13:11:02 +0000
Received: (at 23098) by debbugs.gnu.org; 28 Mar 2016 13:10:41 +0000
Received: from localhost ([127.0.0.1]:40959 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1akWwK-0008AC-Qw
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2016 09:10:41 -0400
Received: from mail-lf0-f47.google.com ([209.85.215.47]:34241)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1akWwJ-0008A0-LH
 for 23098 <at> debbugs.gnu.org; Mon, 28 Mar 2016 09:10:40 -0400
Received: by mail-lf0-f47.google.com with SMTP id c62so89157579lfc.1
 for <23098 <at> debbugs.gnu.org>; Mon, 28 Mar 2016 06:10:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=SohD3ES3H18fiRi3F+4ODbAcv3yBjeZMzXLyf4aP/Cs=;
 b=JB8SykppmWv9LK059CqyiJs5OE30F1URllP4JQ4VS8rC7MvoUp1/WQ6/Py3lO7nn7d
 Z6IXzqcLke7kpGM8zzlMVU5JWlkIcTs2D2dYoCB0RZHAVHan96HFbJcgfQ8SbEif5PZ4
 HyZBz0EpXq8BuYKhJHTxdq2VxonUJPonHnizlJmgUm2K5lWRJ7PcQvr1yBObfskqd1FB
 pWoZN7dJV5hmSNRrX85yswzVW3nslzpOy392g7afnOXnrrNaWHkSEtDBuh/vTOMtKHwE
 bRoNcn59mdqtjle4LxFVkOzthgU0is1QkiYQ4TK5T8+97aJofcY6zXDLuSnCrfn+Biq2
 DX/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=SohD3ES3H18fiRi3F+4ODbAcv3yBjeZMzXLyf4aP/Cs=;
 b=Y/xmUlXp8UsyCgszOnQeZGV8N3l7wJJeWemJiJuzZRlhm9Dc5TWYogRwKIBGo6YWmS
 cXL71rsOs+gZDuhyl7Mae+dwGa4bxIzqt7FxlnuJCGc3rSSLQJPxC5nuRtNEOx+1ZxWP
 Jy5XW/52drnyXVk09L6tq+iRQdqFpW6n5zxovkQCaJd70FpNYGp3AjvJbb5uGu5KsdQb
 oDIVmjU4/HW0co/ERrb/Pxvi0ZsedPhHPrltn9lde6O4UAnnHchKMBm8Uj6VzHZRskkJ
 df7vDhNruZM7yqx71ew+G4faxLIV37N6Faa0Oyg+oJWLyDOcNkiuTT7ahaDg1iyfMNF9
 lMTA==
X-Gm-Message-State: AD7BkJIHHGXfCK+Zvha+RCXbTwwQENmkZHlp7WM3R4G2yBLrz5C7Gv2bMNG8Jc+snpiqAYuE49SsEkbtnEPgfA==
X-Received: by 10.25.80.1 with SMTP id e1mr7905984lfb.165.1459170633895; Mon,
 28 Mar 2016 06:10:33 -0700 (PDT)
MIME-Version: 1.0
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 <m2r3ewstu0.fsf@HIDDEN>
In-Reply-To: <m2r3ewstu0.fsf@HIDDEN>
From: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Date: Mon, 28 Mar 2016 13:10:23 +0000
Message-ID: <CALqDrSfJvTeBWrQ9bv9jHn97MNHSSgK7muO+zhz6Ky3ZqPOZXA@HIDDEN>
Content-Type: multipart/alternative; boundary=001a114195144cd6f7052f1ba364
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a114195144cd6f7052f1ba364
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 27, 2016 at 12:33 AM John Wiegley <jwiegley@HIDDEN> wrote:

> So is the bug here that it can't be done, or that (recenter -1) by itself
> doesn't do what you think it should?


As an end user, I expect `recenter-to-bottom' to cycle the line with point
on it between the top, middle and bottom of the current window. The problem
described in this report means that Emacs does not actually do this =E2=80=
=93 the
line with point on it does not ever go even near the bottom of the window.

There is a technical reason for this problem: Emacs can not, actually,
display a multi-line overlay only partly. This is a shortcoming of Emacs,
but I assume this is non-trivial to fix. When Emacs notices it can not
fulfill a scroll request, it will use a fall back algorithm.

When I, as a user, try to display a line at the bottom of a window, it
would appear to me that trying to keep the line as close to the bottom as
possible instead of the middle of the window is a better fall back.

Setting scroll-conservatively to a large value is a way for the user to
work around this behavior. But this workaround also affects all the other
times a user tries to scroll the buffer. So this is not a fix, it's a
workaround with unintended and rather large side effects completely
unrelated to this.

A similar problems exist for programmers trying to implement a specific
behavior in buffers without prescribing to users how their normal scrolling
behaves.

This situation strikes me as an issue Emacs could address.

Regards,
Jorgen

--001a114195144cd6f7052f1ba364
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">On Sun, Mar 27=
, 2016 at 12:33 AM John Wiegley &lt;<a href=3D"mailto:jwiegley@HIDDEN">j=
wiegley@HIDDEN</a>&gt; wrote:</div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So is the bug here that it can&#39;t be done, or that (recenter -1) by itse=
lf<br>
doesn&#39;t do what you think it should?</blockquote><div><br></div><div>As=
 an end user, I expect `recenter-to-bottom&#39; to cycle the line with poin=
t on it between the top, middle and bottom of the current window. The probl=
em described in this report means that Emacs does not actually do this =E2=
=80=93 the line with point on it does not ever go even near the bottom of t=
he window.</div><div><br></div><div>There is a technical reason for this pr=
oblem: Emacs can not, actually, display a multi-line overlay only partly. T=
his is a shortcoming of Emacs, but I assume this is non-trivial to fix. Whe=
n Emacs notices it can not fulfill a scroll request, it will use a fall bac=
k algorithm.</div><div><br></div><div>When I, as a user, try to display a l=
ine at the bottom of a window, it would appear to me that trying to keep th=
e line as close to the bottom as possible instead of the middle of the wind=
ow is a better fall back.</div><div><br></div><div>Setting scroll-conservat=
ively to a large value is a way for the user to work around this behavior. =
But this workaround also affects all the other times a user tries to scroll=
 the buffer. So this is not a fix, it&#39;s a workaround with unintended an=
d rather large side effects completely unrelated to this.</div><div><br></d=
iv><div>A similar problems exist for programmers trying to implement a spec=
ific behavior in buffers without prescribing to users how their normal scro=
lling behaves.</div><div><br></div><div>This situation strikes me as an iss=
ue Emacs could address.</div><div><br></div><div>Regards,</div><div>Jorgen<=
/div></div></div>

--001a114195144cd6f7052f1ba364--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 28 Mar 2016 17:29:01 +0000
Resent-Message-ID: <handler.23098.B23098.145918613210861 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Cc: jwiegley@HIDDEN, 23098 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.145918613210861
          (code B ref 23098); Mon, 28 Mar 2016 17:29:01 +0000
Received: (at 23098) by debbugs.gnu.org; 28 Mar 2016 17:28:52 +0000
Received: from localhost ([127.0.0.1]:42314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1akayB-0002p7-W8
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2016 13:28:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60360)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1akay9-0002ou-VP
 for 23098 <at> debbugs.gnu.org; Mon, 28 Mar 2016 13:28:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1akaxz-00032G-QS
 for 23098 <at> debbugs.gnu.org; Mon, 28 Mar 2016 13:28:44 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58572)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1akaxz-00032C-Mk; Mon, 28 Mar 2016 13:28:39 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4827
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1akaxy-0008OH-TT; Mon, 28 Mar 2016 13:28:39 -0400
Date: Mon, 28 Mar 2016 20:28:19 +0300
Message-Id: <83bn5yy0jw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <CALqDrSfJvTeBWrQ9bv9jHn97MNHSSgK7muO+zhz6Ky3ZqPOZXA@HIDDEN>
 (message from Jorgen =?UTF-8?Q?Sch=C3=A4fer?= on Mon, 28 Mar 2016 13:10:23
 +0000)
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 <m2r3ewstu0.fsf@HIDDEN>
 <CALqDrSfJvTeBWrQ9bv9jHn97MNHSSgK7muO+zhz6Ky3ZqPOZXA@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.0 (------)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Jorgen Schäfer <jorgen.schaefer@HIDDEN>
> Date: Mon, 28 Mar 2016 13:10:23 +0000
> Cc: 23098 <at> debbugs.gnu.org
> 
> As an end user, I expect `recenter-to-bottom' to cycle the line with point on it between the top, middle and
> bottom of the current window. The problem described in this report means that Emacs does not actually do
> this – the line with point on it does not ever go even near the bottom of the window.

You are judging what Emacs does by the end result: since the result is
not to have point near the bottom, you deduce that Emacs didn't even
try.

But that is false.  What actually happens is that Emacs did try to do
what (recenter -1) requested, except that the display engine found
that doing so would have ended up with point being outside of the
window.  Since this is not acceptable, the display engine gave up and
recentered point in the window instead.

> There is a technical reason for this problem: Emacs can not, actually, display a multi-line overlay only partly.
> This is a shortcoming of Emacs, but I assume this is non-trivial to fix. When Emacs notices it can not fulfill a
> scroll request, it will use a fall back algorithm.

Yes.

> When I, as a user, try to display a line at the bottom of a window, it would appear to me that trying to keep the
> line as close to the bottom as possible instead of the middle of the window is a better fall back.

The problem is discovered at redisplay time, by some generic code that
has no direct relation to recentering, it gets run any time some
command requests that display of a window starts at a specified
position.  The fallback you'd like is more expensive, so using it in
that code would punish users who don't bump into this use case and
don't care about it.  Setting scroll-conservatively is the way to tell
Emacs you are generally prepared to deal with more expensive
(i.e. slower) redisplay if that gives you more accurate scrolling.
That's why, when scroll-conservatively is set to a large value, the
display engine does try a more accurate (and more expensive) fallback.
But doing that always, without the user's say-so, would be a
misfeature, I think.

> Setting scroll-conservatively to a large value is a way for the user to work around this behavior. But this
> workaround also affects all the other times a user tries to scroll the buffer. So this is not a fix, it's a
> workaround with unintended and rather large side effects completely unrelated to this.

I actually don't understand why you don't want to set
scroll-conservatively globally.  From what you say, it sounds like
that variable is exactly what you want, and not only in this
situation.  Can you explain why you don't see that as a solution?

> A similar problems exist for programmers trying to implement a specific behavior in buffers without
> prescribing to users how their normal scrolling behaves.

The idea is that users who are bothered by such use cases are expected
to like the effect of scroll-conservatively everywhere.

> This situation strikes me as an issue Emacs could address.

I'd welcome patches to try to fix this, but I think the best fix is
inside 'recenter': it should detect this situation and behave as if
its argument was modified so as not to request redisplay of the window
with window-start point that will cause recentering of point.  For
example, in the test case you presented, 'recenter' should behave as
if it was called with an argument of -2, not -1.

The tricky part is to implement a strategy that will do reasonable
things when the overlay or display string takes more than one line:
depending on the original value of the argument to 'recenter',
sometimes you'd want it increased, and sometimes decreased.
Interested?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 28 Mar 2016 17:42:02 +0000
Resent-Message-ID: <handler.23098.B23098.145918688012060 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: jwiegley@HIDDEN, 23098 <at> debbugs.gnu.org
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.145918688012060
          (code B ref 23098); Mon, 28 Mar 2016 17:42:02 +0000
Received: (at 23098) by debbugs.gnu.org; 28 Mar 2016 17:41:20 +0000
Received: from localhost ([127.0.0.1]:42328 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1akbAF-00038S-Mu
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2016 13:41:19 -0400
Received: from mail-lf0-f46.google.com ([209.85.215.46]:35372)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jorgen.schaefer@HIDDEN>) id 1akbAE-00038E-1w
 for 23098 <at> debbugs.gnu.org; Mon, 28 Mar 2016 13:41:18 -0400
Received: by mail-lf0-f46.google.com with SMTP id k79so15711994lfb.2
 for <23098 <at> debbugs.gnu.org>; Mon, 28 Mar 2016 10:41:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=gX7OAYUxzGKEHPabLpSUFCSx8dCT3yU/s6A9iehuj0g=;
 b=NUKjBnfr59AdlTgNIZcWuSeKiPyvJdoT1STnsYKr1wfS38kje/j/hOg5AuSo0cBscm
 X+yc/5pEK4eRP1PRj4VlRdFWUh/isaRvCyBBW1/u7/LSDNfb7ua6Gfd/3bCSkmclzKaj
 MnSa7MrBANCmz5buzekvAU6COY0B+a4v4LFG5qlYhJ0n5LmxWqhYM5iPsRU42dl/83k0
 VwFbWXwIlq2qEjI4EfHbrhTmbRkVf/S/kwscYyvyZG1do5t0yvPQm+adYE/4VgPCQ19N
 Uk37qlD0eH0wLUwSCxhcrafvP7IDQsMx+AUKwcGhSbVpMTOyhT79tTd3g6oKnJI7etgs
 LMYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=gX7OAYUxzGKEHPabLpSUFCSx8dCT3yU/s6A9iehuj0g=;
 b=PJ1jrYLAWh+vPTjR6bsx7IMsxPpBxF11miaIOktivOij2nZ7yeklX1l7pcIhw97OLz
 zdcwM87IHWwp0umKJSIZ4/NqKubmqm+dPq9KrLki3Hit5C+Qa9y0fT9VMdnHKPae3cnJ
 zqIFsJwtPxlUg1uiK5+Au/FuoFhePhLxi7c3CmbzA+lXGezFiXaZdPdXUYfd2WWHJqGd
 5IIGClzIL6lJOwflmE7Vjz4HCyraeHmcspLvvCP0BaoyEjAthTP7Eh8yxqY5D61yH+np
 VBIg3OjPLAGjJ6dsz+yZ3MEN+3N6PXfKPPlsYMo8pG4XjmOTOX0IsGLjnnXDkf7SVGtI
 F/Kg==
X-Gm-Message-State: AD7BkJKDnoqZsCkQq66CK82KvpEgTdjBfvVG+xf+M94Z9V/rM2IByyg8/GZXIEJ78ANCzFffWHCm7d/FZQFViA==
X-Received: by 10.25.154.65 with SMTP id c62mr11418700lfe.54.1459186872039;
 Mon, 28 Mar 2016 10:41:12 -0700 (PDT)
MIME-Version: 1.0
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 <m2r3ewstu0.fsf@HIDDEN>
 <CALqDrSfJvTeBWrQ9bv9jHn97MNHSSgK7muO+zhz6Ky3ZqPOZXA@HIDDEN>
 <83bn5yy0jw.fsf@HIDDEN>
In-Reply-To: <83bn5yy0jw.fsf@HIDDEN>
From: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Date: Mon, 28 Mar 2016 17:41:02 +0000
Message-ID: <CALqDrSdQ184QTf6KMW4ueROFawUrR_Y1VSD8b-XB3zkW+7LYzA@HIDDEN>
Content-Type: multipart/alternative; boundary=001a114012b42b3d7d052f1f6b66
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a114012b42b3d7d052f1f6b66
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 28, 2016 at 7:29 PM Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Jorgen Sch=C3=A4fer <jorgen.schaefer@HIDDEN>
> > Date: Mon, 28 Mar 2016 13:10:23 +0000
> > Cc: 23098 <at> debbugs.gnu.org
> >
> > As an end user, I expect `recenter-to-bottom' to cycle the line with
> point on it between the top, middle and
> > bottom of the current window. The problem described in this report mean=
s
> that Emacs does not actually do
> > this =E2=80=93 the line with point on it does not ever go even near the=
 bottom
> of the window.
>
> You are judging what Emacs does by the end result: since the result is
> not to have point near the bottom, you deduce that Emacs didn't even
> try.
>

No, I am not. As I explained at length in my last mail.

I actually don't understand why you don't want to set
> scroll-conservatively globally.  From what you say, it sounds like
> that variable is exactly what you want, and not only in this
> situation.  Can you explain why you don't see that as a solution?
>

When scrolling through the buffer with cursor-up/cursor-down, I want
full-page scroll, not single-line scroll.

When I hit C-l, I want point to end up at the bottom at the window.

I do not want to lose the former just so I can have the latter.

And, as the programmer of a mode who tries to keep text at the bottom of
the window, I most certainly do not want to prescribe to the user how their
scrolling with cursor-up/cursor-down behaves just so I can keep the text at
the bottom of the window when I add a line.

These two situations have absolutely nothing to do with each other as far
as the user experience is concerned. The reason why the two interact is
purely technical and an artifact of how Emacs works underneath.

I'd welcome patches to try to fix this, but I think the best fix is
> inside 'recenter': it should detect this situation and behave as if
> its argument was modified so as not to request redisplay of the window
> with window-start point that will cause recentering of point.


Yes, for example. Great idea.


> Interested?
>

No, thank you.

Regards,
Jorgen

--001a114012b42b3d7d052f1f6b66
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">On Mon, Mar 28=
, 2016 at 7:29 PM Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN">eliz@gn=
u.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt; From: Jor=
gen Sch=C3=A4fer &lt;<a href=3D"mailto:jorgen.schaefer@HIDDEN" target=3D=
"_blank">jorgen.schaefer@HIDDEN</a>&gt;<br>
&gt; Date: Mon, 28 Mar 2016 13:10:23 +0000<br>
&gt; Cc: <a href=3D"mailto:23098 <at> debbugs.gnu.org" target=3D"_blank">23098@d=
ebbugs.gnu.org</a><br>
&gt;<br>
&gt; As an end user, I expect `recenter-to-bottom&#39; to cycle the line wi=
th point on it between the top, middle and<br>
&gt; bottom of the current window. The problem described in this report mea=
ns that Emacs does not actually do<br>
&gt; this =E2=80=93 the line with point on it does not ever go even near th=
e bottom of the window.<br>
<br>
You are judging what Emacs does by the end result: since the result is<br>
not to have point near the bottom, you deduce that Emacs didn&#39;t even<br=
>
try.<br></blockquote><div><br></div><div>No, I am not. As I explained at le=
ngth in my last mail.</div><div><br></div><blockquote class=3D"gmail_quote"=
 style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I =
actually don&#39;t understand why you don&#39;t want to set<br>
scroll-conservatively globally.=C2=A0 From what you say, it sounds like<br>
that variable is exactly what you want, and not only in this<br>
situation.=C2=A0 Can you explain why you don&#39;t see that as a solution?<=
br></blockquote><div><br></div><div>When scrolling through the buffer with =
cursor-up/cursor-down, I want full-page scroll, not single-line scroll.</di=
v><div><br></div><div>When I hit C-l, I want point to end up at the bottom =
at the window.</div><div><br></div><div>I do not want to lose the former ju=
st so I can have the latter.</div><div><br></div><div>And, as the programme=
r of a mode who tries to keep text at the bottom of the window, I most cert=
ainly do not want to prescribe to the user how their scrolling with cursor-=
up/cursor-down behaves just so I can keep the text at the bottom of the win=
dow when I add a line.<br></div><div><br></div><div>These two situations ha=
ve absolutely nothing to do with each other as far as the user experience i=
s concerned. The reason why the two interact is purely technical and an art=
ifact of how Emacs works underneath.<br></div><div><br></div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex">I&#39;d welcome patches to try to fix this, but I think th=
e best fix is<br>
inside &#39;recenter&#39;: it should detect this situation and behave as if=
<br>
its argument was modified so as not to request redisplay of the window<br>
with window-start point that will cause recentering of point.=C2=A0</blockq=
uote><div><br></div><div>Yes, for example. Great idea.</div><div>=C2=A0<br>=
</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex">Interested?<br></blockquote><div><br><=
/div><div>No, thank you.</div><div><br></div><div>Regards,</div><div>Jorgen=
</div><div><br></div></div></div>

--001a114012b42b3d7d052f1f6b66--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 28 Mar 2016 18:01:01 +0000
Resent-Message-ID: <handler.23098.B23098.145918801014078 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 23098
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= <jorgen.schaefer@HIDDEN>
Cc: jwiegley@HIDDEN, 23098 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 23098-submit <at> debbugs.gnu.org id=B23098.145918801014078
          (code B ref 23098); Mon, 28 Mar 2016 18:01:01 +0000
Received: (at 23098) by debbugs.gnu.org; 28 Mar 2016 18:00:10 +0000
Received: from localhost ([127.0.0.1]:42345 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1akbSU-0003f0-7v
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2016 14:00:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40225)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1akbSS-0003dx-0K
 for 23098 <at> debbugs.gnu.org; Mon, 28 Mar 2016 14:00:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1akbSJ-0003tv-H6
 for 23098 <at> debbugs.gnu.org; Mon, 28 Mar 2016 14:00:02 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59136)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1akbSJ-0003tr-DL; Mon, 28 Mar 2016 13:59:59 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4856
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1akbSI-00029I-LY; Mon, 28 Mar 2016 13:59:59 -0400
Date: Mon, 28 Mar 2016 20:59:39 +0300
Message-Id: <838u12xz3o.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <CALqDrSdQ184QTf6KMW4ueROFawUrR_Y1VSD8b-XB3zkW+7LYzA@HIDDEN>
 (message from Jorgen =?UTF-8?Q?Sch=C3=A4fer?= on Mon, 28 Mar 2016 17:41:02
 +0000)
References: <87r3f19gx0.fsf@HIDDEN> <83d1ql2ebx.fsf@HIDDEN>
 <CALqDrSe7GUay_h0q9aKzfrwgP6OVU_QzS_tVhCHn5DV8a+CoUw@HIDDEN>
 <m2r3ewstu0.fsf@HIDDEN>
 <CALqDrSfJvTeBWrQ9bv9jHn97MNHSSgK7muO+zhz6Ky3ZqPOZXA@HIDDEN>
 <83bn5yy0jw.fsf@HIDDEN>
 <CALqDrSdQ184QTf6KMW4ueROFawUrR_Y1VSD8b-XB3zkW+7LYzA@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.0 (------)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Jorgen Schäfer <jorgen.schaefer@HIDDEN>
> Date: Mon, 28 Mar 2016 17:41:02 +0000
> Cc: jwiegley@HIDDEN, 23098 <at> debbugs.gnu.org
> 
>  I actually don't understand why you don't want to set
>  scroll-conservatively globally. From what you say, it sounds like
>  that variable is exactly what you want, and not only in this
>  situation. Can you explain why you don't see that as a solution?
> 
> When scrolling through the buffer with cursor-up/cursor-down, I want full-page scroll, not single-line scroll.

Emacs doesn't by default give you a full-page scroll, it recenters
point instead.

> These two situations have absolutely nothing to do with each other as far as the user experience is
> concerned. The reason why the two interact is purely technical and an artifact of how Emacs works
> underneath.

No, the reason is not technical.  This was coded specifically for
those who do want minimal scroll to bring point into view.  They
explicitly requested this behavior.

>  I'd welcome patches to try to fix this, but I think the best fix is
>  inside 'recenter': it should detect this situation and behave as if
>  its argument was modified so as not to request redisplay of the window
>  with window-start point that will cause recentering of point. 
> 
> Yes, for example. Great idea.
> 
>  Interested?
> 
> No, thank you.

Well, I hope someone else will be.





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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