From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulf Stegemann Subject: Re: Problem with org-gnus-follow-link Date: Thu, 11 Dec 2008 22:51:38 +0100 Message-ID: References: <8763lt8euq.fsf@thinkpad.tsdh.de> <87oczjg85v.fsf@thinkpad.tsdh.de> <87zlj39dqj.fsf@thinkpad.tsdh.de> <87ej0eajb5.fsf@thinkpad.tsdh.de> <87abb2aeoh.fsf@thinkpad.tsdh.de> <87y6ymvanx.fsf@thinkpad.tsdh.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAtRr-0002Cn-FK for emacs-orgmode@gnu.org; Thu, 11 Dec 2008 16:51:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAtRp-0002BT-VP for emacs-orgmode@gnu.org; Thu, 11 Dec 2008 16:51:55 -0500 Received: from [199.232.76.173] (port=33503 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAtRp-0002BK-Ht for emacs-orgmode@gnu.org; Thu, 11 Dec 2008 16:51:53 -0500 Received: from main.gmane.org ([80.91.229.2]:57383 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LAtRo-0005mC-Mi for emacs-orgmode@gnu.org; Thu, 11 Dec 2008 16:51:53 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LAtRk-0007k8-9S for emacs-orgmode@gnu.org; Thu, 11 Dec 2008 21:51:48 +0000 Received: from london.zeitform.net ([146.140.213.100]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Dec 2008 21:51:48 +0000 Received: from ulf-news by london.zeitform.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Dec 2008 21:51:48 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Tassilo, Tassilo Horn 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=fix-for-fix-gnus-links.patch --- 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)))) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=--