Hi Tassilo,

Tassilo Horn <tass...@member.fsf.org> wrote:

> please try this one.

this works after some modifications (patch attached). XEmacs does not
know `substring-no-properties' but org-compat has
`org-substring-no-properties'. Besides, my Gnus holds
`gnus-large-newsgroup' as a string not as integer.

Unfortunately, this is not an ideal solution but from what I've read
from the Gnus gurus the best that can be done until the problems with
nnml are resolved.

Nevertheless, your patch has the great advantage that is should work
with all links to nnml group articles (I agree, more than 1-
gnus-large-newsgroup articles in a group are rather seldom).
 
> +      (gnus-activate-group group t)
> +      (unless (gnus-group-read-group 1 nil group)
> +        ;; Try again with a bigger number of messages.
> +        (gnus-group-read-group (1- gnus-large-newsgroup) nil group))
> +      (gnus-summary-goto-article article nil t))
>       (group (gnus-group-jump-to-group group))))

Just one other comment: After failure to get a summary buffer by reading
the last article you try it with reading 1- gnus-large-newsgroup
articles. I'd assume that in most cases where the first call to
gnus-group-read-group fails only one or a few more articles have been
deleted in the group in question. In that case, it might be quicker if
`org-gnus-follow-link' increases the number of articles to be read by
one and tries `gnus-group-read-group' again until the call succeeds. If
I find the time tomorrow I will test that. What do you think?

Ulf

--- org-gnus.el.orig	2008-12-11 22:29:06.000000000 +0100
+++ org-gnus.el	2008-12-11 22:27:56.000000000 +0100
@@ -150,9 +150,9 @@
     (setq group (match-string 1 path)
 	  article (match-string 3 path))
     (when group
-      (setq group (substring-no-properties group)))
+      (setq group (org-substring-no-properties group)))
     (when article
-      (setq article (substring-no-properties article)))
+      (setq article (org-substring-no-properties article)))
     (org-gnus-follow-link group article)))
 
 (defun org-gnus-follow-link (&optional group article)
@@ -161,14 +161,14 @@
   (funcall (cdr (assq 'gnus org-link-frame-setup)))
   (if gnus-other-frame-object (select-frame gnus-other-frame-object))
   (when group
-    (setq group (substring-no-properties group)))
+    (setq group (org-substring-no-properties group)))
   (when article
-    (setq article (substring-no-properties article)))
+    (setq article (org-substring-no-properties article)))
   (cond ((and group article)
 	 (gnus-activate-group group t)
 	 (unless (gnus-group-read-group 1 nil group)
 	   ;; Try again with a bigger number of messages.
-	   (gnus-group-read-group (1- gnus-large-newsgroup) nil group))
+	   (gnus-group-read-group (1- (string-to-int gnus-large-newsgroup)) nil group))
 	 (gnus-summary-goto-article article nil t))
 	(group (gnus-group-jump-to-group group))))
 
_______________________________________________
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