summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2009-07-07 13:26:32 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2009-07-07 13:26:32 +0200
commitac425d8bd270a86b9958f290619e3f90f137e667 (patch)
treeb8c79e1950239a4d316ca258bfdcf947d3591bee
parent636c524df3b521334c93624d6b4bdde6c5af8146 (diff)
downloadorg-mode-ac425d8bd270a86b9958f290619e3f90f137e667.tar.gz
Fix problem with GNUS mail header.
Patch by Andreas Rottmann and Tassilo Horn
-rw-r--r--ChangeLog7
-rw-r--r--lisp/org-gnus.el5
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a62733a..00d4f65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-07 Tassilo Horn <tassilo@member.fsf.org>
+
+ * org-gnus.el (org-gnus-store-link): Skip mbox specific first line
+ that cannot be parsed as header line. Bug reported by Andreas
+ Rottmann <a.rottmann@gmx.at> in <87zlblscr0.fsf@delenn.lan> on the
+ org mode list.
+
2009-06-17 Carsten Dominik <carsten.dominik@gmail.com>
* Makefile (LISPF): Add org-exp-blocks.el.
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index 41b1be7..fe03955 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -128,6 +128,11 @@ If `org-store-link' was called with a prefix arg the meaning of
(header (with-current-buffer gnus-article-buffer
(gnus-summary-toggle-header 1)
(goto-char (point-min))
+ ;; mbox files may contain a first line starting with
+ ;; "From" followed by a space, which cannot be parsed as
+ ;; header line, so we skip it.
+ (when (looking-at "From ")
+ (next-line))
(mail-header-extract-no-properties)))
(from (mail-header 'from header))
(message-id (org-remove-angle-brackets