* Redundant thread titles when using dummy roots
@ 2020-04-18 16:35 Kévin Le Gouguec
0 siblings, 0 replies; only message in thread
From: Kévin Le Gouguec @ 2020-04-18 16:35 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Simplify-dummy-root-subject-before-comparing-it-to-t.patch --]
[-- Type: text/x-patch, Size: 1186 bytes --]
From 5c45214e42322ff84a9f2fa8e28616898e77ea2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <firstname.lastname@example.org>
Date: Thu, 9 Apr 2020 11:05:39 +0200
Subject: [PATCH] Simplify dummy root subject before comparing it to the
* 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
@@ -5352,7 +5352,7 @@ gnus-summary-prepare-threads
;; We remember that we probably want to output a dummy
(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)))
;; We do not make a root for the gathered
;; sub-threads at all.
[-- Attachment #3: Type: text/plain, Size: 728 bytes --]
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.
[-- Attachment #4: Type: text/plain, Size: 162 bytes --]
info-gnus-english mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, back to index
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18 16:35 Redundant thread titles when using dummy roots Kévin Le Gouguec
Unnamed repository; edit this file 'description' to name the repository.
Archives are clonable: git clone --mirror http://inbox.vuxu.org/info-gnus-english
Example config snippet for mirrors
Newsgroup available over NNTP:
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git