Some MUAs insert a newline when rendering the Message-ID field:

   Message-ID:
    <98a78083733de040834c2b9e91b87fde0aa...@example.com>

The newline causes org-mhe-store-link to create a link that looks like

   [[mhe:%2Barchive#
   %20<98a78083733de040834c2b9e91b87fde0aa...@example.com][subject]]

org later treats the above as separate lines; any tags or properties added end up in the middle of the link.

The following patch removes whitespace at the beginning of all header fields returned by org-mhe-get-header, correcting this problem and possibly others.

Andrew Korty

---
lisp/org-mhe.el |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-mhe.el b/lisp/org-mhe.el
index 46340be..6810359 100644
--- a/lisp/org-mhe.el
+++ b/lisp/org-mhe.el
@@ -181,7 +181,7 @@ you have a better idea of how to do this then please let us 
know."
    (if (equal major-mode 'mh-folder-mode)
        (mh-show)
      (mh-show-show))
-    header-field)))
+    (replace-regexp-in-string "^\\s-+" "" header-field))))

(defun org-mhe-follow-link (folder article)
  "Follow an MH-E link to FOLDER and ARTICLE.
--
1.7.2.3

Emacs  : GNU Emacs 23.1.50.1 (x86_64-apple-darwin10.0.0, NS 
apple-appkit-1038.11)
of 2009-11-10 on phrygian
Package: Org-mode version 7.01trans

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to