From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: [PATCH] Provide link property for message-id without angle brackets Date: Sat, 31 Jul 2010 08:32:51 +0200 Message-ID: <1280557971-3140-1-git-send-email-dmaus@ictsoc.de> Return-path: Received: from [140.186.70.92] (port=49080 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Of5d3-0002nz-H2 for emacs-orgmode@gnu.org; Sat, 31 Jul 2010 02:33:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Of5d1-0003jp-Lr for emacs-orgmode@gnu.org; Sat, 31 Jul 2010 02:33:05 -0400 Received: from mysql1.xlhost.de ([213.202.242.106]:33049) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Of5d1-0003ja-Ea for emacs-orgmode@gnu.org; Sat, 31 Jul 2010 02:33:03 -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 * org-wl.el (org-wl-store-link-message): Provide link property for message-id without angle brackets. The message-id header field can be used to maintain the connection between an Org entry and an internet message. The angle brackets have a special meaning when performing a TAGS/PROPS/TODO query (Cf. Org mode manual 10.3.3). To be able to use the message-id as an entry property we have to remove the angle brackets to be able to perform a search for the entry associated with a particular message. --- lisp/org-wl.el | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/org-wl.el b/lisp/org-wl.el index 3a88aa8..f88d830 100644 --- a/lisp/org-wl.el +++ b/lisp/org-wl.el @@ -189,6 +189,8 @@ ENTITY is a message entity." msgnum (wl-summary-buffer-msgdb)))) (message-id (org-wl-message-field 'message-id wl-message-entity)) + (message-id-no-brackets + (org-remove-angle-brackets message-id)) (from (org-wl-message-field 'from wl-message-entity)) (to (org-wl-message-field 'to wl-message-entity)) (xref (org-wl-message-field 'xref wl-message-entity)) @@ -212,6 +214,7 @@ ENTITY is a message entity." org-wl-shimbun-prefer-web-links xref) (org-store-link-props :type "http" :link xref :description subject :from from :to to :message-id message-id + :message-id-no-brackets message-id-no-brackets :subject subject)) ((and (eq folder-type 'nntp) org-wl-nntp-prefer-web-links) (setq link @@ -222,13 +225,14 @@ ENTITY is a message entity." (org-fixup-message-id-for-http message-id))) (org-store-link-props :type "http" :link link :description subject :from from :to to :message-id message-id + :message-id-no-brackets message-id-no-brackets :subject subject)) (t (org-store-link-props :type "wl" :from from :to to - :subject subject :message-id message-id) - (setq message-id (org-remove-angle-brackets message-id)) + :subject subject :message-id message-id + :message-id-no-brackets message-id-no-brackets) (setq desc (org-email-link-description)) - (setq link (org-make-link "wl:" folder-name "#" message-id)) + (setq link (org-make-link "wl:" folder-name "#" message-id-no-brackets)) (org-add-link-props :link link :description desc))) (or link xref))))))) -- 1.7.1