From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Wiegley Subject: Fix to org-nnml.el Date: Sun, 30 Sep 2007 21:25:03 -0400 Message-ID: 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 1IcA26-00037h-3Q for emacs-orgmode@gnu.org; Sun, 30 Sep 2007 21:25:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IcA24-00036n-1j for emacs-orgmode@gnu.org; Sun, 30 Sep 2007 21:25:13 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IcA23-00036i-U8 for emacs-orgmode@gnu.org; Sun, 30 Sep 2007 21:25:11 -0400 Received: from johnwiegley.com ([208.70.150.153] helo=mail.johnwiegley.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IcA23-0003HI-Rs for emacs-orgmode@gnu.org; Sun, 30 Sep 2007 21:25:11 -0400 Received: from Hermes.localhost (unknown [69.73.230.218]) by mail.johnwiegley.com (Postfix) with ESMTP id 229C04224DC for ; Sun, 30 Sep 2007 20:25:17 -0500 (CDT) 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 I found that org-nnml doesn't quite work when you go to visit the links! This is fixed in version 1.1, pasted below. To make this work, make sure to search through your org-mode file for occurences of "nnml://" to "nnml:". John ;;; org-nnml.el - Support for links to nnml messages by Message-ID ;; version 1.1, by John Wiegley (require 'org) (eval-when-compile (require 'nnml) (require 'gnus-sum)) (org-add-link-type "nnml" 'org-nnml-open) (add-hook 'org-store-link-functions 'org-nnml-store-link) (defun org-nnml-open (message-id) "Visit the nnml message with the given Message-ID." (let ((info (nnml-find-group-number message-id))) (gnus-summary-read-group (concat "nnml:" (car info)) 100 t) (gnus-summary-goto-article (cdr info) nil t))) (defun org-nnml-store-link () "Store a link to an nnml e-mail message by Message-ID." (when (memq major-mode '(gnus-summary-mode gnus-article-mode)) (and (eq major-mode 'gnus-article-mode) (gnus-article-show-summary)) (let* ((article (gnus-summary-article-number)) (header (gnus-summary-article-header article)) (message-id (mail-header-id header))) (if (eq (aref message-id 0) ?\<) (setq message-id (substring message-id 1 (1- (length message-id))))) (org-store-link-props :type "nnml" :link (cons (concat "nnml:" message-id) (concat "nnml:" message-id)) :description (mail-header-subject header))))) (provide 'org-nnml) ;;; org-nnml.el ends here