emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Problem with org-gnus-follow-link


From: Tassilo Horn
Subject: [Orgmode] Re: Problem with org-gnus-follow-link
Date: Tue, 09 Dec 2008 17:58:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Ulf Stegemann <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]