Ulf Stegemann <[EMAIL PROTECTED]> writes:

Hi Ulf,

> After a bit of investigation I found out that the problem is
> `gnus-group-read-group' which is called by `org-gnus-follow-link'.
> `gnus-group-read-group' does not return an article but nil if the last
> message of the group has been deleted (this is re-producable here).

Not really.  But it won't open the Summary buffer if the last article
was deleted.

Please try this patch and report back if it works.

diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index 1058b0d..5adfd7e 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -144,6 +144,7 @@ If `org-store-link' was called with a prefix arg the meaning of
 
 (defun org-gnus-open (path)
   "Follow the Gnus message or folder link specified by PATH."
+  (setq path (substring-no-properties path))
   (let (group article)
     (if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path))
 	(error "Error in Gnus link"))
@@ -157,13 +158,9 @@ If `org-store-link' was called with a prefix arg the meaning of
   (funcall (cdr (assq 'gnus org-link-frame-setup)))
   (if gnus-other-frame-object (select-frame gnus-other-frame-object))
   (cond ((and group article)
-	 (gnus-group-read-group 1 nil group)
-	 (gnus-summary-goto-article
-	  (if (string-match "[^0-9]" article)
-	      article
-	    (string-to-number article))
-	  nil t))
-	(group (gnus-group-jump-to-group group))))
+         (gnus-group-read-group t nil group)
+         (gnus-summary-goto-article article nil t))
+        (group (gnus-group-jump-to-group group))))
 
 (defun org-gnus-no-new-news ()
   "Like `M-x gnus' but doesn't check for new news."
Bye,
Tassilo
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to