user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] view: decode In-Reply-To comments added by Gnus
@ 2024-02-08  0:04 Eric Wong
  2024-02-08  9:45 ` Štěpán Němec
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2024-02-08  0:04 UTC (permalink / raw)
  To: meta

I noticed it in <https://yhbt.net/lore/git/xmqqr0ho9oi9.fsf@gitster.g/>
while scanning for something else.
---
 lib/PublicInbox/View.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 697535ff..2aee5f05 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -744,7 +744,11 @@ href="d/">diff</a>)</pre><pre>];
 	}
 	my @irt = $eml->header_raw('In-Reply-To');
 	my $refs;
-	if (!@irt) {
+	if (@irt) { # ("so-and-so's message of $DATE") added by Gnus:
+		for (grep(/=\?/, @irt)) {
+			s/(=\?.*)\z/PublicInbox::Eml::mhdr_decode $1/se;
+		}
+	} else {
 		$refs = references($eml);
 		$irt[0] = pop(@$refs) if scalar @$refs;
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] view: decode In-Reply-To comments added by Gnus
  2024-02-08  0:04 [PATCH] view: decode In-Reply-To comments added by Gnus Eric Wong
@ 2024-02-08  9:45 ` Štěpán Němec
  2024-02-09  9:33   ` [PATCH v2] view: decode In-Reply-To comments added by some MUAs Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Štěpán Němec @ 2024-02-08  9:45 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

On Thu,  8 Feb 2024 00:04:47 +0000
Eric Wong wrote:

> Subject: [PATCH] view: decode In-Reply-To comments added by Gnus

Perhaps better to say something like "added by some
Emacs-based MUAs", as at least rmail (the other
(non-default) MUA shipped with Emacs) can do it, too:

http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/mail/rmail.el?id=d6c7092ff0713087f38b9492d53be0177af67514#n3935

Or just "some MUAs"?  Who knows who else...

SCNR,

  Štěpán

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] view: decode In-Reply-To comments added by some MUAs
  2024-02-08  9:45 ` Štěpán Němec
@ 2024-02-09  9:33   ` Eric Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Wong @ 2024-02-09  9:33 UTC (permalink / raw)
  To: Štěpán Němec; +Cc: meta

Štěpán Němec <stepnem@smrk.net> wrote:
> Eric Wong wrote:
> > Subject: [PATCH] view: decode In-Reply-To comments added by Gnus

> Or just "some MUAs"?  Who knows who else...

Yeah, I wouldn't be surprised if there were more...

---8<---
Subject: [PATCH] view: decode In-Reply-To comments added by some MUAs

Emacs-based MUAs (e.g. Gnus and rmail) can do it, and maybe
some others, too.  I noticed it in
<https://yhbt.net/lore/git/xmqqr0ho9oi9.fsf@gitster.g/>
while scanning for something else.
---
 lib/PublicInbox/View.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 697535ff..44e1f2a8 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -744,7 +744,11 @@ href="d/">diff</a>)</pre><pre>];
 	}
 	my @irt = $eml->header_raw('In-Reply-To');
 	my $refs;
-	if (!@irt) {
+	if (@irt) { # ("so-and-so's message of $DATE") added by some MUAs
+		for (grep(/=\?/, @irt)) {
+			s/(=\?.*)\z/PublicInbox::Eml::mhdr_decode $1/se;
+		}
+	} else {
 		$refs = references($eml);
 		$irt[0] = pop(@$refs) if scalar @$refs;
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-09  9:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08  0:04 [PATCH] view: decode In-Reply-To comments added by Gnus Eric Wong
2024-02-08  9:45 ` Štěpán Němec
2024-02-09  9:33   ` [PATCH v2] view: decode In-Reply-To comments added by some MUAs Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).