diff options
author | jao <jao@gnu.org> | 2022-01-11 01:53:11 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-01-11 01:53:11 +0000 |
commit | 3bf6877c102f125b9df4c5ccc4be93917188160d (patch) | |
tree | cdcb0f27bb678c99e37aa1a703ca4ab6b5a4dd4b /notmuch.org | |
parent | 2df214b91c87f120e42b1d1eb253bfdadc4230b3 (diff) | |
download | elibs-3bf6877c102f125b9df4c5ccc4be93917188160d.tar.gz elibs-3bf6877c102f125b9df4c5ccc4be93917188160d.tar.bz2 |
notmuch: hello section navigation
Diffstat (limited to 'notmuch.org')
-rw-r--r-- | notmuch.org | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/notmuch.org b/notmuch.org index c2d8d32..48e648c 100644 --- a/notmuch.org +++ b/notmuch.org @@ -271,6 +271,22 @@ (let ((notmuch-hello-auto-refresh nil)) (notmuch-hello))) (jao-notmuch-hello-first)))) + (defvar jao-notmuch-hello--sec-rx "^\\([0-9]+\\|All tags:.+\\)") + + (defun jao-notmuch-hello-next-section () + (interactive) + (when (re-search-forward jao-notmuch-hello--sec-rx nil t) + (widget-forward 1))) + + (defun jao-notmuch-hello-prev-section () + (interactive) + (beginning-of-line) + (unless (looking-at-p jao-notmuch-hello--sec-rx) + (re-search-backward jao-notmuch-hello--sec-rx nil t)) + (when (re-search-backward jao-notmuch-hello--sec-rx nil t) + (end-of-line) + (widget-forward 1))) + (use-package notmuch-hello :init (setq notmuch-column-control t @@ -297,7 +313,9 @@ ("S" . consult-notmuch) ("g" . jao-notmuch-refresh-hello) ("." . jao-notmuch-hello-first) - ("SPC" . widget-button-press)))) + ("SPC" . widget-button-press) + ("[" . jao-notmuch-hello-prev-section) + ("]" . jao-notmuch-hello-next-section)))) #+end_src * show |