From cf759f6b46a23732ad151abac466740ccc9fc7aa Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 12 Jun 2021 22:14:32 +0100 Subject: accidentally removed ednc setup is back --- email.org | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'email.org') diff --git a/email.org b/email.org index f527f9b..a4d9bce 100644 --- a/email.org +++ b/email.org @@ -250,17 +250,17 @@ #+end_src * mailboxes #+begin_src emacs-lisp - (defun jao-list-mailboxes (base) + (defun jao-list-mailboxes (base &rest excl) (let ((dir (expand-file-name base "~/var/mail"))) - (seq-difference (directory-files dir) '("." ".." "trash" "spam")))) + (seq-difference (directory-files dir) (append '("." "..") excl)))) - (defun jao-mailbox-folders () + (defun jao-mailbox-folders (&rest excl) (seq-mapcat (lambda (base) (mapcar `(lambda (d) (format "%s/%s" ,base d)) - (jao-list-mailboxes base))) + (apply #'jao-list-mailboxes base excl))) '("jao" "bigml" "feeds" "trove"))) - (defvar jao-mailbox-folders (jao-mailbox-folders)) + (defvar jao-mailbox-folders (jao-mailbox-folders "trash" "spam")) (defvar jao-mailbox-folders-rx (regexp-opt jao-mailbox-folders)) #+end_src * consult narrowing @@ -485,7 +485,7 @@ #+begin_src emacs-lisp (use-package jao-notmuch :demand t - :config (setq jao-notmuch-mailboxes jao-mailbox-folders)) + :config (setq jao-notmuch-mailboxes (jao-mailbox-folders))) (use-package notmuch-tree :config @@ -504,12 +504,6 @@ (advice-add 'notmuch-tree-format-field :around #'jao-notmuch--format-field) - (defun jao-notmuch-echo-count () - (interactive) - (when-let ((n (jao-notmuch--unread-count))) - (jao-notmuch-tree-update-buffer-name n) - (message "%s messages left" n))) - :bind (:map notmuch-tree-mode-map (("." . jao-notmuch-toggle-mime-parts) ("C" . jao-notmuch-echo-count) -- cgit v1.2.3