From 735098376760bc31d442f8a195b425c907c437e4 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 14 Oct 2021 22:46:14 +0100 Subject: better url navigation in notmuch-show --- lib/net/jao-notmuch.el | 8 ++++++-- notmuch.org | 3 ++- 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 -- cgit v1.2.3