emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Gnus link BUGS
Date: Sat, 23 Dec 2006 18:23:16 +0000	[thread overview]
Message-ID: <m2hcvmfp4b.fsf@sl392.st-edmunds.cam.ac.uk> (raw)
In-Reply-To: m2psaafqae.fsf@sl392.st-edmunds.cam.ac.uk

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)

  reply	other threads:[~2006-12-23 18:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-22  3:11 Gnus link BUGS Leo
2006-12-22  3:39 ` Bastien
2006-12-23 17:58   ` Leo
2006-12-23 18:23     ` Leo [this message]
2006-12-24  0:54       ` Bastien
2006-12-24  2:37         ` Leo
2006-12-24  8:37           ` Bastien
2006-12-24 11:48             ` Leo
2006-12-22  5:44 ` Leo
2006-12-23  7:38   ` Carsten Dominik
2006-12-24 11:48 ` Leo
2007-01-08 17:53 ` [fixed in 4.61] " Leo

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=m2hcvmfp4b.fsf@sl392.st-edmunds.cam.ac.uk \
    --to=sdl.web@gmail.com \
    --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).