From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68893: 30.0.50; pixel-fill-region errors when folding message headers in Gnus Date: Fri, 02 Feb 2024 20:35:29 +0100 Message-ID: <87y1c2zmke.fsf@gmx.net> References: <875xz6285v.fsf@gmx.net> <86v87650dr.fsf@gnu.org> Reply-To: Stephen Berman Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3158"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 68893@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 02 20:36:05 2024 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 1rVzKV-0000bf-VX for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Feb 2024 20:36:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVzKK-0007Bl-Kc; Fri, 02 Feb 2024 14:35:52 -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 1rVzKJ-0007BL-UX for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 14:35:51 -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 1rVzKJ-00032j-M5 for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 14:35:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rVzKU-0002JT-BG for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 14:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Feb 2024 19:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68893 X-GNU-PR-Package: emacs Original-Received: via spool by 68893-submit@debbugs.gnu.org id=B68893.17069025508873 (code B ref 68893); Fri, 02 Feb 2024 19:36:02 +0000 Original-Received: (at 68893) by debbugs.gnu.org; 2 Feb 2024 19:35:50 +0000 Original-Received: from localhost ([127.0.0.1]:45551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVzKH-0002J2-Ve for submit@debbugs.gnu.org; Fri, 02 Feb 2024 14:35:50 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:60047) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVzKF-0002In-Ju for 68893@debbugs.gnu.org; Fri, 02 Feb 2024 14:35:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1706902530; x=1707507330; i=stephen.berman@gmx.net; bh=5UvEtVKe9JizVou+yAiocacoTHbDfTrakXH23pPPv4E=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=Im9wlQG1ygsNF8sf01dmqasoUKHijBcSNeBMGLLtDhy+0nqFR62/FblR7i0HhQb2 DxkXFPdT42tAWANqWo5gdCRnW2xvDQ+qQNc3VdLSYV4JMBpND9atnAiZIRNySHEXA 0ii7b6x44SwydITxhwDg42TDvhGFgQIj0tMsfM+HKGwsvtax6b8d/SH+gHe2hHmrP 0ia/sJ4HnpbuJ4/gANzJpJ9H23q2b3BVoQwngmantSLcfjAIkN3go03eQtUC6waHL LsmQm2OAJrq+sxp1gEanTsqhXVSD7+Kxguhb2Zjd1+L1ot5IloT/Ss7tO8NmZOMbt 9Ac4rayT56SPpf936g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs2 ([94.134.95.164]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M1Hdq-1rULhA27fG-002myF; Fri, 02 Feb 2024 20:35:30 +0100 In-Reply-To: <86v87650dr.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 02 Feb 2024 17:52:48 +0200") X-Provags-ID: V03:K1:WkrxPynSbqRPKRVo0041zUAs+NbMZAQg8RcvusQSpCXUxbpjGvz 7IlyX6Fk/+1fyIu7IAJv3G84nyPNiNApBT1UjLI2KYW2sVUAT8+k4c5ZtroOoirAqILJwUU HZO/UN8QjrdbJW3f+1QyDn2ny+ghF3QFBMqGuNUKCtqEgMo41M/lk/Oz9bek/6AD+C9szg5 lI80r/TQU/i8Nc0pxGxBQ== UI-OutboundReport: notjunk:1;M01:P0:ySTdmSWwgc4=;B9FQ8v3P3WM040EWAltgPpOl1xO XXqvPm0r3eBtq8yEQ/tS2qJGroBbI6zqzKw4PbRv7D374i5338jnqH4Pojz3Z0IW0SUH7qn+3 x9oz+jYpCFV/3nmGW+gl8V0vdW+hnbEY6/LUoy3CEhOTjdPs3TpT7FZpFDoCoyrwbABegI8UX iZ+1CiQJFeYvjcQqhCGHtS/o2FVbQ70cEUD5Hbvi6H94lhFcDBfVzYm7A+WiohPfVUH/AdXe+ o9SyQNozULModIPiNp+PSLyohiZXIuo7+dRTtcCGpqjdi80ygPmdM6yewIuEI4xv4CADeOA3H ulQOS/2oFOYGfKw646ZvoCt2K0Zy+eEihoAQw8qFHXRSV1wb0r8YCvFJ+nmOORlxnX43+Qf5B EmciN5GN9tiAQIAzzLywsQ9Nim48EBPUsa8Ny4VqEYdeMFT35bXbzpYWF3JUvlBT3dSLBTExN RCg0IVARUo2AsnqLjJ9FXkmkBznP19GKWWFNTezNDAVz4cmXPuaEIWhGcxVuRlKMdfN5Etx9I WPadrRek5AUgOtQckQ0pCTIPQxWYRj/DS3EgyuUoD1M456/QR2rlBNO1dsPlsfk6OXKT4Prin Q4+v4B/YgEede9/4oNEemUG7Hprd7Z+RthUaVsRpOs3HhMBbRW1+vmLasVOXZJlmmT/yGbSBv afLC1oS87Lg2AMXGHhxEtbzzEqpBFlhaty71C9meujvwqD/07viKMTaGrJ53Nqzfx2x5B94Nh c2tWrs50VRe/rwL/DGrLtqy4bk7GStOdhz56xn1IVai50nQzl+KscXjG1IF384oywDsQNsJM 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:279350 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 02 Feb 2024 17:52:48 +0200 Eli Zaretskii wrote: > merge 68893 67791 > thanks > >> Date: Fri, 02 Feb 2024 16:33:00 +0100 >> From: Stephen Berman via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> When I type `t' (gnus-summary-toggle-header) on many (but not all) >> articles in the Gnus Summary buffer, I get an error in pixel-fill-regio= n >> that the indentation is wider than the fill width. I can reproduce the >> error as follows: >> >> 0. emacs -Q >> 1. Enable debug-on-error. >> 2. M-x gnus, type `y' at the prompt, then type `B RET news.gmane.io >> RET', then `C-s emacs.bugs RET RET 1 RET' to enter the Gnus Summary >> buffer showing the latest article in the gnu.emacs.bugs group. Then >> type `j' and at the prompt paste the following Message-ID (of an >> article that reliably induces the error) into the minibuffer: >> >> 3. Type `t'. This raises an error and produces the following backtrace= : > > This is another duplicate of bug#67791. Please see there for the > analysis and the proposed solutions. Ah, I actually had seen that report and also the recent other one that you merged with it, but unfortunately I didn't remember them when I encountered the issue myself today. Thanks for the pointer. And indeed, not only does Katsumi Yamaoka's patch to gnus-article-treat-fold-headers fix the problem for me too, but also your suggestion to apply the fix to pixel-fill-region instead, as in the following patch, works just as well: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: pixel-fill-region patch diff --git a/lisp/textmodes/pixel-fill.el b/lisp/textmodes/pixel-fill.el index 25c0b46cee9..dcd57acc2e5 100644 --- a/lisp/textmodes/pixel-fill.el +++ b/lisp/textmodes/pixel-fill.el @@ -73,7 +73,8 @@ pixel-fill-region If START isn't at the start of a line, the horizontal position of START, converted to pixel units, will be used as the indentation prefix on subsequent lines." - (save-excursion + (save-window-excursion + (set-window-buffer nil (current-buffer)) (goto-char start) (let ((indentation (car (window-text-pixel-size nil (line-beginning-position) --=-=-= Content-Type: text/plain (I also tried your suggestion to use buffer-text-pixel-size in place of window-text-pixel-size in pixel-fill-region, and while that prevented the error, it resulted in irregular and very large indentation of the continuations of overlong headers, and I didn't immediately see an easy way to avoid that.) Steve Berman --=-=-=--