From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Subject: Re: Gnus link BUGS Date: Sat, 23 Dec 2006 18:23:16 +0000 Message-ID: References: <87mz5g61kl.fsf@tallis.lumiere.ens.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GyBaK-0005lW-Rm for emacs-orgmode@gnu.org; Sat, 23 Dec 2006 13:27:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GyBaJ-0005jV-Ak for emacs-orgmode@gnu.org; Sat, 23 Dec 2006 13:27:04 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GyBaJ-0005jR-6J for emacs-orgmode@gnu.org; Sat, 23 Dec 2006 13:27:03 -0500 Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GyBaI-0003U3-Kl for emacs-orgmode@gnu.org; Sat, 23 Dec 2006 13:27:03 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GyBZc-0004qg-5D for emacs-orgmode@gnu.org; Sat, 23 Dec 2006 19:26:22 +0100 Received: from sl392.st-edmunds.cam.ac.uk ([131.111.223.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 23 Dec 2006 19:26:20 +0100 Received: from sdl.web by sl392.st-edmunds.cam.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 23 Dec 2006 19:26:20 +0100 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 Please try this one. It handles the case when article number is invalid. --- org.el 2006/12/23 14:59:06 1.1 +++ org.el 2006/12/23 18:20:40 @@ -9041,19 +9041,21 @@ (Info-find-node (match-string 1 name) "Top"))) (message (concat "Could not open: " name)))) +(defvar org-gnus-group-articles 10 + "Number of articles to retrieve for Gnus group.") + (defun org-follow-gnus-link (&optional group article) "Follow a Gnus link to GROUP and ARTICLE." (require 'gnus) (funcall (cdr (assq 'gnus org-link-frame-setup))) (if gnus-other-frame-object (select-frame gnus-other-frame-object)) - (if group (gnus-fetch-group group)) - (if article - (or (gnus-summary-goto-article article nil 'force) - (if (fboundp 'gnus-summary-insert-cached-articles) - (progn - (gnus-summary-insert-cached-articles) - (gnus-summary-goto-article article nil 'force)) - (message "Message could not be found."))))) + (when group + (gnus-fetch-group group org-gnus-group-articles) + (when article + (if (stringp article) + (setq article (string-to-number article))) + (and (gnus-summary-goto-article article nil t) + (gnus-summary-limit (list article)))))) (defun org-follow-vm-link (&optional folder article readonly) "Follow a VM link to FOLDER and ARTICLE." -- Leo (GPG Key: 9283AA3F)