summaryrefslogtreecommitdiffhomepage
path: root/lib/net
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-09-01 01:44:14 +0100
committerjao <jao@gnu.org>2021-09-01 02:01:58 +0100
commit08fabe62696da924e2bfe994e8cb1a1f4325c372 (patch)
tree2397deb69ee5b27f5330d2805f464dc0c1380299 /lib/net
parent6be2c384bc0f0ab1ab47dfc26d0e73a1f94297db (diff)
downloadelibs-08fabe62696da924e2bfe994e8cb1a1f4325c372.tar.gz
elibs-08fabe62696da924e2bfe994e8cb1a1f4325c372.tar.bz2
jao-notmuch: recovering tab/ret in show mode
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/jao-notmuch.el23
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index 8ed14dc..b67c788 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -111,6 +111,28 @@
(message "No URLs in this message")))))
+;; Navigating URLs
+(defun jao-notmuch-show-next-button ()
+ (interactive)
+ (when (get-text-property (point) 'w3m-href-anchor)
+ (goto-char (next-single-property-change (point) 'w3m-href-anchor)))
+ (if-let (pos (next-single-property-change (point) 'w3m-href-anchor))
+ (goto-char pos)
+ (forward-button 1)))
+
+(defun jao-notmuch-show-previous-button ()
+ (interactive)
+ (if-let (pos (previous-single-property-change (point) 'w3m-href-anchor))
+ (goto-char (previous-single-property-change pos 'w3m-href-anchor))
+ (backward-button 1)))
+
+(defun jao-notmuch-show-ret ()
+ (interactive)
+ (when-let (url (or (get-text-property (point) 'w3m-href-anchor)
+ (thing-at-point-url-at-point)))
+ (browse-url url)))
+
+
;; Toggling mime parts and images
(defun jao-notmuch--toggle-mime ()
@@ -164,7 +186,6 @@
;; fix w3m renderer keymap
(defun jao-w3m-gnus-html-renderer (handle)
(let ((w3m-message-silent t)
- (mm-inline-text-html-with-w3m-keymap t)
(mm-w3m-safe-url-regexp nil))
(condition-case nil
(mm-inline-text-html-render-with-w3m handle)