GNU bug report logs - #59963
29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe

Previous Next

Package: emacs;

Reported by: Akib Azmain Turja <akib <at> disroot.org>

Date: Sun, 11 Dec 2022 12:32:02 UTC

Severity: normal

Found in version 29.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 59963 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Akib Azmain Turja <akib <at> disroot.org>, martin rudalics <rudalics <at> gmx.at>
Cc: 59963 <at> debbugs.gnu.org
Subject: Re: bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always
 work on GUI without fringe
Date: Sun, 11 Dec 2022 18:14:28 +0200
> From: Akib Azmain Turja <akib <at> disroot.org>
> Cc: 59963 <at> debbugs.gnu.org
> Date: Sun, 11 Dec 2022 21:21:13 +0600
> 
> I just found the root cause.  I've used '(set-window-fringes nil 0 0)'
> (from Doom as said by the original reporter) to hide fringe.  It doesn't
> set 'left-fringe-width' and 'right-fringe-width', which are checked by
> 'window-max-chars-per-line'.  Setting these two variables to zero fixes
> the bug.

It is wrong to use left-fringe-width and right-fringe-width here,
because those are per _buffer_ not per _window_.  set-window-fringes
doesn't set them for this very reason, and it shouldn't.

> Now I think this is a bug of _both_ Emacs and Doom.  Doom doesn't set
> the variables, hence this bug report here; and Emacs doesn't check
> 'window-fringes'.
> 
> What do you think?

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).

Martin, any comments?




This bug report was last modified 2 years and 239 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.