diff options
-rw-r--r-- | lisp/km-mail.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/km-mail.el b/lisp/km-mail.el index 17ff3af..356c6bc 100644 --- a/lisp/km-mail.el +++ b/lisp/km-mail.el @@ -98,10 +98,12 @@ (let ((id (save-excursion (skip-syntax-backward "^\\s-") (and (looking-at - (rx (group (zero-or-one (or "id:" "thread:"))) - (one-or-more (any "-" "_" "." "@" "/" alnum)))) - (concat (and (string= (match-string 1) "") "id:") - (match-string-no-properties 0)))))) + (rx (group (zero-or-one "<")) + (group (zero-or-one (or "id:" "thread:"))) + (group (one-or-more (any "-" "_" "." "@" "/" alnum))))) + (concat (let ((prefix (match-string 2))) + (if (string= prefix "") "id:" prefix)) + (match-string-no-properties 3)))))) (if id (notmuch-show id) (call-interactively #'notmuch-show)))) |