From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 67791@debbugs.gnu.org
Subject: bug#67791: 30.0.50; `t' command on Gnus summary buffer sometimes causes an error
Date: Wed, 20 Dec 2023 09:34:00 +0900 [thread overview]
Message-ID: <b4mv88togp3.fsf@jpl.org> (raw)
In-Reply-To: <b4mr0jsmahx.fsf@jpl.org>
reopen 67791
The bugs is getting back again with the error such as the one I
reported in <b4mr0jsmahx.fsf@jpl.org>
(<https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-12/msg00690.html>).
On Wed, 13 Dec 2023 13:55:32 +0200, Eli Zaretskii wrote:
>> On Tue, 12 Dec 2023 13:51:30 +0200, Eli Zaretskii wrote:
>>> Did you try using the newer buffer-text-pixel-size instead?
>> Thanks, but I didn't know and not tried it. Probably the buffer
>> needs to be narrowed to FROM and TO, that are the arguments
>> passed to `window-text-pixel-size'.
> I don't think you need to narrow the buffer, no.
`pixel-fill-region' measures the pixel width of the first letter
of a message header using `window-text-pixel-size' as follows:
(window-text-pixel-size nil (line-beginning-position) (point))
Where the point is just after the first letter of a header. So,
how do we use `buffer-text-pixel-size' so to do the same thing?
It's nice if it can be used even when the window in which a letter
to be measured exists is not the selected one. But if it's not
possible, I think the best way whould be to use the patch I posted
first:
--- gnus-art.el~ 2023-12-10 23:22:23.410103300 +0000
+++ gnus-art.el 2023-12-12 02:11:11.364620000 +0000
@@ -2240,7 +2240,9 @@
(if (not (gnus--variable-pitch-p (get-text-property (point) 'face)))
(mail-header-fold-field)
(forward-char 1)
- (pixel-fill-region (point) (point-max) (pixel-fill-width)))
+ (save-window-excursion
+ (set-window-buffer nil (current-buffer))
+ (pixel-fill-region (point) (point-max) (pixel-fill-width))))
(goto-char (point-max))))))
(defun gnus-article-treat-suspicious-headers ()
This makes `window-text-pixel-size' sure to run on the article
window.
Regards,
next prev parent reply other threads:[~2023-12-20 0:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 2:15 bug#67791: 30.0.50; `t' command on Gnus summary buffer sometimes causes an error Katsumi Yamaoka
2023-12-12 11:51 ` Eli Zaretskii
2023-12-13 2:11 ` Katsumi Yamaoka
2023-12-13 11:55 ` Eli Zaretskii
2023-12-20 0:34 ` Katsumi Yamaoka [this message]
2023-12-20 12:53 ` Eli Zaretskii
2023-12-21 0:39 ` Katsumi Yamaoka
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=b4mv88togp3.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=67791@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.