emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Gnus link BUGS


From: Leo
Subject: [Orgmode] Re: Gnus link BUGS
Date: Sat, 23 Dec 2006 17:58:01 +0000
User-agent: Gnus v5.11, Emacs/23.0.0.4 (20061218), Fedora 6 gnu/linux

Hi Carsten and Bastien,

Merry Christmas!

* Bastien (2006-12-22 04:39 +0100) said:
  ^^^^^^^
> I spent some time trying to circumvent this behavior and the easiest
> (but temporary) solution i've found is this one:
>
> (setq gnus-large-newsgroup 10000)

* Carsten Dominik (2006-12-23 08:38 +0100) said:
  ^^^^^^^^^^^^^^^
> Thanks, I will use this approach in org-mode as well.
>
> (I am in no way a gnus expert - so if there is other stuff to fix in
> the gnus interface, please go ahead, maybe even send me patches).
>
> - Carsten

I made a patch and test it. It seems working fine for me. What do you
think?


--- org.el      2006/12/23 14:59:06     1.1
+++ org.el      2006/12/23 17:44:59
@@ -9041,19 +9041,20 @@
           (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
+      (and (stringp article) (setq article (string-to-number article)))
+      (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 via email to

[Prev in Thread] Current Thread [Next in Thread]