[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on G
From: |
Eli Zaretskii |
Subject: |
bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe |
Date: |
Mon, 12 Dec 2022 15:10:16 +0200 |
> Date: Mon, 12 Dec 2022 09:18:28 +0100
> Cc: 59963@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
>
> > Using left/right-fringe-width in window-max-chars-per-line is IMO
> > wrong, we should use window-fringes (which will return correct values
> > both when the window has its private valuesm, either via
> > set-window-fringes or via assignment of left/right-fringe-width, and
> > when it doesn't).
>
> This should have been done at the time that function was installed.
Yes, I wonder what I was smoking back them.
> If you do it now, you may break valid code like
>
> (let (max-chars)
> (setq right-fringe-width 0)
> (setq max-chars (window-max-chars-per-line))
> (set-window-buffer nil (window-buffer))
> max-chars)
>
> which currently yields 79 and would yield 80 with your proposal.
Do we have such code somewhere? The correct way of doing that is to
swap the lines that call window-max-chars-per-line and
set-window-buffer, because AFAIU the latter will cause window-margins
to return the values consistent with right-fringe-width just set.
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, Akib Azmain Turja, 2022/12/11
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, Eli Zaretskii, 2022/12/11
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, Akib Azmain Turja, 2022/12/11
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, Akib Azmain Turja, 2022/12/11
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, Akib Azmain Turja, 2022/12/11
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, Eli Zaretskii, 2022/12/11
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, martin rudalics, 2022/12/12
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe,
Eli Zaretskii <=
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, martin rudalics, 2022/12/12
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, Eli Zaretskii, 2022/12/14
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, Akib Azmain Turja, 2022/12/16
- bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe, Eli Zaretskii, 2022/12/17