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


Message #8 received at 67791 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 67791 <at> debbugs.gnu.org
Subject: Re: bug#67791: 30.0.50;
 `t' command on Gnus summary buffer sometimes causes an error
Date: Tue, 12 Dec 2023 13:51:30 +0200
> Date: Tue, 12 Dec 2023 11:15:54 +0900
> From: Katsumi Yamaoka <yamaoka <at> jpl.org>
> 
> Because the `gnus-article-treat-fold-headers' function does not
> work as expected.  `t' command, i.e. `gnus-summary-toggle-header'
> is invoked on the Gnus summary buffer, that runs by default
> `gnus-article-treat-fold-headers' by way of `gnus-treat-article'.
> It works on the article buffer and folds headers with the help of
> the pixel-fill functions.  One of them, `pixel-fill-region' uses
> the built-in `window-text-pixel-size' function, that is required
> to run on the selected window in which there is the text to
> measure the pixel size (since `pixel-fill-region' passes nil to
> `window-text-pixel-size' as the 1st argument `WINDOW').
> ,----
> | (window-text-pixel-size &optional WINDOW FROM TO ...)
> |
> | Return the size of the text of WINDOW's buffer in pixels.
> | WINDOW must be a live window and defaults to the selected one.
> `----
> Therefore, the window should be that of the article.  However,
> in that situation the selected one is that of the summary, as
> mentioned above.  Because of this, the `window-text-pixel-size'
> sometimes returns a funny value and it causes the error like
> this:
> 
> Debugger entered--Lisp error: (error "The indentation (640) is wider than th...
>   signal(error ("The indentation (640) is wider than the fill width (623)"))...
>   error("The indentation (%s) is wider than the fill width (%s)" 640 623)...
>   (progn (error "The indentation (%s) is wider than the fill width (%s)" ind...
>   (if (> indentation pixel-width) (progn (error "The indentation (%s) is wid...
>   (let ((indentation (car (window-text-pixel-size nil (line-beginning-positi...
>   (save-excursion (goto-char start) (let ((indentation (car (window-text-pix...
>   pixel-fill-region(101 181 623)
>  [...]
>   command-execute(gnus-summary-toggle-header)
> 
> Another possible cause might be the recent change (33b6de7a)
> made in `window-text-pixel-size', because such an error doesn't
> look to cause in Emacs 29.1.90 (the function before the change
> might possibly have worked on the current buffer, not the
> selected window).

Did you try using the newer buffer-text-pixel-size instead?




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

Previous Next


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