summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Maus <dmaus@ictsoc.de>2010-07-31 11:32:51 +0000
committerBastien Guerry <bzg@altern.org>2010-07-31 09:47:33 +0200
commitd3c82cc7574908cf399c65c185617500a7304c02 (patch)
tree529b051d1aaba55be10de44e518b916d876467b7
parent9c1c4b3f8d23edd4bc3c73580990c7c59b7913d9 (diff)
downloadorg-mode-d3c82cc7574908cf399c65c185617500a7304c02.tar.gz
Provide link property for message-id without angle brackets
* 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.
-rw-r--r--lisp/org-wl.el10
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)))))))