summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-04-04 07:52:57 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-04-04 07:52:57 +0200
commit33dbb46fc238cedf0b32ada1649c8439f3d1f0de (patch)
tree49776811d452ed212e3053f0ce2f16dae97ab696
parentf4950af5437c17a6048106d20e9b61bc437ba2f7 (diff)
downloadorg-mode-33dbb46fc238cedf0b32ada1649c8439f3d1f0de.tar.gz
Gnus: Handle nndoc for following links
Patch by Thomas Morgan.
-rwxr-xr-xlisp/ChangeLog4
-rw-r--r--lisp/org-gnus.el35
2 files changed, 26 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7b23682..3174152 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-04 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * org-gnus.el (org-gnus-follow-link): Handle nndoc backend.
+
2010-04-03 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-export-latex-packages-alist)
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index dd357b7..710911f 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -169,19 +169,28 @@ If `org-store-link' was called with a prefix arg the meaning of
(cond ((and group article)
(gnus-activate-group group t)
(condition-case nil
- (let ((articles 1)
- group-opened)
- (while (and (not group-opened)
- ;; stop on integer overflows
- (> articles 0))
- (setq group-opened (gnus-group-read-group articles nil group)
- articles (if (< articles 16)
- (1+ articles)
- (* articles 2))))
- (if group-opened
- (gnus-summary-goto-article article nil t)
- (message "Couldn't follow gnus link. %s"
- "The summary couldn't be opened.")))
+ (let ((backend (car (gnus-find-method-for-group group))))
+ (cond
+ ((eq backend 'nndoc)
+ (if (gnus-group-read-group t nil group)
+ (gnus-summary-goto-article article nil t)
+ (message "Couldn't follow gnus link. %s"
+ "The summary couldn't be opened.")))
+ (t
+ (let ((articles 1)
+ group-opened)
+ (while (and (not group-opened)
+ ;; stop on integer overflows
+ (> articles 0))
+ (setq group-opened (gnus-group-read-group
+ articles nil group)
+ articles (if (< articles 16)
+ (1+ articles)
+ (* articles 2))))
+ (if group-opened
+ (gnus-summary-goto-article article nil t)
+ (message "Couldn't follow gnus link. %s"
+ "The summary couldn't be opened."))))))
(quit (message "Couldn't follow gnus link. %s"
"The linked group is empty."))))
(group (gnus-group-jump-to-group group))))