summaryrefslogtreecommitdiff
path: root/lisp/org-gnus.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org-gnus.el')
-rw-r--r--lisp/org-gnus.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index 785b577..c0087a1 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -36,11 +36,13 @@
(eval-when-compile (require 'gnus-sum))
;; Declare external functions and variables
+
(declare-function message-fetch-field "message" (header &optional not-all))
(declare-function message-narrow-to-head-1 "message" nil)
(declare-function nnimap-group-overview-filename "nnimap" (group server))
-;; The following line suppresses a compiler warning stemming from gnus-sum.el
(declare-function gnus-summary-last-subject "gnus-sum" nil)
+(declare-function nnvirtual-map-article "nnvirtual" (article))
+
;; Customization variables
(org-defvaralias 'org-usenet-links-prefer-google 'org-gnus-prefer-web-links)
@@ -60,7 +62,7 @@ Normally, this translation is done by querying the IMAP server,
which is usually very fast. Unfortunately, some (maybe badly
configured) IMAP servers don't support this operation quickly.
So if following a link to a Gnus article takes ages, try setting
-this variable to `t'."
+this variable to t."
:group 'org-link-store
:version "24.1"
:type 'boolean)
@@ -170,6 +172,10 @@ If `org-store-link' was called with a prefix arg the meaning of
(subject (copy-sequence (mail-header-subject header)))
(to (cdr (assq 'To (mail-header-extra header))))
newsgroups x-no-archive desc link)
+ (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name))
+ 'nnvirtual)
+ (setq group (car (nnvirtual-map-article
+ (gnus-summary-article-number)))))
;; Remove text properties of subject string to avoid Emacs bug
;; #3506
(set-text-properties 0 (length subject) nil subject)
@@ -249,10 +255,8 @@ If `org-store-link' was called with a prefix arg the meaning of
(require 'gnus)
(funcall (cdr (assq 'gnus org-link-frame-setup)))
(if gnus-other-frame-object (select-frame gnus-other-frame-object))
- (when group
- (setq group (org-no-properties group)))
- (when article
- (setq article (org-no-properties article)))
+ (setq group (org-no-properties group))
+ (setq article (org-no-properties article))
(cond ((and group article)
(gnus-activate-group group)
(condition-case nil