From 20683ace9609ebbd0916717aa3cd5b073cfdff43 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 13 Aug 2021 19:54:26 +0100 Subject: notmuch: hello tweaks --- notmuch.org | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'notmuch.org') diff --git a/notmuch.org b/notmuch.org index e2584e8..8e4b068 100644 --- a/notmuch.org +++ b/notmuch.org @@ -151,8 +151,8 @@ :init (setq notmuch-draft-folder "jao/drafts" notmuch-draft-quoted-tags '("part") - notmuch-column-control t ;; 1.0 - notmuch-hello-sections '(notmuch-hello-insert-saved-searches + notmuch-column-control t + notmuch-hello-sections '(jao-notmuch-hello-insert-searches notmuch-hello-insert-alltags notmuch-hello-insert-header) notmuch-hello-thousands-separator "," @@ -179,6 +179,14 @@ :config + (defun jao-notmuch-hello-insert-searches () + (when-let (searches (notmuch-hello-query-counts notmuch-saved-searches)) + (widget-insert "Saved searches:\n\n") + (let ((start (point))) + (let ((notmuch-column-control t)) + (notmuch-hello-insert-buttons searches)) + (indent-rigidly start (point) notmuch-hello-indent)))) + (when (eq 'notmuch jao-afio-mail-function) (setq message-directory "~/var/mail/" message-auto-save-directory "/tmp") @@ -212,7 +220,7 @@ (interactive) (let ((inhibit-message t)) (beginning-of-buffer) - (widget-forward 2))) + (widget-forward 1))) (defun jao-notmuch-refresh-hello () (interactive) @@ -308,6 +316,19 @@ :map notmuch-common-keymap (("B" . jao-notmuch-browse-urls)))) #+end_src +* notmuch-addr + #+begin_src emacs-lisp + (when (jao-load-path "notmuch-addr") + (with-eval-after-load 'notmuch-address + (jao-corfu-no-auto notmuch-message) + (defun jao-notmuch-message-corfu-setup () + (setq-local corfu-quit-no-match nil + corfu-commit-predicate t + orderless-component-separator " +")) + (add-hook 'notmuch-message-mode-hook #'jao-notmuch-message-corfu-setup) + (require 'notmuch-addr) + (notmuch-addr-setup))) + #+end_src * hydras #+begin_src emacs-lisp (major-mode-hydra-define notmuch-search-mode nil -- cgit v1.2.3