summaryrefslogtreecommitdiffhomepage
path: root/email.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-05-05 02:22:57 +0100
committerjao <jao@gnu.org>2021-05-05 02:22:57 +0100
commitd7f44fc9db9199c524d2da050b5e3e14bd106258 (patch)
treec486333fa8ceaf12a8ebe1a1bd15eda17cda59fc /email.org
parente54132af02c95d519b2823deda274147d52b6553 (diff)
downloadelibs-d7f44fc9db9199c524d2da050b5e3e14bd106258.tar.gz
elibs-d7f44fc9db9199c524d2da050b5e3e14bd106258.tar.bz2
email: config tweaks
Diffstat (limited to 'email.org')
-rw-r--r--email.org34
1 files changed, 23 insertions, 11 deletions
diff --git a/email.org b/email.org
index 386aead..4b9448b 100644
--- a/email.org
+++ b/email.org
@@ -471,7 +471,8 @@
(defun jao-notmuch--q-base (d0 d1 k q)
(list :name (concat d0 (when d1 "/") d1)
- :search-type 'tree :key k :query q))
+ :search-type 'tree :key k :query q
+ :sort-order 'oldest-first))
(defun jao-notmuch--q (d0 d1 &optional k qs)
(when (null qs)
@@ -524,12 +525,16 @@
(beginning-of-buffer)
(widget-forward 2)))
- :hook ((notmuch-hello-refresh . jao--refresh-agenda)
- (notmuch-hello-refresh . jao-notmuch-update-minibuffer))
+ :config
+
+ (with-eval-after-load "consult-notmuch"
+ (define-key notmuch-hello-mode-map "S" #'consult-notmuch))
+
+ :hook ((notmuch-hello-refresh . jao-notmuch-update-minibuffer)
+ (notmuch-hello-refresh . jao--refresh-agenda))
:bind (:map notmuch-hello-mode-map
(("g" . jao-notmuch-refresh-hello)
- ("S" . consult-notmuch)
("k" . nil)
("SPC" . widget-button-press))))
@@ -612,12 +617,18 @@
(scroll-other-window 1)
(notmuch-tree-show-message nil)))
- (defun jao-notmuch-tree-delete-next ()
- "Mark as deleted current message and move to next."
- (interactive)
- (notmuch-tree-tag (notmuch-tag-change-list '("+deleted" "-unread" "-new")))
+ (defun jao-notmuch-tree-delete-next (reverse)
+ "Mark as deleted current message and move to next. Prefix undeletes."
+ (interactive "P")
+ (notmuch-tree-tag
+ (notmuch-tag-change-list '("+deleted" "-unread" "-new") reverse))
(notmuch-tree-next-message))
+ (defun jao-notmuch-tree-undelete-next (reverse)
+ "Mark as not-deleted current message and move to next."
+ (interactive "P")
+ (jao-notmuch-tree-delete-next (not reverse)))
+
(defun jao-notmuch-tree-read-thread-next ()
"Mark the current thread as read and move to next one."
(interactive)
@@ -640,6 +651,8 @@
:bind (:map notmuch-tree-mode-map
(("." . jao-notmuch-toggle-mime-parts)
("i" . jao-notmuch-toggle-images)
+ ("d" . jao-notmuch-tree-delete-next)
+ ("D" . jao-notmuch-tree-undelete-next)
("h" . jao-notmuch-goto-message-buffer)
("K" . jao-notmuch-tag-jump)
("k" . jao-notmuch-tree-read-thread-next)
@@ -685,14 +698,13 @@
(("B" . jao-notmuch-browse-urls)
("E" . jao-notmuch-open-enclosure)
("M-g" . jao-notmuch-follow-link)
- ("T" . notmuch-search-by-tag)
- ("U" . notmuch-unthreaded)
- ("d" . jao-notmuch-tree-delete-next)
("j" . jao-notmuch-saved-search-jump)
("k" . jao-notmuch-tag-jump)
("s" . notmuch-tree)
+ ("T" . notmuch-search-by-tag)
("t" . jao-notmuch-tree-by-tag)
("u" . jao-notmuch-tree-flagged-next)
+ ("U" . notmuch-unthreaded)
("z" . notmuch-search))))
#+end_src
*** org mode integration