commit fce876972e00ef18bab0a3670fb7d544c81ce916
parent 1f6d98d95c092b79ce0ed5523f4c4e5b4746750a
Author: Alex Balgavy <alex@balgavy.eu>
Date: Sun, 4 Jul 2021 16:18:24 +0200
emacs: notmuch config
Only for reading mail right now. Still have a bunch of tweaking to
do. And have to configure sending mail.
Diffstat:
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/emacs/config.org b/emacs/config.org
@@ -90,8 +90,9 @@
#+begin_src emacs-lisp
(when (memq window-system '(mac ns x))
(use-package exec-path-from-shell
- :config
- (exec-path-from-shell-initialize)))
+ :config
+ (add-to-list 'exec-path-from-shell-variables "NOTMUCH_CONFIG")
+ (exec-path-from-shell-initialize)))
#+end_src
** emacs-which-key
@@ -375,6 +376,28 @@ Use hippie expand instead of dabbrev-expand:
#+begin_src emacs-lisp
(setq apropos-do-all t)
#+end_src
+* Notmuch
+Define some saved searches (i.e. mailboxes):
+
+#+begin_src emacs-lisp
+ (setq notmuch-saved-searches
+ `((:name "inbox: personal" :query "folder:/alex@balgavy.eu/ tag:inbox" :key ,(kbd "ip"))
+ (:name "inbox: school" :query "folder:/a.balgavy@student.vu.nl/ tag:inbox" :key ,(kbd "is"))
+ (:name "archive: personal" :query "folder:/alex@balgavy.eu/ tag:archive" :key ,(kbd "ap"))
+ (:name "archive: school" :query "folder:/a.balgavy@student.vu.nl/ tag:archive" :key ,(kbd "as"))))
+#+end_src
+
+Global keybindings:
+
+#+begin_src emacs-lisp
+ (global-set-key (kbd "C-c m") #'notmuch)
+#+end_src
+
+Show newest mail first:
+
+#+begin_src emacs-lisp
+ (setq notmuch-search-oldest-first nil)
+#+end_src
* References
Here's a list of good articles I encountered about configging emacs: