diff options
author | jao <jao@gnu.org> | 2022-01-27 19:04:16 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-01-27 19:05:15 +0000 |
commit | 0b8f339d25300909b77b15945b309f5931253120 (patch) | |
tree | 5d947f4f1beb873824e8896db9edb292ea5d97f4 /notmuch.org | |
parent | 317f90a036c996bce5bed5cb15f606e8fd8f8a09 (diff) | |
download | elibs-0b8f339d25300909b77b15945b309f5931253120.tar.gz elibs-0b8f339d25300909b77b15945b309f5931253120.tar.bz2 |
clean-ups for avy/link-hint
Diffstat (limited to 'notmuch.org')
-rw-r--r-- | notmuch.org | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/notmuch.org b/notmuch.org index a0fb99f..d433ecb 100644 --- a/notmuch.org +++ b/notmuch.org @@ -591,3 +591,25 @@ (with-eval-after-load "notmuch-hello" (define-key notmuch-hello-mode-map "f" #'jao-consult-notmuch-folder)) #+end_src +* link hint + #+begin_src emacs-lisp + (with-eval-after-load "link-hint" + (defun jao-link-hint--notmuch-next-part (&optional bound) + (when-let (p (next-single-property-change (point) :notmuch-part nil bound)) + (and (< p (or bound (point-max))) p))) + + (defun jao-link-hint--notmuch-part-p () + (and (get-text-property (point) :notmuch-part) + (when-let (b (button-at (point))) (button-label b)))) + + (link-hint-define-type 'notmuch-part + :next #'jao-link-hint--notmuch-next-part + :at-point-p #'jao-link-hint--notmuch-part-p + :vars '(notmuch-show-mode) + :open #'push-button + :open-message "Toggled" + :open-multiple t) + + (push 'link-hint-notmuch-part link-hint-types)) + + #+end_src |