emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ulf Stegemann <ulf-news@zeitform.de>
To: emacs-orgmode@gnu.org
Subject: Re: Problem with org-gnus-follow-link
Date: Thu, 11 Dec 2008 22:51:38 +0100	[thread overview]
Message-ID: <zf.upn63lqv0r9.fsf@zeitform.de> (raw)
In-Reply-To: 87y6ymvanx.fsf@thinkpad.tsdh.de

[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]

Hi Tassilo,

Tassilo Horn <tassilo@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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix-for-fix-gnus-links.patch --]
[-- Type: text/x-patch, Size: 1369 bytes --]

--- 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))))
 

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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	other threads:[~2008-12-11 21:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09 12:24 Problem with org-gnus-follow-link Ulf Stegemann
2008-12-09 16:58 ` Tassilo Horn
2008-12-10 10:08   ` Ulf Stegemann
2008-12-10 19:08     ` Tassilo Horn
2008-12-11 10:09       ` Ulf Stegemann
2008-12-11 11:02         ` Tassilo Horn
2008-12-11 13:52           ` Ulf Stegemann
2008-12-11 14:16             ` Tassilo Horn
2008-12-11 15:37               ` Ulf Stegemann
2008-12-11 15:56                 ` Tassilo Horn
2008-12-11 16:18                   ` Ulf Stegemann
2008-12-11 16:41                     ` Tassilo Horn
2008-12-11 18:17                     ` Tassilo Horn
2008-12-11 21:51                       ` Ulf Stegemann [this message]
2008-12-12  7:04                         ` Tassilo Horn
2008-12-12  8:17                           ` Ulf Stegemann
2008-12-12 10:31                             ` Tassilo Horn
2008-12-12 14:21                               ` Ulf Stegemann
2008-12-11  8:15     ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=zf.upn63lqv0r9.fsf@zeitform.de \
    --to=ulf-news@zeitform.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).