From: tftorrey@tftorrey.com (T.F. Torrey)
To: emacs-orgmode@gnu.org
Subject: [PATCH] Fixes org-rmail-store-link
Date: Mon, 06 Aug 2012 00:09:25 -0600 [thread overview]
Message-ID: <87txwgsga2.fsf@lapcat.tftorrey.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch to fix org-rmail-store-link bug in org-rmail.el --]
[-- Type: text/x-diff, Size: 446 bytes --]
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"))
next reply other threads:[~2012-08-07 0:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 6:09 T.F. Torrey [this message]
2012-08-07 3:19 ` [PATCH] Fixes org-rmail-store-link Nick Dokos
2012-08-08 21:16 ` T.F. Torrey
2012-08-07 10:10 ` Bastien
2012-08-08 21:19 ` T.F. Torrey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87txwgsga2.fsf@lapcat.tftorrey.com \
--to=tftorrey@tftorrey.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).