From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: info-gnus-english@gnu.org
Subject: Redundant thread titles when using dummy roots
Date: Sat, 18 Apr 2020 18:35:33 +0200 [thread overview]
Message-ID: <87k12coip6.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]
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:
[-- 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?= <kevin.legouguec@gmail.com>
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
[-- 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
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
reply other threads:[~2020-04-18 16:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k12coip6.fsf@gmail.com \
--to=kevin.legouguec@gmail.com \
--cc=info-gnus-english@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).