unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: R.Stewart@hw.ac.uk, 72771@debbugs.gnu.org, kevin.legouguec@gmail.com
Subject: bug#72771: 31.0.50; shr html renderer throwing "Specified window is not displaying the current buffer"
Date: Sun, 25 Aug 2024 09:22:55 +0300	[thread overview]
Message-ID: <86v7zpktog.fsf@gnu.org> (raw)
In-Reply-To: <990d87c2-5891-569e-d84c-4d1c473aafbe@gmail.com> (message from Jim Porter on Sat, 24 Aug 2024 23:11:46 -0700)

> Date: Sat, 24 Aug 2024 23:11:46 -0700
> Cc: R.Stewart@hw.ac.uk, 72771@debbugs.gnu.org, kevin.legouguec@gmail.com
> From: Jim Porter <jporterbugs@gmail.com>
> 
> Previously, you'd suggested using 'string-pixel-width' using a few 
> characters to compute an average width. After thinking about it, I 
> realized that it's actually possible to get the real 
> 'font->average_width' value using 'string-pixel-width': just use a 
> display spec!
> 
>    (string-pixel-width
>     (propertize some-length-1-string 'display '(space :width 1)))
> 
> That works out nicely since then the only function I'm using to compute 
> string widths in this code is 'string-pixel-width', so there's less risk 
> of different functions having slightly different font handling.

Good idea.

> >> Thanks for prompting me to re-read the manual on this. I'd
> >> misinterpreted this passage in the documentation for 'query-font':
> [snip]
> > I don't see how this is different from the text we already have,
> > sorry.
> 
> Here's another variation on the documentation that might be clearer?
> 
> "The average width of the font characters. Emacs uses this value when 
> calculating text layout on display. If this is zero, Emacs uses
> the value of space-width instead."

That's again exactly what the current text does, just broken into
sentences differently.

I'm sorry, I must understand what is it in the original text that
misled you, before I can consider any changes.

The updated patch LGTM, thanks.





  reply	other threads:[~2024-08-25  6:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-23  8:15 bug#72771: 31.0.50; shr html renderer throwing "Specified window is not displaying the current buffer" Rob Stewart via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-23  9:13 ` Rob Stewart via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-23 13:12 ` Eli Zaretskii
2024-08-23 17:10   ` Kévin Le Gouguec
2024-08-23 22:39     ` Jim Porter
2024-08-24  6:08       ` Eli Zaretskii
2024-08-24 17:10         ` Jim Porter
2024-08-24 19:01           ` Eli Zaretskii
2024-08-24 19:42             ` Jim Porter
2024-08-25  5:05               ` Eli Zaretskii
2024-08-25  6:11                 ` Jim Porter
2024-08-25  6:22                   ` Eli Zaretskii [this message]
2024-08-25 17:18                     ` Jim Porter
2024-08-25 17:49                       ` Eli Zaretskii
2024-08-25 18:51                         ` Jim Porter

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=86v7zpktog.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=72771@debbugs.gnu.org \
    --cc=R.Stewart@hw.ac.uk \
    --cc=jporterbugs@gmail.com \
    --cc=kevin.legouguec@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).