Hello,
I have configured Gnus to gather loose threads under a dummy root
article. I have "%S" set in gnus-summary-dummy-line-format, and %s in
gnus-summary-line-format: my intent is to have the thread subject show
up only once, on the dummy root.
Sometimes this works:
┌◈ bug#40337: 28.0.50; Enable
case-fold-search in hi-lock
02:08 ├► Juri Linkov
05:33 ╰► Stefan Monnier
And sometimes it doesn't:
┌◈ Re: Emacs's set-frame-size can
not work well with gnome-shell?
10:32 ├► martin rudalics Re: Emacs's set-frame-size can
not work well with gnome-shell?
16:04 │╰► Eli Zaretskii
10:33 ├► martin rudalics
15:19 │╰► Dmitry Gutov
10:33 ╰► martin rudalics
I poked at lisp/gnus/gnus-sum.el and reported this as bug#40520, where I
suggested the following patch:
>From 5c45214e42322ff84a9f2fa8e28616898e77ea2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <[email protected]>
Date: Thu, 9 Apr 2020 11:05:39 +0200
Subject: [PATCH] Simplify dummy root subject before comparing it to the
current article
* lisp/gnus/gnus-sum.el (gnus-summary-prepare-threads): Simplify both
the dummy root and the following article before comparing them,
otherwise both the former and the latter might display the thread's
subject even when gnus-summary-line-format contains "%s".
---
lisp/gnus/gnus-sum.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index a47e657623..3251ee5974 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -5352,7 +5352,7 @@ gnus-summary-prepare-threads
;; We remember that we probably want to output a dummy
;; root.
(setq gnus-tmp-dummy-line gnus-tmp-header)
- (setq gnus-tmp-prev-subject gnus-tmp-header))
+ (setq gnus-tmp-prev-subject (gnus-simplify-subject-fully gnus-tmp-header)))
(t
;; We do not make a root for the gathered
;; sub-threads at all.
--
2.26.0
As I said in the report, unless I'm mistaken, gnus-tmp-prev-subject's
sole purpose is to be compared with simp-subject. Since the latter goes
through gnus-simplify-subject-fully, it seems right that the former
would go through it too…
So far the report has not received much attention. I figure it could be
a good idea to ask this list for feedback: is this an issue someone else
has run into? Could it be something from my configuration (which I've
posted as a footnote in the bug report)?
Also, I imagine that this list is one of the best places to find people
who can answer the question I asked in my bug report's second footnote:
how would one go about writing an ERT test case for this?
Thank you for your time.
_______________________________________________
info-gnus-english mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/info-gnus-english