* Bug: org-mhe creates corrupt link when Message-ID field contains newline [7.01trans]
@ 2010-09-15 14:21 Andrew J. Korty
2010-09-15 17:02 ` David Maus
0 siblings, 1 reply; 2+ messages in thread
From: Andrew J. Korty @ 2010-09-15 14:21 UTC (permalink / raw)
To: emacs-orgmode
Some MUAs insert a newline when rendering the Message-ID field:
Message-ID:
<98A78083733DE040834C2B9E91B87FDE0AADEB@example.com>
The newline causes org-mhe-store-link to create a link that looks like
[[mhe:%2Barchive#
%20<98A78083733DE040834C2B9E91B87FDE0AADEB@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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Bug: org-mhe creates corrupt link when Message-ID field contains newline [7.01trans]
2010-09-15 14:21 Bug: org-mhe creates corrupt link when Message-ID field contains newline [7.01trans] Andrew J. Korty
@ 2010-09-15 17:02 ` David Maus
0 siblings, 0 replies; 2+ messages in thread
From: David Maus @ 2010-09-15 17:02 UTC (permalink / raw)
To: Andrew J. Korty; +Cc: emacs-orgmode
Andrew J. Korty wrote:
>Some MUAs insert a newline when rendering the Message-ID field:
> Message-ID:
> <98A78083733DE040834C2B9E91B87FDE0AADEB@example.com>
>The newline causes org-mhe-store-link to create a link that looks like
> [[mhe:%2Barchive#
> %20<98A78083733DE040834C2B9E91B87FDE0AADEB@example.com][subject]]
>org later treats the above as separate lines; any tags or properties
>added end up in the middle of the link.
Thanks for reporting this bug. I've fixed it in master, but not using
`replace-regexp-in-string' but Org's internal function to strip
leading and trailing white space.
Best,
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-15 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-15 14:21 Bug: org-mhe creates corrupt link when Message-ID field contains newline [7.01trans] Andrew J. Korty
2010-09-15 17:02 ` David Maus
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.