From 183b6a6573ba2368df1352b88ef5bb33858007f5 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 22 Apr 2021 04:56:02 +0100 Subject: notmuch: next/scroll and exit commands --- email.org | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'email.org') diff --git a/email.org b/email.org index 29b3a0e..c7ff6a4 100644 --- a/email.org +++ b/email.org @@ -499,7 +499,7 @@ (beginning-of-buffer) (widget-forward 2))) - :hook (notmuch-hello-refresh-hook . jao--refresh-agenda) + :hook (notmuch-hello-refresh . jao--refresh-agenda) :bind (:map notmuch-hello-mode-map (("g" . jao-notmuch-refresh-hello) ("S" . consut-notmuch) @@ -561,6 +561,17 @@ :config + (defun jao-notmuch-tree-next (no-exit) + "Next message in forest or exit if none." + (interactive "P") + (notmuch-tree-next-matching-message (not no-exit))) + + (defun jao-notmuch-tree-scroll-or-next () + "Scroll or next message in forest or exit if none." + (interactive) + (when (notmuch-tree-scroll-message-window) + (notmuch-tree-next-matching-message t))) + (defun jao-notmuch--format-field (fun field &rest args) (let ((rs (apply fun field args))) (if (and (stringp field) (string= field "tree")) @@ -575,7 +586,9 @@ (("." . jao-notmuch-toggle-mime-parts) ("i" . jao-notmuch-toggle-images) ("h" . jao-notmuch-goto-message-buffer) - ("k" . jao-notmuch-tag-jump)))) + ("k" . jao-notmuch-tag-jump) + ("n" . jao-notmuch-tree-next) + ("SPC" . jao-notmuch-tree-scroll-or-next)))) #+end_src *** message #+begin_src emacs-lisp -- cgit v1.2.3