From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67791: 30.0.50; `t' command on Gnus summary buffer sometimes causes an error Date: Tue, 12 Dec 2023 13:51:30 +0200 Message-ID: <834jgnvdtp.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19656"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67791@debbugs.gnu.org To: Katsumi Yamaoka Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 12 12:53:08 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rD1K0-0004sQ-KE for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Dec 2023 12:53:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rD1Ji-0006NG-4N; Tue, 12 Dec 2023 06:52:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rD1Jf-0006Ml-RC for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 06:52:47 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rD1Jf-000610-GW for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 06:52:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rD1Ju-0007i7-81 for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 06:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Dec 2023 11:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67791 X-GNU-PR-Package: emacs Original-Received: via spool by 67791-submit@debbugs.gnu.org id=B67791.170238192229562 (code B ref 67791); Tue, 12 Dec 2023 11:53:02 +0000 Original-Received: (at 67791) by debbugs.gnu.org; 12 Dec 2023 11:52:02 +0000 Original-Received: from localhost ([127.0.0.1]:55391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD1Iv-0007gW-IE for submit@debbugs.gnu.org; Tue, 12 Dec 2023 06:52:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD1It-0007gB-1M for 67791@debbugs.gnu.org; Tue, 12 Dec 2023 06:51:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rD1IY-0005r0-2Y; Tue, 12 Dec 2023 06:51:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=O41qFez7Af+i/vcpuJJH7nwICc8CPK9EsmvIYnPzSJs=; b=Wzp3Uklfe2FK 6Tm0JGV9XQ2LJ//y/n7rZYGRaynz445P5+knP+V1wBFyCFwfZLy6Kg9UDIK9tJMIFF/OEzedAx9wP VWVvo8hQMXVEhLyyVY9bi+JnJUlpMwXzDK6QzbA5rnPR4A+uNAe1RrR5mTXYHM55jgZCCPhV2w2rS xfGOTndw1f7ZnEIsjgEtwEbSUS62iacNn0i05zGC9G2Bxml+KpDkSjCtUvj9G/NnHuzlnRSH5ckqo G9wgUpfK9cQkN152bcx1R7cQrU+ojGXwsK9J5p6j58sYpF2nOplQTfiofdycVQY4vntV7qvbZdiHK FBXf1bBR/Y1c2p1sr3vVuA==; In-Reply-To: (message from Katsumi Yamaoka on Tue, 12 Dec 2023 11:15:54 +0900) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276028 Archived-At: > Date: Tue, 12 Dec 2023 11:15:54 +0900 > From: Katsumi Yamaoka > > 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?