summaryrefslogtreecommitdiffhomepage
path: root/email.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-04-22 04:56:02 +0100
committerjao <jao@gnu.org>2021-04-22 04:56:02 +0100
commit183b6a6573ba2368df1352b88ef5bb33858007f5 (patch)
treead6d6297670357b84d092341e72f650c51f1074d /email.org
parent7b2face8d62761f2c659d1497c02053b28432c5e (diff)
downloadelibs-183b6a6573ba2368df1352b88ef5bb33858007f5.tar.gz
elibs-183b6a6573ba2368df1352b88ef5bb33858007f5.tar.bz2
notmuch: next/scroll and exit commands
Diffstat (limited to 'email.org')
-rw-r--r--email.org17
1 files changed, 15 insertions, 2 deletions
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