From unknown Sun Jun 22 00:20:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52923: 29.0.50; [PATCH] gnus-summary-hide-thread only hides first sub-thread when gnus-summary-make-false-root is set to dummy Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jan 2022 00:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52923 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 52923@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164099766426766 (code B ref -1); Sat, 01 Jan 2022 00:42:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Jan 2022 00:41:04 +0000 Received: from localhost ([127.0.0.1]:57602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3SSF-0006xe-LF for submit@debbugs.gnu.org; Fri, 31 Dec 2021 19:41:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:49380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3SSD-0006x4-Dw for submit@debbugs.gnu.org; Fri, 31 Dec 2021 19:41:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3SSD-0008GJ-7D for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 19:41:01 -0500 Received: from ns.lapseofthought.com ([50.0.39.240]:7142 helo=mail.lapseofthought.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3SSB-000635-Da for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 19:41:00 -0500 Received: from awb-mbp.local (c-73-92-249-246.hsd1.ca.comcast.net [73.92.249.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4JQjq962bNz3pdyG for ; Fri, 31 Dec 2021 16:40:53 -0800 (PST) From: Alex Bochannek Date: Fri, 31 Dec 2021 16:40:46 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com Received-SPF: pass client-ip=50.0.39.240; envelope-from=alex@bochannek.com; helo=mail.lapseofthought.com X-Spam_score_int: 0 X-Spam_score: -0.0 X-Spam_bar: / X-Spam_report: (-0.0 / 5.0 requ) SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Hello! I usually set: (setq gnus-summary-make-false-root 'dummy) and noticed a while back that a `T H' did not hide dummy threads completely. This is caused by the `gnus-summary-article-number' call in `gnus-summary-hide-thread', which moves point to the next article after the dummy root. As a result, it only then hides _that_ sub-thread. I am proposing the following patch. I tested it with all documented settings for `gnus-summary-make-false-root' and it worked for me. Let me know if this looks good. Thanks and Happy New Year! * lisp/gnus/gnus-sum.el (gnus-summary-hide-thread): Fix thread hiding for dummy roots. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index cda6712f0d..b43c2731e5 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -11898,7 +11898,8 @@ gnus-summary-hide-thread (beginning-of-line) (let ((start (point)) (starteol (line-end-position)) - (article (gnus-summary-article-number))) + (article (when (not (gnus-summary-article-intangible-p)) + (gnus-summary-article-number)))) ;; Go forward until either the buffer ends or the subthread ends. (when (and (not (eobp)) (or (zerop (gnus-summary-next-thread 1 t)) @@ -11912,7 +11913,9 @@ gnus-summary-hide-thread (let ((ol (make-overlay starteol (point) nil t nil))) (overlay-put ol 'invisible 'gnus-sum) (overlay-put ol 'evaporate t))) - (gnus-summary-goto-subject article) + (if article + (gnus-summary-goto-subject article) + (gnus-summary-position-point)) ;; We moved backward past the start point (invisible thread?) (when (> start (point)) (goto-char starteol))) --=-=-= Content-Type: text/plain -- Alex. --=-=-=-- From unknown Sun Jun 22 00:20:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52923: 29.0.50; [PATCH] gnus-summary-hide-thread only hides first sub-thread when gnus-summary-make-false-root is set to dummy Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jan 2022 09:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52923 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Bochannek Cc: 52923@debbugs.gnu.org Received: via spool by 52923-submit@debbugs.gnu.org id=B52923.164223891821604 (code B ref 52923); Sat, 15 Jan 2022 09:29:01 +0000 Received: (at 52923) by debbugs.gnu.org; 15 Jan 2022 09:28:38 +0000 Received: from localhost ([127.0.0.1]:39001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8fMU-0005cO-HX for submit@debbugs.gnu.org; Sat, 15 Jan 2022 04:28:38 -0500 Received: from quimby.gnus.org ([95.216.78.240]:46918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8fMT-0005c9-MZ for 52923@debbugs.gnu.org; Sat, 15 Jan 2022 04:28:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=L/0ly7WURxxpmtulAq7cBC9fEGMfYRnI01P6mefK340=; b=AXKb/6AtFaT3sVefRdiykkry6p QifuhpXOV+TG4TFqR0srLjdGbm7pBO/co4xPQqDfp1Mb0F49NsLTbFQn2A7FkK1DK7ytut1wEOqHE jbxYFfEbGterypB2lfcXaq6l7J4zsT3ZMxAIMEBO607oehMXhqafU9XcdX3rcqvf+hI0=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n8fMK-000369-KC; Sat, 15 Jan 2022 10:28:31 +0100 From: Lars Ingebrigtsen References: X-Now-Playing: Joni Mitchell's _Archives: The Early Years (4)_: "Chelsea Morning" Date: Sat, 15 Jan 2022 10:28:25 +0100 In-Reply-To: (Alex Bochannek's message of "Fri, 31 Dec 2021 16:40:46 -0800") Message-ID: <878rvhz6ti.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alex Bochannek writes: > I am proposing the following patch. I tested it with all documented > settings for `gnus-summary-make-false-root' and it worked for me. Thanks; applied to Emacs 29. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Alex Bochannek writes: > I am proposing the following patch. I tested it with all documented > settings for `gnus-summary-make-false-root' and it worked for me. Thanks; applied to Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 04:28:43 2022 Received: (at control) by debbugs.gnu.org; 15 Jan 2022 09:28:43 +0000 Received: from localhost ([127.0.0.1]:39004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8fMZ-0005ci-Oc for submit@debbugs.gnu.org; Sat, 15 Jan 2022 04:28:43 -0500 Received: from quimby.gnus.org ([95.216.78.240]:46934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8fMY-0005cH-SW for control@debbugs.gnu.org; Sat, 15 Jan 2022 04:28:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZKyMnssA5vM/4y+zidPxSJIsv6TVGHMBZMasGXphPIk=; b=NaP6g42l6BLP5pdpowOA+RlipY VWENDPCfNiuTbsrA6rtxPQzWMVIlwMWJqgxMRgcinwZtnubuHGcVp+nVDqgHxc14rWGxcLSKY4k1t 7VxlY93VxdluHbjVLI08boCGzg1DPRTax+iWwHvMziES0hH5lrB565aHWG4yqyWv3T0Y=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n8fMQ-00036H-Pt for control@debbugs.gnu.org; Sat, 15 Jan 2022 10:28:37 +0100 Date: Sat, 15 Jan 2022 10:28:33 +0100 Message-Id: <877db1z6ta.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #52923 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 52923 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 52923 29.1 quit