summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-gnus.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 /custom/jao-custom-gnus.el
parent2f4caff918d9b5e70419d7bc7a4887e09bdfdb8a (diff)
downloadelibs-a479b2dd82cb8985fceffc8a329cc4bb12765679.tar.gz
elibs-a479b2dd82cb8985fceffc8a329cc4bb12765679.tar.bz2
mail: better open email url in notmuchmain
Diffstat (limited to 'custom/jao-custom-gnus.el')
-rw-r--r--custom/jao-custom-gnus.el10
1 files changed, 3 insertions, 7 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el
index 409860c..dad3de1 100644
--- a/custom/jao-custom-gnus.el
+++ b/custom/jao-custom-gnus.el
@@ -592,14 +592,10 @@
(when (eq major-mode 'gnus-summary-mode)
(gnus-summary-select-article-buffer))
(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))))
+ (when-let* ((url (jao-url-email-url)))
(cond (external (jao-browse-with-external-browser))
- ((featurep 'jao-custom-eww) (eww (jao-url-around-point)))
- (t (browse-url (jao-url-around-point)))))))
+ ((featurep 'jao-custom-eww) (eww url))
+ (t (browse-url url))))))
(defun jao-gnus-from-eww (keep-eww-buffer)
(interactive "P")