all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Sébastien Chapuis" <sebastien@chapu.is>
Cc: rudalics@gmx.at, emacs-devel@gnu.org
Subject: Re: [PATCH] Add function window-line-width
Date: Thu, 14 Nov 2019 11:11:25 +0200	[thread overview]
Message-ID: <835zjm960y.fsf@gnu.org> (raw)
In-Reply-To: <CAN2HsvzYXmb0NRbkjFZy34yQ+ojOaSMZQ+-1EY2C8Xq-tf=UQw@mail.gmail.com> (message from Sébastien Chapuis on Sun, 10 Nov 2019 06:09:56 +0800)

> From: Sébastien Chapuis <sebastien@chapu.is>
> Date: Sun, 10 Nov 2019 06:09:56 +0800
> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org

> After thinking about it, I am wondering if the current behavior of 'window-lines-pixel-dimensions' is correct ?
> As user of the function I do not expect the function to count glyphs that are inserted by redisplay only "for its
> own purpose",
> glyphs that are invisible and non-existent for the end user.

There are valid use cases where those glyphs do matter, see the use of
this function in Emacs's own code.

> I see that 'window-largest-empty-rectangle' uses this function, the widths of the rectangles it returns are
> smaller than they really are.

How do you mean "smaller"?  Can you show an example where the result
is incorrect in your opinion?

> I think it makes sense to change this behavior and make 'window-lines-pixel-dimensions' not counting these
> "redisplay only" glyphs.

I don't see the need, sorry.  If what that function does doesn't fit
your bill, it's probably because you should use another function
instead.

> `(time (test1))` returns 0.000004869
> `(time (test2))` returns 0.00376

So we are talking about 3 msec additional time?  Is that really
significant in your application?



  parent reply	other threads:[~2019-11-14  9:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 22:49 [PATCH] Add function window-line-width Sébastien Chapuis
2019-11-07  8:40 ` martin rudalics
2019-11-07  8:50   ` martin rudalics
2019-11-08  4:54     ` Sébastien Chapuis
2019-11-08  9:21       ` martin rudalics
2019-11-08 13:18         ` Eli Zaretskii
2019-11-08 18:27           ` martin rudalics
2019-11-09 22:09             ` Sébastien Chapuis
2019-11-10  9:46               ` martin rudalics
2019-11-10 19:02                 ` Sébastien Chapuis
2019-11-14 10:08                   ` Eli Zaretskii
2019-11-14  9:11               ` Eli Zaretskii [this message]
2019-11-07  9:23 ` Robert Pluim

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

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

  git send-email \
    --in-reply-to=835zjm960y.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    --cc=sebastien@chapu.is \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.