emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] Off-by-one error in width of Agenda window?


From: Ihor Radchenko
Subject: Re: [BUG] Off-by-one error in width of Agenda window?
Date: Wed, 20 Apr 2022 12:01:49 +0800

"N. Jackson" <nljlistbox2@gmail.com> writes:

> It turns out there is already an Emacs bug for this (Bug 19395:
> Setting left fringe to 0 messes up window-width
> (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19395)).
>
> My understanding of the discussion is that the bug is caused by
> window-width including in its return value the width of the column
> reserved for the continuation glyph (which column exists when one or
> both of the fringes is/are turned off), so window-width over-reports
> the available width of the window in this case.

Thanks a lot for the detailed analysis!

> The bug hasn't been closed, but IIUC it has been "fixed" by changing
> the documentation of window-width to indicate the limitation. The
> latter part of the bug thread is a discussion and development of the
> function window-max-chars-per-line.
>
> It seems that Org maybe should be using window-max-chars-per-line
> rather than window-width.
>
> [Unfortunately w-m-c-p-l is not a drop in replacement for
> window-width; it doesn't just fix the continuation glyph column
> "bug", but it also adds additional functionality and has a different
> signature.]

Could you elaborate why window-max-chars-per-line cannot be used instead
of window-width by Org? It appears to be strictly more accurate.

Best,
Ihor



reply via email to

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