Browse Source

Create org-gnus links from original group, not virtual

* lisp/org-gnus.el (org-gnus-store-link): When in a virtual group,
use the real group instead.
Eric Abrahamsen 10 years ago
parent
commit
7eba1c2f54
1 changed files with 4 additions and 0 deletions
  1. 4 0
      lisp/org-gnus.el

+ 4 - 0
lisp/org-gnus.el

@@ -170,6 +170,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)