From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#34038: 26.1; set-window-start sometimes fails to set window start Date: Sat, 12 Jan 2019 18:22:03 +0000 Message-ID: <20190112182203.GA8370@ACM> References: <83sgxzhe04.fsf@gnu.org> <87ef9je67i.fsf@metalevel.at> <20190111212357.GA5201@ACM> <5C39A193.4040108@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1547317862 12801 195.159.176.226 (12 Jan 2019 18:31:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 12 Jan 2019 18:31:02 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Markus Triska , 34038@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 12 19:30:57 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1giO3d-0003C7-CA for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Jan 2019 19:30:57 +0100 Original-Received: from localhost ([127.0.0.1]:55451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giO5k-0004T1-C9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Jan 2019 13:33:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giO5e-0004Sh-GM for bug-gnu-emacs@gnu.org; Sat, 12 Jan 2019 13:33:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giO5d-00009X-TA for bug-gnu-emacs@gnu.org; Sat, 12 Jan 2019 13:33:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57816) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1giO5d-00009O-Nq for bug-gnu-emacs@gnu.org; Sat, 12 Jan 2019 13:33:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1giO5d-00070O-Jb for bug-gnu-emacs@gnu.org; Sat, 12 Jan 2019 13:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Jan 2019 18:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34038 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 34038-submit@debbugs.gnu.org id=B34038.154731794826884 (code B ref 34038); Sat, 12 Jan 2019 18:33:01 +0000 Original-Received: (at 34038) by debbugs.gnu.org; 12 Jan 2019 18:32:28 +0000 Original-Received: from localhost ([127.0.0.1]:57097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1giO56-0006zY-4y for submit@debbugs.gnu.org; Sat, 12 Jan 2019 13:32:28 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:27709 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1giO54-0006zO-EN for 34038@debbugs.gnu.org; Sat, 12 Jan 2019 13:32:27 -0500 Original-Received: (qmail 99477 invoked by uid 3782); 12 Jan 2019 18:32:24 -0000 Original-Received: from acm.muc.de (p2E5D51E2.dip0.t-ipconnect.de [46.93.81.226]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 12 Jan 2019 19:32:23 +0100 Original-Received: (qmail 8388 invoked by uid 1000); 12 Jan 2019 18:22:03 -0000 Content-Disposition: inline In-Reply-To: <5C39A193.4040108@gmx.at> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154389 Archived-At: Hello, Martin. On Sat, Jan 12, 2019 at 09:13:07 +0100, martin rudalics wrote: > > A bit of debugging output shows that after (erase-buffer), window-start > > is already at 1, not the former point-max. > 'window-start' returns the position of the window start marker. When > you erase a buffer _all_ its markers go to point-min - point-max and > all window start or point markers included. Of course! I don't know what I was thinking at the time. Markers behave like markers, and w->start in struct window is just an ordinary marker. Sorry for writing rubbish. > > After (insert b), > > window-start continues to be at 1. > Because the insertion type of a window start marker is nil. You can > use 'insert-before-markers' to override that. Yes. The question remains, what is causing the unexpected scrolling in the OP's scenario? > martin -- Alan Mackenzie (Nuremberg, Germany).