From 6412f49cd0b51429e3653a0e30a747a5baf8b618 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 10 Aug 2019 23:05:50 -0400 Subject: 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. --- lisp/km-mail.el | 10 ++++++---- 1 file 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)))) -- cgit v1.2.3