X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/blobdiff_plain/06e1660015051599b192f89faadc35b4e754f8e2..56fd2611ee7803511933acf5098eb4bed92f792e:/init.org diff --git a/init.org b/init.org index da741f1..87b9f02 100644 --- a/init.org +++ b/init.org @@ -883,6 +883,7 @@ TODO: break this giant source block down into individual org sections. ** [[https://leanprover.github.io][Lean]] (with [[https://github.com/leanprover/lean-mode][lean-mode]]) #+begin_src emacs-lisp +(eval-when-compile (defvar lean-mode-map)) (use-package lean-mode :bind (:map lean-mode-map ("S-SPC" . company-complete))) @@ -1132,6 +1133,27 @@ Emacs package that displays available keybindings in popup ("" . mwim-end-of-line-or-code))) #+end_src +** projectile + +#+begin_src emacs-lisp +(use-package projectile + :defer 5 + :bind-keymap ("C-c p" . projectile-command-map) + :config + (projectile-mode) + + (defun my-projectile-invalidate-cache (&rest _args) + ;; ignore the args to `magit-checkout' + (projectile-invalidate-cache nil)) + + (eval-after-load 'magit-branch + '(progn + (advice-add 'magit-checkout + :after #'my-projectile-invalidate-cache) + (advice-add 'magit-branch-and-checkout + :after #'my-projectile-invalidate-cache)))) +#+end_src + * Email ** [[https://notmuchmail.org][notmuch]] @@ -1186,6 +1208,7 @@ See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]]. (use-package notmuch :commands notmuch :bind ("C-c m" . amin/notmuch) + :custom (notmuch-always-prompt-for-sender t) :config (setq notmuch-hello-sections '(notmuch-hello-insert-header @@ -1226,13 +1249,26 @@ See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]]. ;; (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-common-keymap + ("g" . notmuch-poll-and-refresh-this-buffer)) + (:map notmuch-hello-mode-map + ("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")))) (:map notmuch-search-mode-map ("k" . (lambda () "Mark message read" @@ -1249,19 +1285,34 @@ See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]]. "Mark message deleted" (interactive) (notmuch-search-tag '("-unread" "-inbox" "+deleted")) - (notmuch-search-archive-thread))) + (notmuch-search-next-thread))) ("S" . (lambda () "Mark message as spam" (interactive) (notmuch-search-tag '("-unread" "-inbox" "-webmasters" "+spam")) - (notmuch-search-archive-thread)))) - (:map notmuch-tree-mode-map ; TODO: additional bindings + (notmuch-search-next-thread)))) + (:map notmuch-tree-mode-map + ("k" . (lambda () + "Mark message read" + (interactive) + (notmuch-tree-tag '("-unread")) + ;; (notmuch-tree-archive-thread) + (notmuch-tree-next-message))) + ("u" . (lambda () + "Mark message unread" + (interactive) + (notmuch-tree-tag '("+unread")) + (notmuch-tree-next-message))) + ("K" . (lambda () + "Mark message deleted" + (interactive) + (notmuch-tree-tag '("-unread" "-inbox" "+deleted")) + (notmuch-tree-next-message))) ("S" . (lambda () "Mark message as spam" (interactive) (notmuch-tree-tag '("-unread" "-inbox" "-webmasters" "+spam")) - (notmuch-tree-archive-thread)))) -) + (notmuch-tree-next-message))))) (use-package counsel-notmuch :bind ("C-c s m" . counsel-notmuch))