From 0b8f339d25300909b77b15945b309f5931253120 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 27 Jan 2022 19:04:16 +0000 Subject: clean-ups for avy/link-hint --- attic/misc.org | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'attic/misc.org') diff --git a/attic/misc.org b/attic/misc.org index b9fdbfb..11f6162 100644 --- a/attic/misc.org +++ b/attic/misc.org @@ -1014,3 +1014,22 @@ ;; pdf-view-next-line-or-next-page)) ;; (advice-add f :after #'jao--refresh)) #+end_src +* link-hint for w3m + #+begin_src emacs-lisp + (defun jao-link-hint--notmuch-next-url (&optional bound) + (link-hint--next-property 'w3m-href-anchor bound)) + + (defun jao-link-hint--notmuch-url-at-point () + (get-text-property (point) 'w3m-href-anchor)) + + (link-hint-define-type 'notmuch-w3m-url + :next #'jao-link-hint--notmuch-next-url + :at-point-p #'jao-link-hint--notmuch-url-at-point + :vars '(notmuch-show-mode) + :open #'browse-url + :open-multiple t + :copy #'kill-new) + + (push 'link-hint-notmuch-w3m-url link-hint-types) + + #+end_src -- cgit v1.2.3