From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs 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 Organization: Emacsen advocacy group Message-ID: References: <834jgnvdtp.fsf@gnu.org> <83sf46s4ej.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32177"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67791@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 20 01:35:37 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 1rFkYj-00086y-LB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Dec 2023 01:35:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rFkYA-0001J3-HD; Tue, 19 Dec 2023 19:35:02 -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 1rFkY8-0001Ih-6h for bug-gnu-emacs@gnu.org; Tue, 19 Dec 2023 19:35:00 -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 1rFkY7-0005gY-Sq for bug-gnu-emacs@gnu.org; Tue, 19 Dec 2023 19:34:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rFkYA-0004xM-8n for bug-gnu-emacs@gnu.org; Tue, 19 Dec 2023 19:35:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Dec 2023 00:35: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.170303245818987 (code B ref 67791); Wed, 20 Dec 2023 00:35:02 +0000 Original-Received: (at 67791) by debbugs.gnu.org; 20 Dec 2023 00:34:18 +0000 Original-Received: from localhost ([127.0.0.1]:37983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFkXR-0004wB-RI for submit@debbugs.gnu.org; Tue, 19 Dec 2023 19:34:18 -0500 Original-Received: from mail-oi1-f170.google.com ([209.85.167.170]:55592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFkXM-0004vr-Ii for 67791@debbugs.gnu.org; Tue, 19 Dec 2023 19:34:16 -0500 Original-Received: by mail-oi1-f170.google.com with SMTP id 5614622812f47-3ba53596119so1295100b6e.3 for <67791@debbugs.gnu.org>; Tue, 19 Dec 2023 16:34:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703032444; x=1703637244; h=mime-version:organization:references:subject:cc:to:from:message-id :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FkQBbe+m9e2EEs4KL0axX9onJAT6fnJbKvXx8yrNglM=; b=woNLo8moHJydHcu5uGHYQxvE4iWdqzF+DH0HgVvVbj0a2ROW6JhziEihJDwm0hoIBo Rpzo1OSoyuSTxaWLDsuUnhKOYZK8DxhwDsbGeSB18Ubk75mEmCg6fAQ1cqZqgEH2Xppu QN/s6uWqiwDHO6QhgcSPEGrUaZqYw9YWQgpGd3D0UgE0+y1o0iTA8G0KzUH+Ur8fZwkt zvNjQEMg/SqgD3KwrY8SkIOqWEg9t94eGs/FrPCbS06ynDwQ71MLivVpGok69qSYbGgo Wh1OlsCIzn0wJ3cB2JtO45Zps2aBM1XiXErTIHRn44OfH/YuGHzpDOAONc11NyZ2x5BF +Vxw== X-Gm-Message-State: AOJu0YwrSOpuzXGgvriQvhg1SxbVHYfFWiNVtTT7zKWg2W7kQ0HI3uAM qr2SI8xfiCEpgmRlYiOiRs0v0KyZUQ== X-Google-Smtp-Source: AGHT+IF+dR+DKgFhESLmsx8o5mM5WjkCo2uLkKyX5OumZuabB1pOb4TaT+q+W9zgl6yBicoi+tA6lg== X-Received: by 2002:a05:6808:3c87:b0:3b9:d722:fb11 with SMTP id gs7-20020a0568083c8700b003b9d722fb11mr18899245oib.62.1703032443865; Tue, 19 Dec 2023 16:34:03 -0800 (PST) Original-Received: from localhost (157-205-200-190.cns.tayoreru.com. [157.205.200.190]) by smtp.gmail.com with ESMTPSA id c9-20020a62e809000000b006d95bb706cbsm62650pfi.101.2023.12.19.16.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 16:34:03 -0800 (PST) X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( 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:276545 Archived-At: reopen 67791 The bugs is getting back again with the error such as the one I reported in (). 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,