summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-10-05 16:18:33 +0100
committerjao <jao@gnu.org>2024-10-05 16:19:31 +0100
commit308df0e0cc1b82dbcd8e555eded16570ccc00635 (patch)
tree0734c6773aa52d4ba9d440436cd9cd6c7193c40f
parent36893a1e2b3156338485668f90d5a6ff645d1ea4 (diff)
downloadelibs-308df0e0cc1b82dbcd8e555eded16570ccc00635.tar.gz
elibs-308df0e0cc1b82dbcd8e555eded16570ccc00635.tar.bz2
gnus: following links in eww staying at mail ws
-rw-r--r--custom/jao-custom-gnus.el15
1 files 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)