GNU bug report logs - #79167
[PATCH] nnmbox-read-mbox: fix Xref header parsing

Previous Next

Package: emacs;

Reported by: Jakub Ječmínek <kuba <at> kubajecminek.cz>

Date: Sun, 3 Aug 2025 13:50:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jakub Ječmínek <kuba <at> kubajecminek.cz>
Cc: 79167 <at> debbugs.gnu.org
Subject: bug#79167: [PATCH] nnmbox-read-mbox: fix Xref header parsing
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" <bug-gnu-emacs <at> gnu.org>
> 
> 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
> <36adb56e-5a51-4b07-9db2-188d4ce06abe <at> googlegroups.com>
> 
> 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?




This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.