From 928629a9ccd8b439d0e98d9976b75c4cf5f048f9 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 1 Sep 2020 23:13:09 -0400 Subject: km/webjump-read-string: Try to catch message IDs too ... for feeding to public-inbox URLs. --- lisp/km-webjump.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/km-webjump.el b/lisp/km-webjump.el index 09fc5d9..f3c2cb7 100644 --- a/lisp/km-webjump.el +++ b/lisp/km-webjump.el @@ -28,7 +28,15 @@ (let* ((default (if (use-region-p) (buffer-substring-no-properties (region-beginning) (region-end)) - (thing-at-point 'symbol))) + (or (save-excursion + (skip-syntax-backward "^ ") + (and (looking-at + (rx "<" + (group + (one-or-more (not (any space ">")))) + ">")) + (match-string 1))) + (thing-at-point 'symbol)))) (prompt (if default (format "%s (%s): " prompt default) (concat prompt ": "))) -- cgit v1.2.3