"N. Jackson" <nljlistb...@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