[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Bug: org-mhe creates corrupt link when Message-ID field contai
From: |
Andrew J. Korty |
Subject: |
[Orgmode] Bug: org-mhe creates corrupt link when Message-ID field contains newline [7.01trans] |
Date: |
Wed, 15 Sep 2010 10:21:18 -0400 |
Some MUAs insert a newline when rendering the Message-ID field:
Message-ID:
<address@hidden>
The newline causes org-mhe-store-link to create a link that looks like
[[mhe:%2Barchive#
%20<address@hidden
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
- [Orgmode] Bug: org-mhe creates corrupt link when Message-ID field contains newline [7.01trans],
Andrew J. Korty <=