Function: gnus-summary-refer-parent-article
gnus-summary-refer-parent-article is an interactive and byte-compiled
function defined in gnus-sum.el.gz.
Signature
(gnus-summary-refer-parent-article N)
Documentation
Refer parent article N times.
If N is negative, go to ancestor -N instead. The difference between N and the number of articles fetched is returned.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
;; Summary article oriented commands
(defun gnus-summary-refer-parent-article (n)
"Refer parent article N times.
If N is negative, go to ancestor -N instead.
The difference between N and the number of articles fetched is returned."
(interactive "p" gnus-summary-mode)
(let ((skip 1)
error header ref)
(when (not (natnump n))
(setq skip (abs n)
n 1))
(while (and (> n 0)
(not error))
(setq header (gnus-summary-article-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)))
;; If we try to find the parent of the currently
;; 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. 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"))
(when (setq ref (message-fetch-field "in-reply-to"))
(setq ref (gnus-extract-message-id-from-in-reply-to ref))))
(widen))
(setq ref
;; It's not the current article, or we altered the header,
;; so we use what's in the header vector.
(mail-header-references header)))
(if (and ref
(not (equal ref "")))
(unless (gnus-summary-refer-article (gnus-parent-id ref skip))
(gnus-message 1 "Couldn't find parent"))
(gnus-message 1 "No references in article %d"
(gnus-summary-article-number))
(setq error t))
(cl-decf n))
(gnus-summary-position-point)
n))