From a479b2dd82cb8985fceffc8a329cc4bb12765679 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 13 Nov 2025 20:09:31 +0000 Subject: mail: better open email url in notmuch --- lib/net/jao-url.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/net/jao-url.el') 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 -- cgit v1.2.3