summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-10-14 22:46:14 +0100
committerjao <jao@gnu.org>2021-10-14 22:46:14 +0100
commit735098376760bc31d442f8a195b425c907c437e4 (patch)
treec724ce99d19d0a851e1dd368fa6ba8c0347a9cac
parent75f35eb3376eef6e56d49852ddfb7bf1e4270137 (diff)
downloadelibs-735098376760bc31d442f8a195b425c907c437e4.tar.gz
elibs-735098376760bc31d442f8a195b425c907c437e4.tar.bz2
better url navigation in notmuch-show
-rw-r--r--lib/net/jao-notmuch.el8
-rw-r--r--notmuch.org3
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index d93ebdb..094b93b 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -123,19 +123,23 @@
;;;; Navigating URLs
+(require 'ffap)
+
(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)))
+ (or (forward-button 1 nil t t)
+ (ffap-next-guess))))
(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)))
+ (or (backward-button 1 nil t t)
+ (ffap-next-guess t))))
(defun jao-notmuch-show-ret ()
(interactive)
diff --git a/notmuch.org b/notmuch.org
index 3dc46b7..2e5b632 100644
--- a/notmuch.org
+++ b/notmuch.org
@@ -78,6 +78,7 @@
'("tag:prog"
"not tag:\"/(lobsters|xmobar|notmuch|haskell)/\""))
,@(jao-notmuch--mboxes-search "feeds" "emacs" "prog")
+ ,(jao-notmuch--q "jao" "draft" "d" '("tag:draft"))
,(jao-notmuch--q "bml" "today" "tb" '("tag:bigml" "date:24h..") t)
,(jao-notmuch--q "jao" "today" "tj"
'("tag:jao" "date:24h.."
@@ -285,7 +286,7 @@
(:map notmuch-show-mode-map
(("h" . jao-notmuch-goto-tree-buffer)
("TAB" . jao-notmuch-show-next-button)
- ("S-TAB" . jao-notmuch-show-previous-button)
+ ([backtab] . jao-notmuch-show-previous-button)
("RET" . jao-notmuch-show-ret))))
#+end_src