From 308df0e0cc1b82dbcd8e555eded16570ccc00635 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 5 Oct 2024 16:18:33 +0100 Subject: gnus: following links in eww staying at mail ws --- custom/jao-custom-gnus.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index 6eb7952..ece5167 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -553,9 +553,18 @@ (search-forward-regexp "^URL: h" nil t) (and (search-forward-regexp "^Link$" nil t) (not (beginning-of-line)))) - (if external - (jao-browse-with-external-browser) - (browse-url (jao-url-around-point)))))) + (cond (external (jao-browse-with-external-browser)) + ((featurep 'jao-custom-eww) (eww (jao-url-around-point))) + (t (browse-url (jao-url-around-point))))))) + +(defun jao-gnus-from-eww (keep-eww-buffer) + (interactive "P") + (unless keep-eww-buffer (jao-eww-close)) + (jao-afio-goto-mail) + (gnus-article-show-summary)) + +(with-eval-after-load 'eww + (define-key eww-mode-map (kbd "h") #'jao-gnus-from-eww)) (defun jao-gnus-open-enclosure () (interactive) -- cgit v1.2.3