From a285eec11e5b056a02ab5c11a268abed01d9131a Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 6 Jun 2021 04:18:16 +0100 Subject: better notmuch-hello refresh (it was org agenda) --- email.org | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'email.org') diff --git a/email.org b/email.org index d4ccc45..2017105 100644 --- a/email.org +++ b/email.org @@ -384,13 +384,16 @@ (when (eq 'notmuch jao-afio-mail-function) (setq mm-text-html-renderer 'shr)) + (defun jao-notmuch-refresh-agenda () + (interactive) + (save-window-excursion (org-agenda-list))) + (defun jao-notmuch-refresh-hello () (interactive) (when (derived-mode-p 'notmuch-hello-mode) (when (not (string-blank-p jao-notmuch-minibuffer-string)) - (notmuch-hello)) + (let ((notmuch-hello-auto-refresh nil)) (notmuch-hello))) (let ((inhibit-message t)) - (save-window-excursion (org-agenda-list)) (beginning-of-buffer) (widget-forward 2)))) @@ -413,7 +416,8 @@ (jao-afio-switch . jao-notmuch-refresh-hello)) :bind (:map notmuch-hello-mode-map - (("S" . consult-notmuch) + (("a" . jao-notmuch-refresh-agenda) + ("S" . consult-notmuch) ("g" . jao-notmuch-refresh-hello) ("SPC" . widget-button-press)) :map notmuch-common-keymap @@ -429,8 +433,7 @@ (let ((b (current-buffer))) (select-window notmuch-tree-message-window) (setq-local jao-notmuch--tree-buffer b) - (when (and and-click (button-at (point))) - (push-button)) + (when (and and-click (button-at (point))) (push-button)) t))) (defun jao-notmuch-click-message-buffer () -- cgit v1.2.3