From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 9144 invoked from network); 18 Apr 2020 16:40:14 -0000 Received-SPF: pass (lists.gnu.org: domain of gnu.org designates 209.51.188.17 as permitted sender) receiver=inbox.vuxu.org; client-ip=209.51.188.17 envelope-from= Received: from lists.gnu.org (209.51.188.17) by inbox.vuxu.org with UTF8ESMTPZ; 18 Apr 2020 16:40:14 -0000 Received: from localhost ([::1]:59934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPqVn-0002oZ-Se for ml@inbox.vuxu.org; Sat, 18 Apr 2020 12:40:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52340) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPqVj-0002lp-9Q for info-gnus-english@gnu.org; Sat, 18 Apr 2020 12:40:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPqVh-0000RY-1N for info-gnus-english@gnu.org; Sat, 18 Apr 2020 12:40:07 -0400 Received: from ciao.gmane.io ([159.69.161.202]:45588) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jPqVg-0000Q8-QH for info-gnus-english@gnu.org; Sat, 18 Apr 2020 12:40:04 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jPqVe-000715-1H for info-gnus-english@gnu.org; Sat, 18 Apr 2020 18:40:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: info-gnus-english@gnu.org From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Subject: Redundant thread titles when using dummy roots Date: Sat, 18 Apr 2020 18:35:33 +0200 Message-ID: <87k12coip6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:5zILSnZ4P3HF2kOspT6pheOIuN8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 159.69.161.202 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+ml=inbox.vuxu.org@gnu.org Sender: "info-gnus-english" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Simplify-dummy-root-subject-before-comparing-it-to-t.patch >From 5c45214e42322ff84a9f2fa8e28616898e77ea2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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. --=-=-= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KaW5mby1nbnVz LWVuZ2xpc2ggbWFpbGluZyBsaXN0CmluZm8tZ251cy1lbmdsaXNoQGdudS5vcmcKaHR0cHM6Ly9s aXN0cy5nbnUub3JnL21haWxtYW4vbGlzdGluZm8vaW5mby1nbnVzLWVuZ2xpc2gK --=-=-=--