diff options
author | Kyle Meyer <kyle@kyleam.com> | 2019-08-10 23:05:50 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2019-08-10 23:07:28 -0400 |
commit | 6412f49cd0b51429e3653a0e30a747a5baf8b618 (patch) | |
tree | 4cfbd91cc0d9f016c1ddfa00a08204ee4c1fd245 /lisp | |
parent | 54415206825777a306ef7632f3eb480aba7691bd (diff) | |
download | emacs.d-6412f49cd0b51429e3653a0e30a747a5baf8b618.tar.gz |
notmuch-show-at-point: Allow surrounding brackets
I've hit into this a few times in the wild, particularly on lists that
are archived with public-inbox.
Diffstat (limited to 'lisp')
-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)))) |