* [PATCH] Provide link property for message-id without angle brackets
@ 2010-07-31 6:32 David Maus
2010-07-31 7:52 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: David Maus @ 2010-07-31 6:32 UTC (permalink / raw)
To: emacs-orgmode
* 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-31 7:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-31 6:32 [PATCH] Provide link property for message-id without angle brackets David Maus
2010-07-31 7:52 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.