From d7f44fc9db9199c524d2da050b5e3e14bd106258 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 5 May 2021 02:22:57 +0100 Subject: email: config tweaks --- email.org | 34 +++++++++++++++++++++++----------- init.org | 6 +++--- 2 files changed, 26 insertions(+), 14 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 diff --git a/init.org b/init.org index 3afe4a6..a666c86 100644 --- a/init.org +++ b/init.org @@ -476,9 +476,9 @@ (jao-load-org "exwm.org") (setq jao-exwm-enabled-p t) (display-time-mode -1) - (exwm-enable) - (jao-ednc-setup 95) (jao-minibuffer-add-mode-line 90) + (jao-ednc-setup 95) + (exwm-enable) (jao-trisect t) (jao-exwm-xmobar) (jao-nm-applet) @@ -980,7 +980,7 @@ (setq-default indent-tabs-mode nil) (setq indent-tabs-width 4) (setq-default default-tab-width 8) - (setq tab-always-indent 'complete) + (setq tab-always-indent t) (setq kill-read-only-ok t) (setq view-read-only nil) #+end_src -- cgit v1.2.3