From 30eb7a1b7fc286c57cecfedf4d19b98e8b658347 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 25 Feb 2022 19:42:30 +0000 Subject: notmuch fixlets --- lib/net/jao-notmuch.el | 11 ++++++----- notmuch.org | 26 ++++++++------------------ 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index fe3e086..f057a55 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -238,11 +238,12 @@ (nc (append n (or (jao-notmuch--message-counts t) '(0 0 0)))) (q (buffer-name))) (with-current-buffer mb - (let ((s (thread-last (notmuch-show-get-subject) - (notmuch-show-strip-re) - (notmuch-sanitize)))) - (setq-local header-line-format - (apply 'jao-notmuch--format-counts s q nc)))))) + (when (derived-mode-p 'notmuch-show-mode) + (let ((s (thread-last (notmuch-show-get-subject) + (notmuch-show-strip-re) + (notmuch-sanitize)))) + (setq-local header-line-format + (apply 'jao-notmuch--format-counts s q nc))))))) (defun jao-notmuch-tree--find-update-header-line (&rest _args) (when-let ((mb (if (derived-mode-p 'notmuch-show-mode) diff --git a/notmuch.org b/notmuch.org index 125db3d..6dc0a35 100644 --- a/notmuch.org +++ b/notmuch.org @@ -93,25 +93,22 @@ "gr-qc" "quant-ph")) `(,(jao-notmuch--qn "feeds" "prog" "fp" - '("tag:prog" "not tag:\"/emacs/\""))))) + '("tag:prog" "not tag:\"/emacs/\""))))) - (defvar jao-notmuch-bigml-searches + (defvar jao-notmuch-inbox-searches `(,(jao-notmuch--q "bigml" "inbox" "bi") ,(jao-notmuch--q "bigml" "support" "bs") ,(jao-notmuch--q "bigml" "bugs" "bb") ,(jao-notmuch--q "bigml" "drivel" "bd") - ,(jao-notmuch--q "bigml" "lists" "bl"))) - - (defvar jao-notmuch-jao-searches - `(,(jao-notmuch--q "jao" "inbox" "ji") + ,(jao-notmuch--q "bigml" "lists" "bl") + ,(jao-notmuch--q "jao" "inbox" "ji") ,(jao-notmuch--q "jao" "bills" "jb") ,(jao-notmuch--q "jao" "drivel" "jd") ,(jao-notmuch--q "jao" "mdk" "jm") + ,(jao-notmuch--qn "jao" "hacking" "jh" + '("tag:hacking" "not tag:\"/emacs/\"")) ,(jao-notmuch--q "jao" "local" "l"))) - (defvar jao-notmuch-inbox-searches - (append jao-notmuch-bigml-searches jao-notmuch-jao-searches)) - (defvar jao-notmuch-emacs-searches `(,(jao-notmuch--sq "emacs" "ee" "emacs" "feeds") ,(jao-notmuch--sq "emacs-github" "eg" "emacs" "github") @@ -121,8 +118,7 @@ ,(jao-notmuch--sq "emacs-orgmode" "eo" "emacs" "org"))) (setq notmuch-saved-searches - (append jao-notmuch-bigml-searches - jao-notmuch-jao-searches + (append jao-notmuch-inbox-searches jao-notmuch-feed-searches jao-notmuch-emacs-searches)) @@ -202,7 +198,7 @@ (setq notmuch-address-use-company nil notmuch-address-command (if jao-notmuch-enabled 'internal 'as-is) notmuch-always-prompt-for-sender t - notmuch-draft-folder "drafts" + notmuch-draft-folder "local" notmuch-draft-quoted-tags '("part") notmuch-address-internal-completion '(received nil) notmuch-fcc-dirs @@ -242,12 +238,6 @@ (notmuch-hello-insert-buttons searches)) (indent-rigidly start (point) notmuch-hello-indent)))) - (defun jao-notmuch-hello-insert-bigml-searches () - (jao-notmuch-hello--insert-searches jao-notmuch-bigml-searches "work")) - - (defun jao-notmuch-hello-insert-jao-searches () - (jao-notmuch-hello--insert-searches jao-notmuch-jao-searches "jao")) - (defun jao-notmuch-hello-insert-inbox-searches () (jao-notmuch-hello--insert-searches jao-notmuch-inbox-searches "inbox")) -- cgit v1.2.3