[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34038: 26.1; set-window-start sometimes fails to set window start

From: Markus Triska
Subject: bug#34038: 26.1; set-window-start sometimes fails to set window start
Date: Sun, 24 Mar 2019 11:35:07 +0100
User-agent: Emacs/24.5

Eli Zaretskii <address@hidden> 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:

      (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))
          (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)" 

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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]