mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-11 19:45:25 +03:00
feat(mail): hotkeys to toggle tags
This commit is contained in:
parent
efe1aadaa1
commit
53eb9132dc
2 changed files with 39 additions and 0 deletions
|
|
@ -4,6 +4,18 @@
|
||||||
(let ((default-directory "/home/pavel/.guix-extra-profiles/mail/mail/share/emacs/site-lisp"))
|
(let ((default-directory "/home/pavel/.guix-extra-profiles/mail/mail/share/emacs/site-lisp"))
|
||||||
(normal-top-level-add-subdirs-to-load-path))
|
(normal-top-level-add-subdirs-to-load-path))
|
||||||
|
|
||||||
|
(defun my/notmuch-toggle-trash ()
|
||||||
|
(interactive)
|
||||||
|
(evil-collection-notmuch-toggle-tag "trash" "search" #'ignore))
|
||||||
|
|
||||||
|
(defun my/notmuch-toggle-inbox ()
|
||||||
|
(interactive)
|
||||||
|
(evil-collection-notmuch-toggle-tag "inbox" "search" #'ignore))
|
||||||
|
|
||||||
|
(defun my/notmuch-toggle-unread ()
|
||||||
|
(interactive)
|
||||||
|
(evil-collection-notmuch-toggle-tag "unread" "search" #'ignore))
|
||||||
|
|
||||||
(use-package notmuch
|
(use-package notmuch
|
||||||
;; :ensure nil
|
;; :ensure nil
|
||||||
:commands (notmuch notmuch-search)
|
:commands (notmuch notmuch-search)
|
||||||
|
|
@ -20,6 +32,12 @@
|
||||||
(setq send-mail-function #'sendmail-send-it)
|
(setq send-mail-function #'sendmail-send-it)
|
||||||
(setq mml-secure-openpgp-sign-with-sender t)
|
(setq mml-secure-openpgp-sign-with-sender t)
|
||||||
(setq notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full)
|
(setq notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full)
|
||||||
|
(general-define-key
|
||||||
|
:keymaps 'notmuch-search-mode-map
|
||||||
|
:states '(normal)
|
||||||
|
"d" #'my/notmuch-toggle-trash
|
||||||
|
"i" #'my/notmuch-toggle-inbox
|
||||||
|
"u" #'my/notmuch-toggle-unread)
|
||||||
;; Use org-contacts for completion
|
;; Use org-contacts for completion
|
||||||
(require 'org-contacts)
|
(require 'org-contacts)
|
||||||
(setq notmuch-address-command 'as-is)
|
(setq notmuch-address-command 'as-is)
|
||||||
|
|
|
||||||
21
Mail.org
21
Mail.org
|
|
@ -406,6 +406,21 @@ Then, the problem with my Guix setup is that Emacs by default doesn't see the el
|
||||||
(normal-top-level-add-subdirs-to-load-path))
|
(normal-top-level-add-subdirs-to-load-path))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Some functions to toggle tags:
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun my/notmuch-toggle-trash ()
|
||||||
|
(interactive)
|
||||||
|
(evil-collection-notmuch-toggle-tag "trash" "search" #'ignore))
|
||||||
|
|
||||||
|
(defun my/notmuch-toggle-inbox ()
|
||||||
|
(interactive)
|
||||||
|
(evil-collection-notmuch-toggle-tag "inbox" "search" #'ignore))
|
||||||
|
|
||||||
|
(defun my/notmuch-toggle-unread ()
|
||||||
|
(interactive)
|
||||||
|
(evil-collection-notmuch-toggle-tag "unread" "search" #'ignore))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
Finally the proper notmuch settings:
|
Finally the proper notmuch settings:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package notmuch
|
(use-package notmuch
|
||||||
|
|
@ -424,6 +439,12 @@ Finally the proper notmuch settings:
|
||||||
(setq send-mail-function #'sendmail-send-it)
|
(setq send-mail-function #'sendmail-send-it)
|
||||||
(setq mml-secure-openpgp-sign-with-sender t)
|
(setq mml-secure-openpgp-sign-with-sender t)
|
||||||
(setq notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full)
|
(setq notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full)
|
||||||
|
(general-define-key
|
||||||
|
:keymaps 'notmuch-search-mode-map
|
||||||
|
:states '(normal)
|
||||||
|
"d" #'my/notmuch-toggle-trash
|
||||||
|
"i" #'my/notmuch-toggle-inbox
|
||||||
|
"u" #'my/notmuch-toggle-unread)
|
||||||
;; Use org-contacts for completion
|
;; Use org-contacts for completion
|
||||||
(require 'org-contacts)
|
(require 'org-contacts)
|
||||||
(setq notmuch-address-command 'as-is)
|
(setq notmuch-address-command 'as-is)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue