#+begin_src emacs-lisp
(use-package evil
:demand t
- :hook (view-mode . evil-motion-state)
+ :hook ((view-mode . evil-motion-state)
+ (org-src-mode . evil-insert-state))
+ :init
+ (setq evil-want-integration nil)
:config (evil-mode 1)
(general-swap-key nil '(normal motion) ";" ":")
(setq evil-want-visual-char-semi-exclusive t))
#+end_src
+#+begin_src emacs-lisp
+(use-package evil-collection
+ :after evil
+ :config
+ (evil-collection-init))
+#+end_src
+
#+begin_src emacs-lisp
(use-package evil-escape
:demand t
(push #'minibufferp evil-escape-inhibit-functions))
#+end_src
+#+begin_src emacs-lisp
+(use-package evil-magit
+ :after magit
+ :config
+ (evil-set-initial-state 'git-commit-mode 'insert))
+#+end_src
+
#+begin_src emacs-lisp
(use-package evil-org
:hook (org-mode . evil-org-mode)
#+begin_src emacs-lisp
(amin--leader-keys
+ "/" '(:ignore t :wk "search")
+
"B" '(:ignore t :wk "Borg")
"BA" 'borg-activate
"Ba" 'borg-assimilate
#+begin_src emacs-lisp
(use-package swiper
- :general (:states 'normal "/" 'swiper)
+ :general (:states '(normal motion) "/" 'swiper)
+ (amin--leader-keys "//" 'swiper)
:bind (([remap isearch-forward] . swiper)
([remap isearch-backward] . swiper)))
#+end_src
See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]].
-#+begin_src emacs-lisp
-(defun amin/notmuch ()
- "Delete other windows, then launch `notmuch'."
- (interactive)
- (require 'notmuch)
- (delete-other-windows)
- (notmuch))
-
-;; (map!
-;; :leader
-;; :desc "notmuch" :n "m" #'amin/notmuch
-;; (:desc "search" :prefix "/"
-;; :desc "notmuch" :n "m" #'counsel-notmuch))
-#+end_src
-
#+begin_src emacs-lisp
(defvar amin-maildir "~/mail")
(setq mml-secure-openpgp-encrypt-to-self t
mml-secure-openpgp-sign-with-sender t))
+(defun amin/notmuch ()
+ "Delete other windows, then launch `notmuch'."
+ (interactive)
+ (delete-other-windows)
+ (notmuch))
+
(use-package notmuch
:general (amin--leader-keys "m" 'amin/notmuch)
+ :commands notmuch
:config
(setq notmuch-hello-sections
'(notmuch-hello-insert-header
'("Subject" "To" "Cc" "Date" "List-Id" "X-RT-Originator")
notmuch-hello-thousands-separator ","
notmuch-fcc-dirs
- '(("amin@aminb.org" . "amin/Sent")
- ("amin@gnu.org" . "gnu/Sent")
- ("abandali@uwaterloo.ca" . "\"uwaterloo/Sent Items\"")
- ("mab@gnu.org" . "gnu/Sent")
- ("aminb@gnu.org" . "gnu/Sent")
- (".*" . "sent"))
+ '(("amin@aminb.org" . "amin/Sent")
+ ("amin@gnu.org" . "gnu/Sent")
+ ("abandali@uwaterloo.ca" . "\"uwaterloo/Sent Items\"")
+ ("mab@gnu.org" . "gnu/Sent")
+ ("aminb@gnu.org" . "gnu/Sent")
+ (".*" . "sent"))
notmuch-search-result-format
- '(("date" . "%12s ")
- ("count" . "%-7s ")
+ '(("date" . "%12s ")
+ ("count" . "%-7s ")
("authors" . "%-40s ")
("subject" . "%s ")
- ("tags" . "(%s)")))
+ ("tags" . "(%s)"))
+ notmuch-saved-searches
+ '((:name "inbox" :query "tag:inbox" :key "i")
+ (:name "unread" :query "tag:unread" :key "u")
+ (:name "latest" :query "tag:latest" :key "l")
+ (:name "encrypted" :query "tag:encrypted" :key "e")
+ (:name "flagged" :query "tag:flagged" :key "f")
+ (:name "sent" :query "tag:sent" :key "s")
+ (:name "drafts" :query "tag:draft" :key "d")
+ (:name "all mail" :query "*" :key "a")))
;; (add-hook 'visual-fill-column-mode-hook
;; (lambda ()
;; (when (string= major-mode 'notmuch-message-mode)
;; (set! :evil-state 'notmuch-message-mode 'insert)
;; (advice-add #'notmuch-bury-or-kill-this-buffer
;; :override #'kill-this-buffer)
+ (evil-collection-define-key 'normal 'notmuch-common-keymap
+ "c" (lambda ()
+ "Compose new mail and prompt for sender"
+ (interactive)
+ (let ((current-prefix-arg t))
+ (call-interactively #'notmuch-mua-new-mail))))
:bind
- (:map notmuch-hello-mode-map
- ("g" . notmuch-poll-and-refresh-this-buffer)
- ("u" . (lambda ()
- "Search for `unread' tagged messages"
- (interactive)
- (notmuch-hello-search "tag:unread")))
- ("i" . (lambda ()
- "Search for `inbox' tagged messages"
- (interactive)
- (notmuch-hello-search "tag:inbox")))
- ("l" . (lambda ()
- "Search for `latest' tagged messages"
- (interactive)
- (notmuch-hello-search "tag:latest")))
- ("e" . (lambda ()
- "Search for `encrypted' tagged messages"
- (interactive)
- (notmuch-hello-search "tag:encrypted")))
- ("M" . (lambda ()
- "Compose new mail and prompt for sender"
- (interactive)
- (let ((current-prefix-arg t))
- (call-interactively #'notmuch-mua-new-mail)))))
(:map notmuch-search-mode-map
- ("g" . notmuch-poll-and-refresh-this-buffer)
("k" . (lambda ()
"Mark message read"
(interactive)
(notmuch-tree-archive-thread))))
)
-;; (use-package counsel-notmuch
-;; :commands counsel-notmuch)
+(use-package counsel-notmuch
+ :general (amin--leader-keys "/m" 'counsel-notmuch))
(after! notmuch-crypto
(setq notmuch-crypto-process-mime t))