Subject: Re: bug#8355: 24.0.50; Boxes in mode-line and scrolling

From: Antoine Levitt <[email-masked]>
Date: Tue, 08 Dec 2020 16:56:50 +0100

Oof that's old.

The original bug might have been at least partially closed, I now don't
see this as much as I used to in code buffers (but it might equally have
been a change in my config). However I do see this *a lot* in tex files,
reproductibly, and it's still very annoying. I'd love it if this was
fixed!

Here's a reproducer from emacs -Q (just reproduced on 27.1):

Set
(setq scroll-conservatively 100000000)
(setq scroll-preserve-screen-position 'stay)

Open a latex file of some complexity (with sections and math, for
instance https://arxiv.org/e-print/2003.00726, but it works on any tex
file), and make sure it's in latex-mode. Go somewhere in the middle of
the file, center point (C-l), then scroll up then down (C-v and M-v).

I traced it down to
lines of varying heights: it disappears if I set
(setq font-latex-fontify-script nil)
(setq font-latex-fontify-sectioning 'color)

Best,
Antoine

08 December 2020 16:05 +01, Lars Ingebrigtsen:
> Antoine Levitt <[email-masked]> writes:
>
>> There seems to be a conflict between scrolling and the box attribute in
>> mode-line. I have in my config a ":box t" attribute in mode-line (from
>> the theme I use, zenburn.el). With this setting on, C-v M-v produces a
>> net displacement of one line up, which is annoying. This seems to be
>> irrespective of settings such as scroll-conservatively or
>> scroll-preserve-screen-position.
>>
>> I'm not 100% sure how to reproduce this, as I use the color-theme
>> package to set the parameter. Any way to set the mode-line :box
>> attribute to "t" will trigger it. Then, find a sufficiently large file,
>> and do C-v M-v.
>
> (This bug report unfortunately got no response at the time.)
>
> Are you still seeing this in more recent versions of Emacs?  If so,
> could you try to come up with a step-by-step recipe to reproduce it,
> starting from "emacs -Q"?