unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Akib Azmain Turja <akib@disroot.org>, martin rudalics <rudalics@gmx.at>
Cc: 59963@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <83ilihudcr.fsf@gnu.org> (raw)
In-Reply-To: <87h6y2c6fq.fsf@disroot.org> (message from Akib Azmain Turja on Sun, 11 Dec 2022 21:21:13 +0600)

> From: Akib Azmain Turja <akib@disroot.org>
> Cc: 59963@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?





  reply	other threads:[~2022-12-11 16:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-11 11:13 bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-11 14:43 ` Eli Zaretskii
2022-12-11 14:50   ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]   ` <87o7sac78t.fsf@disroot.org>
2022-12-11 15:21     ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-11 16:14       ` Eli Zaretskii [this message]
2022-12-12  8:18         ` martin rudalics
2022-12-12 13:10           ` Eli Zaretskii
2022-12-12 16:50             ` martin rudalics
2022-12-14 15:21             ` Eli Zaretskii
2022-12-15 15:53               ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-17 12:05                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ilihudcr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=59963@debbugs.gnu.org \
    --cc=akib@disroot.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).