summaryrefslogtreecommitdiff
path: root/lisp/org/org-rmail.el
diff options
context:
space:
mode:
authorBastien Guerry <bzg@gnu.org>2014-01-07 14:22:53 +0100
committerBastien Guerry <bzg@gnu.org>2014-01-07 14:22:53 +0100
commit3c8b09ca2e01b0ef0c1b6651fab54194f0019fdc (patch)
treeca02feb436782a74af050f15c02843da84a95f4a /lisp/org/org-rmail.el
parent2b6b4f204c819569734c092532d56da85eef503b (diff)
downloademacs-3c8b09ca2e01b0ef0c1b6651fab54194f0019fdc.tar.gz
emacs-3c8b09ca2e01b0ef0c1b6651fab54194f0019fdc.tar.bz2
emacs-3c8b09ca2e01b0ef0c1b6651fab54194f0019fdc.zip
Merge Org version 8.2.5c.
Diffstat (limited to 'lisp/org/org-rmail.el')
-rw-r--r--lisp/org/org-rmail.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/org/org-rmail.el b/lisp/org/org-rmail.el
index ccfa59f5cf5..6859b659dde 100644
--- a/lisp/org/org-rmail.el
+++ b/lisp/org/org-rmail.el
@@ -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