diff options
author | Thomas Alexander Gerds <tag@biostat.ku.dk> | 2015-12-18 07:43:38 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-12-18 22:42:32 +0100 |
commit | 73803c1cf9d0e4016cd1c36653b40573396bd9e7 (patch) | |
tree | 7723bcc5d78db1846b03eaa8901e89b60c1cf9b8 | |
parent | babcfaa4ebe6c8c6f31ef8f33c8a02e12ca63ab4 (diff) | |
download | org-mode-73803c1cf9d0e4016cd1c36653b40573396bd9e7.tar.gz |
org-gnus.el: change nnir group reference
* lisp/org-gnus.el (org-gnus-store-link): Articles in an nnir group
refer to the original group.
TINYCHANGE
-rw-r--r-- | etc/ORG-NEWS | 3 | ||||
-rw-r--r-- | lisp/org-gnus.el | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 0422ff1..4b089eb 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -122,6 +122,9 @@ Note that only ~%(...)~ placeholders initially present in the template, or introduced using a file placeholder, i.e., ~%[...]~ are expanded. This prevents evaluating potentially malicious code when another placeholder, e.g., ~%i~ expands to a S-exp. +*** Links stored by ~org-gnus-store-link~ in nnir groups +Since gnus nnir groups are temporary, ~org-gnus-store-link~ now refers +to the article's original group. *** ~org-babel-check-confirm-evaluate~ is now a function instead of a macro The calling convention has changed. diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el index c7b46af..9ad3dd8 100644 --- a/lisp/org-gnus.el +++ b/lisp/org-gnus.el @@ -172,10 +172,12 @@ 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))))) + (cl-case (car (gnus-find-method-for-group gnus-newsgroup-name)) + (nnvirtual + (setq group (car (nnvirtual-map-article + (gnus-summary-article-number))))) + (nnir + (setq group (nnir-article-group (gnus-summary-article-number))))) ;; Remove text properties of subject string to avoid Emacs bug ;; #3506 (set-text-properties 0 (length subject) nil subject) |