unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Brahimi Saifullah <brahimi.saifullah@gmail.com>, 51995@debbugs.gnu.org
Subject: bug#51995: 29.0.50; `string-pixel-width' depends on the current window width
Date: Sat, 20 Nov 2021 09:48:39 +0100	[thread overview]
Message-ID: <4abf6240-6cb0-fda0-b264-e2b1a5078f92@gmx.at> (raw)
In-Reply-To: <84czmvbepd.fsf@gmail.com>

 > I think the best solution is to modify `window-text-pixel-size' so that
 > X-LIMIT may be specified as having "no limit".  Y-LIMIT already offers
 > this possibility: when it is nil, the entirety of the buffer is considered
 > (in reality, it seems to be simply set to INT_MAX, and that does the job).

Since 'window-text-pixel-size' has to deal with arbitrary buffers, it is
not a good idea to set X-LIMIT or Y-LIMIT to very large values.  The
doc-string of 'window-text-pixel-size' explicitly warns about X-LIMIT
that

   Since calculating the width of long lines can take some time, it's
   always a good idea to make this argument as small as possible; in
   particular, if the buffer contains long lines that shall be truncated
   anyway.

and about Y-LIMIT that

   Since calculating the text height of a large buffer can take some time,
   it makes sense to specify this argument if the size of the buffer is
   large or unknown.

So any such fix has to be made in 'string-pixel-width' itself.

 > I'm experience some different problems with this function, and I'm pretty sure
 > it don't stem from this same issue, but from WINDOW being buffer.
 > Should I open a new bug report? Or expand upon the issue on this same thread?

'string-pixel-width' and the accompanying change of
'window-text-pixel-size' are broken in many ways, see also

   https://mail.gnu.org/archive/html/emacs-devel/2021-11/msg00339.html

If you see a problem that is not mentioned there, please tell us.

I hopefully fixed most of the issues here but cannot send you a patch at
the moment to test because my local copy is completely out of synch with
master.  So please bear with me.

martin





  parent reply	other threads:[~2021-11-20  8:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-20  5:04 bug#51995: 29.0.50; `string-pixel-width' depends on the current window width Brahimi Saifullah
2021-11-20  7:20 ` Eli Zaretskii
2021-11-20  8:48 ` martin rudalics [this message]
2021-11-20  9:35   ` Lars Ingebrigtsen
2021-11-20 21:36 ` Brahimi Saifullah
2021-11-20 21:42 ` Brahimi Saifullah
2021-11-21  6:34   ` Eli Zaretskii
2021-11-21  9:12   ` martin rudalics
2021-11-21 18:38 ` Brahimi Saifullah
2021-11-22  9:28   ` martin rudalics
2021-11-22 11:04     ` Lars Ingebrigtsen
2021-11-22  0:53 ` Brahimi Saifullah

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=4abf6240-6cb0-fda0-b264-e2b1a5078f92@gmx.at \
    --to=rudalics@gmx.at \
    --cc=51995@debbugs.gnu.org \
    --cc=brahimi.saifullah@gmail.com \
    /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).