Subject: Re: bug#79167: [PATCH] nnmbox-read-mbox: fix Xref header parsing

From: Eli Zaretskii <[email-masked]>
Date: Sat, 09 Aug 2025 15:31:19 +0300

> Date: Sun, 03 Aug 2025 15:48:37 +0200
> From:  Jakub Ječmínek via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> When opening an mbox file using the nnmbox backend, the `nnmbox-read-mbox'
> function parses it and, if the article is new, adds an 'X-Gnus-Newsgroup'
> header. This header is populated from the Xref header if the article includes
> one.
> 
> However, the search for Xref is broken. Steps to reproduce:
> 
> 0. Save the attached mbox file named '2016-11'
> 1. emacs -Q
> 2. (setq gnus-select-method '(nnmbox "" (nnmbox-mbox-file "/path/to/2016-11")))
> 3. M-x gnus RET
> 4. M-: (switch-to-buffer nnmbox-mbox-buffer) RET
> 5. Search for message with ID
> <[email-masked]>
> 
> You'll see this article contains two 'X-Gnus-Newsgroup' headers:
> 
> X-Gnus-Newsgroup: Wed, 02 Nov 2016 17:25   Sun Aug  3 15:15:26 2025  
> X-Gnus-Newsgroup: gnu.emacs.help:219001   Sun Aug  3 15:15:26 2025
> 
> The first line shouldn't be there because the Xref header contains just one
> group:
> 
> Xref: usenet.stanford.edu gnu.emacs.help:219001
> 
> The attached patch fixes this issue.

Thanks.  Can someone who's uses Gnus please review the patch and
report?