Browse Source

Fix problem with GNUS mail header.

Patch by Andreas Rottmann and Tassilo Horn
Carsten Dominik 15 years ago
parent
commit
ac425d8bd2
2 changed files with 12 additions and 0 deletions
  1. 7 0
      ChangeLog
  2. 5 0
      lisp/org-gnus.el

+ 7 - 0
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.

+ 5 - 0
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