summaryrefslogtreecommitdiffhomepage
path: root/lib/net/jao-url.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2025-11-13 20:09:31 +0000
committerjao <jao@gnu.org>2025-11-13 20:09:31 +0000
commita479b2dd82cb8985fceffc8a329cc4bb12765679 (patch)
treeae69886e04d76e6105c6ff2839d7a54b2ca5fcd8 /lib/net/jao-url.el
parent2f4caff918d9b5e70419d7bc7a4887e09bdfdb8a (diff)
downloadelibs-a479b2dd82cb8985fceffc8a329cc4bb12765679.tar.gz
elibs-a479b2dd82cb8985fceffc8a329cc4bb12765679.tar.bz2
mail: better open email url in notmuchmain
Diffstat (limited to 'lib/net/jao-url.el')
-rw-r--r--lib/net/jao-url.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/net/jao-url.el b/lib/net/jao-url.el
index 9e58f99..ac66cef 100644
--- a/lib/net/jao-url.el
+++ b/lib/net/jao-url.el
@@ -32,5 +32,14 @@
(and (derived-mode-p 'eww-mode) (plist-get eww-data :url))))))
+(defun jao-url-email-url ()
+ (save-excursion
+ (goto-char (point-min))
+ (when (or (search-forward-regexp "^Via: h" nil t)
+ (search-forward-regexp "^URL:[\n ]h" nil t)
+ (and (search-forward-regexp "^Link$" nil t)
+ (not (beginning-of-line))))
+ (jao-url-around-point))))
+
(provide 'jao-url)
;;; jao-url.el ends here