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 #23 received at 59963 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>, Akib Azmain Turja <akib <at> disroot.org>
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: Mon, 12 Dec 2022 09:18:28 +0100
> 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.  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.

martin




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.