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 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/net') 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) -- cgit v1.2.3