|
@@ -42,6 +42,7 @@
|
|
|
|
|
|
(declare-function gnus-activate-group "gnus-start" (group &optional scan dont-check method dont-sub-check))
|
|
|
(declare-function gnus-find-method-for-group "gnus" (group &optional info))
|
|
|
+(declare-function gnus-article-show-summary "gnus-art" ())
|
|
|
(declare-function gnus-group-group-name "gnus-group")
|
|
|
(declare-function gnus-group-jump-to-group "gnus-group" (group &optional prompt))
|
|
|
(declare-function gnus-group-read-group "gnus-group" (&optional all no-article group select-articles))
|
|
@@ -142,7 +143,14 @@ If `org-store-link' was called with a prefix arg the meaning of
|
|
|
(save-excursion
|
|
|
(nnir-article-group (gnus-summary-article-number))))
|
|
|
(_ gnus-newsgroup-name)))
|
|
|
- (header (with-current-buffer gnus-summary-buffer
|
|
|
+ (header (if (eq major-mode 'gnus-article-mode)
|
|
|
+ ;; When in an article, first move to summary
|
|
|
+ ;; buffer, with point on the summary of the
|
|
|
+ ;; current article before extracting headers.
|
|
|
+ (save-window-excursion
|
|
|
+ (save-excursion
|
|
|
+ (gnus-article-show-summary)
|
|
|
+ (gnus-summary-article-header)))
|
|
|
(gnus-summary-article-header)))
|
|
|
(from (mail-header-from header))
|
|
|
(message-id (org-unbracket-string "<" ">" (mail-header-id header)))
|