From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Integration of Org mode and Gnus Date: Wed, 18 Jul 2007 14:01:06 +0200 Message-ID: <87fy3lapkt.fsf@bzg.ath.cx> References: <87r6n6ni2j.fsf@bzg.ath.cx> 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 1IB8DU-0001GW-U7 for emacs-orgmode@gnu.org; Wed, 18 Jul 2007 08:01:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IB8DT-0001FR-9Z for emacs-orgmode@gnu.org; Wed, 18 Jul 2007 08:01:16 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IB8DT-0001FB-29 for emacs-orgmode@gnu.org; Wed, 18 Jul 2007 08:01:15 -0400 Received: from ik-out-1112.google.com ([66.249.90.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IB8DR-0005Vp-89 for emacs-orgmode@gnu.org; Wed, 18 Jul 2007 08:01:13 -0400 Received: by ik-out-1112.google.com with SMTP id c29so184536ika for ; Wed, 18 Jul 2007 05:01:11 -0700 (PDT) In-Reply-To: (Jason F. McBrayer's message of "Wed\, 18 Jul 2007 07\:04\:47 -0400") 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 --=-=-= jmcbray@carcosa.net (Jason F. McBrayer) writes: > Bastien writes: > >> Anyway, i think gnus-registry comes in handy here. > > It looks like that may indeed be the way forward, if it will let you > follow a link by message-id rather than group. I'm not clear on the > specifics of how you'd set it up, though. Not fully tested yet, but this patch is a first attempt to implement this. It uses message-id instead of message number to store Gnus links. If gnus-registry is on, it fetches location of the article depending on gnus-registry-alist. It's compatible with old Gnus links. The problem is gnus-registry-alist can be huge, and access to article might be somewhat slow. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-gnus-links.patch --- org.el.orig 2007-07-13 15:10:47.000000000 +0200 +++ org.el 2007-07-18 13:48:38.000000000 +0200 @@ -10509,7 +10509,7 @@ (format "http://groups.google.com/groups?as_umsgid=%s" (org-fixup-message-id-for-http message-id)))) (setq link (org-make-link "gnus:" group - "#" (number-to-string article)))))) + "#" (org-remove-angle-brackets message-id)))))) ((eq major-mode 'w3-mode) (setq cpltxt (url-view-url t) @@ -11444,8 +11444,14 @@ (funcall (cdr (assq 'gnus org-link-frame-setup))) (if gnus-other-frame-object (select-frame gnus-other-frame-object)) (cond ((and group article) + (if (string-match "@" article) + (when (boundp 'gnus-registry-alist) + (gnus-registry-initialize) + (setq group (caddr (assoc (concat "<" article ">") + gnus-registry-alist)))) + (setq article (string-to-number article))) (gnus-group-read-group 1 nil group) - (gnus-summary-goto-article (string-to-number article) nil t)) + (gnus-summary-goto-article article nil t)) (group (gnus-group-jump-to-group group)))) (defun org-follow-vm-link (&optional folder article readonly) --=-=-= Let me know if this is convenient. -- Bastien --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--