From: Andrew G Cohen Date: Sat, 27 Apr 2024 01:10:44 +0000 (+0800) Subject: Find correct parent for articles in gnus X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=217ee42890d5a5033c28c616aae89d9fd8331020;p=emacs.git Find correct parent for articles in gnus * lisp/gnus/gnus-sum.el (gnus-summary-refer-parent-article): When an article's headers have been altered, use the altered headers to find the parent. (cherry picked from commit e29eb0e0f18d7b1e4724c1bb26ff9718fe08548b) --- diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index dc66e1375ab..d4895f3c5f8 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -8939,7 +8939,8 @@ The difference between N and the number of articles fetched is returned." (while (and (> n 0) (not error)) (setq header (gnus-summary-article-header)) - (if (and (eq (mail-header-number header) + (if (and (null gnus-alter-header-function) + (eq (mail-header-number header) (cdr gnus-article-current)) (equal gnus-newsgroup-name (car gnus-article-current))) @@ -8947,7 +8948,8 @@ The difference between N and the number of articles fetched is returned." ;; displayed article, then we take a look at the actual ;; References header, since this is slightly more ;; reliable than the References field we got from the - ;; server. + ;; server. But if we altered the header, we should prefer + ;; the version from the header vector. (with-current-buffer gnus-original-article-buffer (nnheader-narrow-to-headers) (unless (setq ref (message-fetch-field "references")) @@ -8955,8 +8957,8 @@ The difference between N and the number of articles fetched is returned." (setq ref (gnus-extract-message-id-from-in-reply-to ref)))) (widen)) (setq ref - ;; It's not the current article, so we take a bet on - ;; the value we got from the server. + ;; It's not the current article, or we altered the header, + ;; so we use whats in the header vector. (mail-header-references header))) (if (and ref (not (equal ref "")))