emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] Fixes org-rmail-store-link


From: T.F. Torrey
Subject: [O] [PATCH] Fixes org-rmail-store-link
Date: Mon, 06 Aug 2012 00:09:25 -0600

Hello all,

Attempting to save a link in an Rmail buffer fails with the error
"Wrong type argument: arrayp, nil".

Attempting to save a link in an Rmail buffer succeeds if all headers
are shown (by pressing T to toggle the display).

Attempting to save a link in an Rmail summary buffer always fails with
the same error, even if all headers are shown.

The error occurs because org-rmail-store-link attempts to get the
Message-ID header with mail-fetch-field, then remove the angle
brackets with org-remove-angle-brackets. However, without showing full
headers, Message-ID is hidden, and (mail-fetch-field "message-id)
returns nil. When this is passed to org-remove-angle-brackets, the
error is thrown.

The attached patch remedies this by toggling on the full header display
before getting the Message-ID.

Emacs  : GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2012-07-29 on doubah, modified by Debian

Package: Org-mode version 7.8.11 (release_7.8.11-360-g7c4ac5-git @ mixed
installation! /usr/local/share/emacs/site-lisp/ and
/home/tftorrey/.emacs.d/src/org-mode/lisp/)

Best to all,
Terry
-- 
T.F. Torrey

diff --git a/lisp/org-rmail.el b/lisp/org-rmail.el
index cb379d3..f8abbf4 100644
--- a/lisp/org-rmail.el
+++ b/lisp/org-rmail.el
@@ -52,6 +52,7 @@
          (rmail-show-message rmail-current-message))
        (when (fboundp 'rmail-narrow-to-non-pruned-header)
          (rmail-narrow-to-non-pruned-header))
+       (rmail-toggle-header 0)
        (let* ((folder buffer-file-name)
               (message-id (mail-fetch-field "message-id"))
               (from (mail-fetch-field "from"))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]