all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: 40520@debbugs.gnu.org
Cc: Eric Abrahamsen <eric@ericabrahamsen.net>
Subject: bug#40520: 28.0.50; Prevent duplicate thread titles in Gnus
Date: Thu, 25 Jun 2020 22:45:03 +0200	[thread overview]
Message-ID: <87bll6q3hs.fsf@gmail.com> (raw)
In-Reply-To: <87tv1tj9fw.fsf@gmail.com> ("Kévin Le Gouguec"'s message of "Thu, 09 Apr 2020 11:27:15 +0200")

[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]

Hello again,

I'd like to bump this report, if only because I've finally taken the
time to try out Eric Abrahamsen's gnus-mock package on GNU ELPA.  This
allowed me to make a reproducible test case with this simple config:

> (setq gnus-summary-make-false-root 'dummy)

I've attached an example .mbox saved from gnu-emacs-help; you can
reproduce my issue by saving it somewhere, then evaluating this in the
same directory:

#+begin_src elisp
(let ((gnus-mock-init-file (expand-file-name "gnus-dummy-init.el"))
      (gnus-mock-emacs-program (expand-file-name "src/emacs" source-directory))
      (mbox (expand-file-name "gnu-emacs-help.mbox" default-directory))
      (init-template "
(setq gnus-summary-make-false-root 'dummy)
(gnus)
(gnus-group-make-doc-group \"%s\" nil)
(gnus-group-select-group)
"))
  (with-temp-buffer
    (insert (format init-template mbox))
    (write-file "gnus-dummy-init.el"))
  (package-initialize)
  (gnus-mock-start))
#+end_src

Right now, Gnus produces this:

   :                             : Re: How to get the actual face attribute?
 .     [  67: Yuan Fu                ] Re: How to get the actual face attribute?
 .     [  28: Yuan Fu                ] 

With my patch (re-attached, with bug number for convenience), Gnus
produces this:

   :                             : Re: How to get the actual face attribute?
 .     [  67: Yuan Fu                ] 
 .     [  28: Yuan Fu                ] 


Let me know if there's anything wrong with the patch, or with my
understanding of the situation.

Thank you for your time.



[-- Attachment #2: gnu-emacs-help.mbox --]
[-- Type: application/mbox, Size: 14363 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-Simplify-dummy-root-subject-before-comparing-it-to-t.patch --]
[-- Type: text/x-patch, Size: 1198 bytes --]

From 271ff9c3287e25a71b82f9e47418a66c28f8553a 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" (bug#40520).
---
 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 341f04ad77..e4f4114b6c 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.27.0


  reply	other threads:[~2020-06-25 20:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09  9:27 bug#40520: 28.0.50; Prevent duplicate thread titles in Gnus Kévin Le Gouguec
2020-06-25 20:45 ` Kévin Le Gouguec [this message]
2020-07-19  2:35 ` Lars Ingebrigtsen
2020-07-19  9:48   ` Kévin Le Gouguec

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=87bll6q3hs.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --cc=40520@debbugs.gnu.org \
    --cc=eric@ericabrahamsen.net \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.