summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Maus <dmaus@ictsoc.de>2010-09-20 21:11:13 +0200
committerDavid Maus <dmaus@ictsoc.de>2010-09-20 21:27:16 +0200
commit9e6b09874734157d58f7762c06d8174e48dbdaf4 (patch)
tree63d66d360f2cde213d129da68035e66b9f800867
parent44977a9efebe1ca5299791ea8c098ec62e64f3b1 (diff)
downloadorg-mode-9e6b09874734157d58f7762c06d8174e48dbdaf4.tar.gz
Open message by numeric reference if article part is not a message id
* org-wl.el (org-wl-open): Open message by numeric reference if article part is not a message id.
-rw-r--r--lisp/org-wl.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/org-wl.el b/lisp/org-wl.el
index e1222ed..a801e19 100644
--- a/lisp/org-wl.el
+++ b/lisp/org-wl.el
@@ -84,6 +84,8 @@ googlegroups otherwise."
(declare-function wl-summary-buffer-msgdb "ext:wl-folder" () t)
(declare-function wl-summary-jump-to-msg-by-message-id "ext:wl-summary"
(&optional id))
+(declare-function wl-summary-jump-to-msg "ext:wl-summary"
+ (&optional number beg end))
(declare-function wl-summary-line-from "ext:wl-summary" ())
(declare-function wl-summary-line-subject "ext:wl-summary" ())
(declare-function wl-summary-message-number "ext:wl-summary" ())
@@ -100,6 +102,7 @@ googlegroups otherwise."
(defvar wl-summary-buffer-folder-name)
(defvar wl-folder-group-regexp)
(defvar wl-auto-check-folder-name)
+(defvar elmo-nntp-default-server)
(defconst org-wl-folder-types
'(("%" . imap) ("-" . nntp) ("+" . mh) ("=" . spool)
@@ -272,8 +275,12 @@ for namazu index."
;; beginning of the current line. So, restore the point
;; in the old buffer.
(goto-char old-point))
- (and article (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets
- article))
+ (when article
+ (if (org-string-match-p "@" article)
+ (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets
+ article))
+ (or (wl-summary-jump-to-msg (string-to-number article))
+ (error "No such message: %s" article)))
(wl-summary-redisplay))))))
(provide 'org-wl)