summaryrefslogtreecommitdiffhomepage
path: root/email.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-06-12 22:14:32 +0100
committerjao <jao@gnu.org>2021-06-12 22:14:32 +0100
commitcf759f6b46a23732ad151abac466740ccc9fc7aa (patch)
treef3328ec43a657ca69f9fa29c5eeba4f905db66c5 /email.org
parent1a54f19de471ac2f742e62d27f4438c1b098f3e2 (diff)
downloadelibs-cf759f6b46a23732ad151abac466740ccc9fc7aa.tar.gz
elibs-cf759f6b46a23732ad151abac466740ccc9fc7aa.tar.bz2
accidentally removed ednc setup is back
Diffstat (limited to 'email.org')
-rw-r--r--email.org18
1 files changed, 6 insertions, 12 deletions
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)