[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
- [BUG] Off-by-one error in width of Agenda window? [9.5.2 (release_9.5.2-25-gaf6f12 @ /data/installs/snapshots/emacs-28.1/lisp/org/)], N. Jackson, 2022/04/18
- Re: [BUG] Off-by-one error in width of Agenda window? [9.5.2 (release_9.5.2-25-gaf6f12 @ /data/installs/snapshots/emacs-28.1/lisp/org/)], Ihor Radchenko, 2022/04/18
- Re: [BUG] Off-by-one error in width of Agenda window? [9.5.2 (release_9.5.2-25-gaf6f12 @ /data/installs/snapshots/emacs-28.1/lisp/org/)], N. Jackson, 2022/04/18
- Re: [BUG] Off-by-one error in width of Agenda window? [9.5.2 (release_9.5.2-25-gaf6f12 @ /data/installs/snapshots/emacs-28.1/lisp/org/)], Ihor Radchenko, 2022/04/18
- Re: [BUG] Off-by-one error in width of Agenda window?, N. Jackson, 2022/04/19
- Re: [BUG] Off-by-one error in width of Agenda window?,
Ihor Radchenko <=
- Re: [BUG] Off-by-one error in width of Agenda window?, N. Jackson, 2022/04/20
- [PATCH] org-agenda: Use `window-max-chars-per-line' instead of `window-width', Ihor Radchenko, 2022/04/21
- Re: [PATCH] org-agenda: Use `window-max-chars-per-line' instead of `window-width', N. Jackson, 2022/04/21
- Re: [PATCH] org-agenda: Use `window-max-chars-per-line' instead of `window-width', N. Jackson, 2022/04/21
- [PATCH v2] org-agenda: Use `window-max-chars-per-line' to calculate max text width, Ihor Radchenko, 2022/04/22
- Re: [PATCH v2] org-agenda: Use `window-max-chars-per-line' to calculate max text width, N. Jackson, 2022/04/22
- Re: [PATCH v2] org-agenda: Use `window-max-chars-per-line' to calculate max text width, Ihor Radchenko, 2022/04/22
- Re: [PATCH v2] org-agenda: Use `window-max-chars-per-line' to calculate max text width, N. Jackson, 2022/04/22
- Re: [PATCH v2] org-agenda: Use `window-max-chars-per-line' to calculate max text width, Ihor Radchenko, 2022/04/24
- Thank you Re: [PATCH v2] org-agenda: Use `window-max-chars-per-line' to calculate max text width, N. Jackson, 2022/04/24