summaryrefslogtreecommitdiffhomepage
path: root/email.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-06-05 16:23:46 +0100
committerjao <jao@gnu.org>2021-06-05 16:23:46 +0100
commitca8a4fafe65413f63adf4ce6e50b69174a41f12b (patch)
tree748bdd66836b868c8fd33f2de82b96a87c70db59 /email.org
parent38590fd6c9e7aec2ada3dc208a4b76823e95d216 (diff)
downloadelibs-ca8a4fafe65413f63adf4ce6e50b69174a41f12b.tar.gz
elibs-ca8a4fafe65413f63adf4ce6e50b69174a41f12b.tar.bz2
consult narrowing for the mail workspace
Diffstat (limited to 'email.org')
-rw-r--r--email.org15
1 files changed, 14 insertions, 1 deletions
diff --git a/email.org b/email.org
index a08771c..d4ccc45 100644
--- a/email.org
+++ b/email.org
@@ -584,7 +584,20 @@
:init (setq consult-notmuch-authors-width 30)
:config
(add-to-list 'consult-config '(consult-notmuch :preview-key any))
- (add-to-list 'consult-buffer-sources 'consult-notmuch-buffer-source))
+
+ (defvar jao-notmuch-consult-buffer-history nil)
+ (defvar jao-notmuch-consult-source
+ (list :name "mail buffer"
+ :category 'buffer
+ :hidden t
+ :narrow (cons ?n "mail buffer")
+ :history 'jao-notmuch-consult-buffer-history
+ :require-match t
+ :action (lambda (b) (jao-afio--goto-mail) (pop-to-buffer b))
+ :items (lambda ()
+ (append (consult-notmuch--interesting-buffers)
+ '("*Calendar*" "inbox.org" "*Org Agenda*")))))
+ (jao-consult-add-buffer-source 'jao-notmuch-consult-source "Mail" ?n))
(defvar jao-consult-notmuch-folders
(seq-mapcat (lambda (base)