GNU bug report logs - #67791
30.0.50; `t' command on Gnus summary buffer sometimes causes an error

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Tue, 12 Dec 2023 02:17:01 UTC

Severity: normal

Merged with 68884, 68893

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67791 <at> 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
reopen 67791

The bugs is getting back again with the error such as the one I
reported in <b4mr0jsmahx.fsf <at> 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,




This bug report was last modified 1 year and 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.