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 <sdl.web AT gmail.com> (GPG Key: 9283AA3F) _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode