summaryrefslogtreecommitdiff
path: root/lisp/org-rmail.el
diff options
context:
space:
mode:
authorSébastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:32 +0200
committerSébastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:32 +0200
commitefc77ab6f5e8883fc38d8c6f75b6db54a0965c15 (patch)
treea34b12897145816f4ab7fbeb2fe6db437651e98e /lisp/org-rmail.el
parent52fbfeb04b10aa78f24f339a352fe1161c0b37e4 (diff)
Imported Upstream version 8.2.5h
Diffstat (limited to 'lisp/org-rmail.el')
-rw-r--r--lisp/org-rmail.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/org-rmail.el b/lisp/org-rmail.el
index e2f9fbe..6859b65 100644
--- a/lisp/org-rmail.el
+++ b/lisp/org-rmail.el
@@ -1,6 +1,6 @@
;;; org-rmail.el --- Support for links to Rmail messages from within Org-mode
-;; Copyright (C) 2004-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2014 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -95,7 +95,10 @@
(defun org-rmail-follow-link (folder article)
"Follow an Rmail link to FOLDER and ARTICLE."
(require 'rmail)
- (setq article (org-add-angle-brackets article))
+ (cond ((null article) (setq article ""))
+ ((stringp article)
+ (setq article (org-add-angle-brackets article)))
+ (t (user-error "Wrong RMAIL link format")))
(let (message-number)
(save-excursion
(save-window-excursion
@@ -105,8 +108,7 @@
(rmail-widen)
(goto-char (point-max))
(if (re-search-backward
- (concat "^Message-ID:\\s-+" (regexp-quote
- (or article "")))
+ (concat "^Message-ID:\\s-+" (regexp-quote article))
nil t)
(rmail-what-message))))))
(if message-number