GNU bug report logs - #52923
29.0.50; [PATCH] gnus-summary-hide-thread only hides first sub-thread when gnus-summary-make-false-root is set to dummy

Previous Next

Package: emacs;

Reported by: Alex Bochannek <alex <at> bochannek.com>

Date: Sat, 1 Jan 2022 00:42:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52923 in the body.
You can then email your comments to 52923 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52923; Package emacs. (Sat, 01 Jan 2022 00:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex Bochannek <alex <at> bochannek.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 01 Jan 2022 00:42:02 GMT) Full text and rfc822 format available.

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

From: Alex Bochannek <alex <at> bochannek.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; [PATCH] gnus-summary-hide-thread only hides first
 sub-thread when gnus-summary-make-false-root is set to dummy
Date: Fri, 31 Dec 2021 16:40:46 -0800
[Message part 1 (text/plain, inline)]
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.

[Message part 2 (text/x-patch, 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)))
[Message part 3 (text/plain, inline)]
-- 
Alex.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52923; Package emacs. (Sat, 15 Jan 2022 09:29:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alex Bochannek <alex <at> bochannek.com>
Cc: 52923 <at> debbugs.gnu.org
Subject: Re: 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
Date: Sat, 15 Jan 2022 10:28:25 +0100
Alex Bochannek <alex <at> bochannek.com> 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




bug marked as fixed in version 29.1, send any further explanations to 52923 <at> debbugs.gnu.org and Alex Bochannek <alex <at> bochannek.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 15 Jan 2022 09:29:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 12 Feb 2022 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 130 days ago.

Previous Next


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