diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-09-01 23:13:09 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-09-01 23:14:29 -0400 |
commit | 928629a9ccd8b439d0e98d9976b75c4cf5f048f9 (patch) | |
tree | c3a9dba33983729fac8153c116f0d835c15a7323 | |
parent | 8cf3423aa0bac8c8dbd46bc9905d00caa9c8450e (diff) | |
download | emacs.d-928629a9ccd8b439d0e98d9976b75c4cf5f048f9.tar.gz |
km/webjump-read-string: Try to catch message IDs too
... for feeding to public-inbox URLs.
-rw-r--r-- | lisp/km-webjump.el | 10 |
1 files changed, 9 insertions, 1 deletions
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 ": "))) |