From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#34038: 26.1; set-window-start sometimes fails to set window start Date: Sun, 24 Mar 2019 11:35:07 +0100 Message-ID: <87wokoa7c4.fsf@metalevel.at> References: <83sgxzhe04.fsf@gnu.org> <87ef9je67i.fsf@metalevel.at> <20190111212357.GA5201@ACM> <87h8edt3kz.fsf@metalevel.at> <5C3AF974.1030906@gmx.at> <5029BB09-30CA-41BE-819D-E15101DCF38C@gnu.org> <5C3B3FCC.8080006@gmx.at> <83tviceg83.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="94158"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Emacs/24.5 Cc: 34038@debbugs.gnu.org, acm@muc.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 24 11:36:20 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 esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h80UF-000OKr-7C for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Mar 2019 11:36:19 +0100 Original-Received: from localhost ([127.0.0.1]:54673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h80UE-0004KR-1X for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Mar 2019 06:36:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h80U0-0004I9-Kw for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2019 06:36:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h80Tz-0003qZ-Jr for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2019 06:36:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42517) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h80Ty-0003o8-4G for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2019 06:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h80Tx-0001Fz-UP for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2019 06:36:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Mar 2019 10:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34038 X-GNU-PR-Package: emacs Original-Received: via spool by 34038-submit@debbugs.gnu.org id=B34038.15534237134757 (code B ref 34038); Sun, 24 Mar 2019 10:36:01 +0000 Original-Received: (at 34038) by debbugs.gnu.org; 24 Mar 2019 10:35:13 +0000 Original-Received: from localhost ([127.0.0.1]:56061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h80TA-0001Ef-G7 for submit@debbugs.gnu.org; Sun, 24 Mar 2019 06:35:12 -0400 Original-Received: from metalevel.at ([78.46.218.83]:57862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h80T6-0001EQ-Cl for 34038@debbugs.gnu.org; Sun, 24 Mar 2019 06:35:09 -0400 Original-Received: by metalevel.at (Postfix, from userid 1000) id 2CA90A0EE9; Sun, 24 Mar 2019 11:35:07 +0100 (CET) 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:156688 Archived-At: Eli Zaretskii writes: >> Which means that force_start is pretty ephemeral. > > It's ephemeral if it leaves the window in a state which will make > subsequent redisplay unhappy. Which is what this recipe triggers. I have found another case of this issue (i.e., set-window-start fails to set window-start). In emacs -Q, please evaluate the following form in the *scratch* buffer: (progn (delete-region (point) (point-max)) (insert "\n") (set-window-start nil 1) (goto-char (point-max)) (while t (insert "test\n") (unless (pos-visible-in-window-p (point)) (redisplay) (let ((start (window-start))) (if (= start 1) (error "window-start is now 1 (as expected), please try a different text-scale-amount") (error "window-start is now unexpectedly %s (instead of 1)" start)))))) This sets, and sometimes fails to set, window-start to 1, apparently depending on the amount of text-scale: When I evaluate this with text-scale-mode-amount set to 0, window-start is correctly set to 1. However, when I change the amount of text-scale with either C-x C-= or C-x C--, then, after the form stops evaluating, window-start is at other positions. In that case, even when I then manually try to set the window-start to 1 with: M-: (set-window-start nil 1) RET then the window-start is not set to 1, but remains at the same position. Is this due to the same issue, or should I rather file this separately?