notmuch stuff
This commit is contained in:
parent
214d624b4a
commit
98063b3e14
1 changed files with 215 additions and 55 deletions
182
ReadMe.org
182
ReadMe.org
|
@ -1147,7 +1147,6 @@ I use ~notmuch~ to index and search through my large mail inboxes.
|
||||||
(use-package notmuch
|
(use-package notmuch
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
|
|
||||||
(setq notmuch-search-oldest-first nil)
|
(setq notmuch-search-oldest-first nil)
|
||||||
(setq notmuch-show-logo nil
|
(setq notmuch-show-logo nil
|
||||||
notmuch-column-control 1.0
|
notmuch-column-control 1.0
|
||||||
|
@ -1161,31 +1160,70 @@ I use ~notmuch~ to index and search through my large mail inboxes.
|
||||||
`(( :name "telecom/inbox"
|
`(( :name "telecom/inbox"
|
||||||
:query "tag:inbox and tag:telecom and folder:telecom/INBOX"
|
:query "tag:inbox and tag:telecom and folder:telecom/INBOX"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "i"))
|
:key ,(kbd "t i"))
|
||||||
( :name "telecom/CGT"
|
( :name "telecom/CGT"
|
||||||
:query "tag:telecom and tag:inbox and tag:cgt"
|
:query "tag:telecom and tag:inbox and tag:cgt"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "u"))
|
:key ,(kbd "t c"))
|
||||||
( :name "telecom/all"
|
( :name "telecom/all"
|
||||||
:query "tag:telecom and tag:inbox"
|
:query "tag:telecom and tag:inbox"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "o"))
|
:key ,(kbd "t a"))
|
||||||
( :name "work/inbox"
|
( :name "work/inbox"
|
||||||
:query "tag:work and folder:work/INBOX"
|
:query "tag:work and tag:inbox and folder:work/INBOX"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "p"))
|
:key ,(kbd "w i"))
|
||||||
( :name "work/RB"
|
( :name "work/RB"
|
||||||
:query "tag:work and tag:inbox and tag:reproducible-builds"
|
:query "tag:work and tag:inbox and tag:reproducible-builds"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "c"))
|
:key ,(kbd "w r"))
|
||||||
( :name "work/bluehats"
|
( :name "work/bluehats"
|
||||||
:query "tag:work and tag:inbox and tag:bluehats"
|
:query "tag:work and tag:inbox and tag:bluehats"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "p"))
|
:key ,(kbd "w b"))
|
||||||
( :name "work/all"
|
( :name "work/all"
|
||||||
:query "tag:work and tag:inbox"
|
:query "tag:work and tag:inbox"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "p"))))
|
:key ,(kbd "w a"))
|
||||||
|
( :name "ens/inbox"
|
||||||
|
:query "tag:inbox and tag:ens"
|
||||||
|
:sort-order newest-first
|
||||||
|
:key ,(kbd "e i"))
|
||||||
|
( :name "dgnum/inbox"
|
||||||
|
:query "tag:inbox and tag:dgnum and folder:dgnum/INBOX"
|
||||||
|
:sort-order newest-first
|
||||||
|
:key ,(kbd "d i"))
|
||||||
|
( :name "dgnum/bureau"
|
||||||
|
:query "tag:inbox and tag:dgnum and tag:bureau"
|
||||||
|
:sort-order newest-first
|
||||||
|
:key ,(kbd "d b"))
|
||||||
|
( :name "dgnum/federez"
|
||||||
|
:query "tag:inbox and tag:dgnum and tag:federez"
|
||||||
|
:sort-order newest-first
|
||||||
|
:key ,(kbd "d f"))
|
||||||
|
( :name "dgnum/nixcon"
|
||||||
|
:query "tag:inbox and tag:dgnum and tag:nixcon"
|
||||||
|
:sort-order newest-first
|
||||||
|
:key ,(kbd "d n"))
|
||||||
|
( :name "dgnum/fai"
|
||||||
|
:query "tag:inbox and tag:dgnum and tag:fai"
|
||||||
|
:sort-order newest-first
|
||||||
|
:key ,(kbd "d f"))
|
||||||
|
( :name "dgnum/all"
|
||||||
|
:query "tag:inbox and tag:dgnum"
|
||||||
|
:sort-order newest-first
|
||||||
|
:key ,(kbd "d a"))
|
||||||
|
))
|
||||||
|
|
||||||
|
(setq notmuch-archive-tags '("+archive" "-inbox" "-unread" "-junk")
|
||||||
|
notmuch-message-replied-tags '("+replied")
|
||||||
|
notmuch-message-deleted-tags '("+trash" "-inbox" "-unread" "-junk")
|
||||||
|
notmuch-message-forwarded-tags '("+forwarded")
|
||||||
|
notmuch-show-mark-read-tags '("-unread")
|
||||||
|
notmuch-draft-tags '("+draft")
|
||||||
|
notmuch-draft-folder "drafts"
|
||||||
|
notmuch-draft-save-plaintext 'ask)
|
||||||
|
|
||||||
|
|
||||||
(setq notmuch-search-result-format
|
(setq notmuch-search-result-format
|
||||||
'(("date" . "%12s ")
|
'(("date" . "%12s ")
|
||||||
|
@ -1213,15 +1251,106 @@ I use ~notmuch~ to index and search through my large mail inboxes.
|
||||||
(setq message-sendmail-envelope-from 'header)
|
(setq message-sendmail-envelope-from 'header)
|
||||||
(setq mail-envelope-from 'header))
|
(setq mail-envelope-from 'header))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Composition
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp :tangle "init.el"
|
||||||
|
(use-package notmuch
|
||||||
|
:ensure nil
|
||||||
|
:after notmuch
|
||||||
|
:defer t
|
||||||
|
:config
|
||||||
|
(setq notmuch-mua-compose-in 'current-window)
|
||||||
|
(setq notmuch-mua-hidden-headers nil)
|
||||||
|
(setq notmuch-always-prompt-for-sender t)
|
||||||
|
(setq notmuch-mua-cite-function 'message-cite-original-without-signature)
|
||||||
|
(setq notmuch-mua-reply-insert-header-p-function 'notmuch-show-reply-insert-header-p-never)
|
||||||
|
(setq notmuch-mua-user-agent-function nil)
|
||||||
|
(setq notmuch-maildir-use-notmuch-insert t)
|
||||||
|
(setq notmuch-crypto-process-mime t)
|
||||||
|
(setq notmuch-crypto-get-keys-asynchronously t)
|
||||||
|
(setq notmuch-mua-attachment-regexp ; see `notmuch-mua-send-hook'
|
||||||
|
(concat "\\b\\(attache\?ment\\|attached\\|attach\\|"
|
||||||
|
"pi[èe]ce\s+jointe?\\|"
|
||||||
|
"συνημμ[εέ]νο\\|επισυν[αά]πτω\\)\\b")))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Reading messages
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp :tangle "init.el"
|
||||||
|
(use-package notmuch
|
||||||
|
:ensure nil
|
||||||
|
:after notmuch
|
||||||
|
:defer t
|
||||||
|
:config
|
||||||
|
(setq notmuch-show-relative-dates t)
|
||||||
|
(setq notmuch-show-all-multipart/alternative-parts nil)
|
||||||
|
(setq notmuch-show-indent-messages-width 0)
|
||||||
|
(setq notmuch-show-indent-multipart nil)
|
||||||
|
(setq notmuch-show-part-button-default-action 'notmuch-show-view-part)
|
||||||
|
(setq notmuch-wash-wrap-lines-length 120)
|
||||||
|
(setq notmuch-unthreaded-show-out nil)
|
||||||
|
(setq notmuch-message-headers '("To" "Cc" "Subject" "Date"))
|
||||||
|
(setq notmuch-message-headers-visible t))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
** Bindings
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp :tangle "init.el"
|
||||||
|
(use-package notmuch
|
||||||
|
:ensure nil
|
||||||
|
:after notmuch
|
||||||
|
:demand t
|
||||||
|
:hook
|
||||||
|
(notmuch-mua-send . notmuch-mua-attachment-check)
|
||||||
|
:config
|
||||||
|
(defun notmuch-tag-then-archive ()
|
||||||
|
"First prompt for tags to add via notmuch-search-tag, then archive the thread."
|
||||||
|
(interactive)
|
||||||
|
(call-interactively 'notmuch-search-tag)
|
||||||
|
(notmuch-search-archive-thread))
|
||||||
|
|
||||||
|
(defun notmuch-search-message-delete ()
|
||||||
|
(interactive)
|
||||||
|
"Delete message and select next message."
|
||||||
|
(notmuch-search-tag notmuch-message-deleted-tags)
|
||||||
|
(notmuch-search-next-thread))
|
||||||
|
|
||||||
|
(remove-hook 'notmuch-show-hook #'notmuch-show-turn-on-visual-line-mode)
|
||||||
|
(remove-hook 'notmuch-search-hook #'notmuch-hl-line-mode) ; Check my `lin' package
|
||||||
|
:bind
|
||||||
|
( :map global-map
|
||||||
|
("C-c m" . notmuch-jump-search)
|
||||||
|
("C-x m" . notmuch-mua-new-mail)
|
||||||
|
:map notmuch-search-mode-map
|
||||||
|
("A" . notmuch-tag-then-archive)
|
||||||
|
("a" . notmuch-search-archive-thread)
|
||||||
|
("D" . notmuch-search-message-delete)
|
||||||
|
("/" . notmuch-search-filter) ; alias for l
|
||||||
|
("r" . notmuch-search-reply-to-thread) ; easier to reply to all by default
|
||||||
|
("R" . notmuch-search-reply-to-thread-sender)
|
||||||
|
:map notmuch-show-mode-map
|
||||||
|
("a" . nil)
|
||||||
|
("A" . nil)
|
||||||
|
("r" . notmuch-show-reply)
|
||||||
|
("R" . notmuch-show-reply-sender)
|
||||||
|
:map notmuch-hello-mode-map
|
||||||
|
("C-<tab>" . nil)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp :tangle "init.el"
|
||||||
(use-package notmuch-addr
|
(use-package notmuch-addr
|
||||||
:ensure t)
|
:ensure t)
|
||||||
(with-eval-after-load 'notmuch-address
|
(with-eval-after-load 'notmuch-address
|
||||||
(notmuch-addr-setup))
|
(notmuch-addr-setup))
|
||||||
|
|
||||||
|
|
||||||
(setq sendmail-program "msmtp"
|
(setq sendmail-program "msmtp"
|
||||||
send-mail-function 'smtpmail-send-it
|
send-mail-function 'smtpmail-send-it
|
||||||
message-sendmail-f-is-evil t
|
|
||||||
message-sendmail-envelope-from 'header
|
message-sendmail-envelope-from 'header
|
||||||
message-send-mail-function 'message-send-mail-with-sendmail)
|
message-send-mail-function 'message-send-mail-with-sendmail)
|
||||||
|
|
||||||
|
@ -1301,6 +1430,32 @@ I want the number of unread messages in my ~notmuch-hello~ buffer.
|
||||||
(advice-add 'notmuch-hello-insert-buttons :override #'luj/notmuch-hello-insert-buttons)
|
(advice-add 'notmuch-hello-insert-buttons :override #'luj/notmuch-hello-insert-buttons)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Let's add an indicator in the modeline, as well:
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp :tangle "init.el"
|
||||||
|
(use-package notmuch-indicator
|
||||||
|
:ensure t
|
||||||
|
:after notmuch
|
||||||
|
:config
|
||||||
|
(setq notmuch-indicator-args
|
||||||
|
'(( :terms "tag:unread and tag:inbox and tag:telecom and folder:telecom/INBOX"
|
||||||
|
:label "🔍 ")
|
||||||
|
( :terms "tag:unread and tag:inbox and tag:work and folder:work/INBOX"
|
||||||
|
:label "🚧 ")
|
||||||
|
( :terms "tag:unread and tag:inbox and tag:ens"
|
||||||
|
:label "🎓 ")
|
||||||
|
( :terms "tag:unread and tag:inbox and tag:dgnum and folder:dgnum/INBOX"
|
||||||
|
:label "💾 "))
|
||||||
|
|
||||||
|
notmuch-indicator-refresh-count 60
|
||||||
|
notmuch-indicator-hide-empty-counters t
|
||||||
|
notmuch-indicator-notmuch-config-file "/home/julien/.config/notmuch/default/config"
|
||||||
|
notmuch-indicator-force-refresh-commands '(notmuch-refresh-this-buffer))
|
||||||
|
|
||||||
|
(notmuch-indicator-mode 1))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* Programming
|
* Programming
|
||||||
|
@ -1513,6 +1668,10 @@ I don't like how I must open another buffer to get documentation, so let's go wi
|
||||||
:after eglot
|
:after eglot
|
||||||
:hook
|
:hook
|
||||||
(python-mode . eglot-ensure))
|
(python-mode . eglot-ensure))
|
||||||
|
|
||||||
|
(org-babel-do-load-languages
|
||||||
|
'org-babel-load-languages
|
||||||
|
'((python . t)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
@ -1642,6 +1801,7 @@ Well, why not use it for PDF? Also integrate with /LaTeX/ etc.
|
||||||
:ensure (:host github :repo "havarddj/typst-preview.el"))
|
:ensure (:host github :repo "havarddj/typst-preview.el"))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Lisp
|
*** Lisp
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle "init.el"
|
#+begin_src emacs-lisp :tangle "init.el"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue