[emacs] New kid on the block: mu4e (almost replacing notmuch)

This commit is contained in:
Sebastian Schulze 2016-11-23 22:47:28 +01:00
parent 3574a978f5
commit 57e6ee1893
No known key found for this signature in database
GPG Key ID: 7EC07325206E3E55
2 changed files with 51 additions and 41 deletions

View File

@ -4,51 +4,65 @@
;;; Code:
(require 'notmuch)
(cond
((string-equal (system-name) "kandalingo")
(setq notmuch-address-command "/home/bascht/bin/address")
(notmuch-address-message-insinuate)
(setq notmuch-archive-tags '("-unread" "+archive"))
(add-hook 'message-setup-hook 'mml-secure-message-sign-pgpmime)
(autoload 'gnus-alias-determine-identity "gnus-alias" "" t)
(use-package mu4e)
(use-package mu4e-contrib)
(setq mu4e-html2text-command 'mu4e-shr2text)
(defun notmuch-unread () "Filter for unread and inboxed messages."
(interactive)
(notmuch-search "tag:unread and tag:inbox"))
(add-hook 'mu4e-view-mode-hook
(lambda()
;; try to emulate some of the eww key-bindings
(local-set-key (kbd "<tab>") 'shr-next-link)
(local-set-key (kbd "<backtab>") 'shr-previous-link)))
(defun notmuch-search-toggle-flagged ()
"Toggle flagged state on the current item."
(lambda ()
(interactive)
(if (member "flagged" (notmuch-search-get-tags))
(notmuch-search-tag (list (concat "+" "flagged"))))
(notmuch-search-tag (list(concat "-" "flagged")))
(notmuch-search-next-thread)))
(use-package notmuch)
(setq notmuch-crypto-process-mime t)
(setq notmuch-hello-sections
(quote
(notmuch-hello-insert-header notmuch-hello-insert-saved-searches notmuch-hello-insert-search notmuch-hello-insert-recent-searches notmuch-hello-insert-alltags notmuch-hello-insert-footer notmuch-hello-insert-inbox)))
(setq notmuch-message-headers (quote ("Subject" "To" "Cc" "Date" "Received")))
(setq notmuch-search-oldest-first nil)
(setq notmuch-address-command "/home/bascht/bin/address")
(notmuch-address-message-insinuate)
(setq notmuch-archive-tags '("-unread" "+archive"))
(add-hook 'message-setup-hook 'mml-secure-message-sign-pgpmime)
(autoload 'gnus-alias-determine-identity "gnus-alias" "" t)
(defun notmuch-unread () "Filter for unread and inboxed messages."
(interactive)
(notmuch-search "tag:unread and tag:inbox"))
(defun notmuch-search-toggle-flagged ()
"Toggle flagged state on the current item."
(lambda ()
(interactive)
(if (member "flagged" (notmuch-search-get-tags))
(notmuch-search-tag (list (concat "+" "flagged"))))
(notmuch-search-tag (list(concat "-" "flagged")))
(notmuch-search-next-thread)))
(setq notmuch-crypto-process-mime t)
(setq notmuch-hello-sections
(quote
(notmuch-hello-insert-header notmuch-hello-insert-saved-searches notmuch-hello-insert-search notmuch-hello-insert-recent-searches notmuch-hello-insert-alltags notmuch-hello-insert-footer notmuch-hello-insert-inbox)))
(setq notmuch-message-headers (quote ("Subject" "To" "Cc" "Date" "Received")))
(setq notmuch-search-oldest-first nil)
(setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq sendmail-program "msmtp"
user-full-name "Sebastian Schulze")
(setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq sendmail-program "msmtp"
user-full-name "Sebastian Schulze")
(setq message-sendmail-f-is-evil 't)
(setq message-sendmail-extra-arguments '("--read-envelope-from"))
(setq message-kill-buffer-on-exit t)
(setq message-sendmail-f-is-evil 't)
(setq message-sendmail-extra-arguments '("--read-envelope-from"))
(setq message-kill-buffer-on-exit t)
(setq mail-host-address "bascht.com")
(setq mail-host-address "bascht.com")
;;; load mail-mode when starting up from mutt
(setq auto-mode-alist (append '(("/tmp/mutt.*" . mail-mode)) auto-mode-alist))
;;; load mail-mode when starting up from mutt
(setq auto-mode-alist (append '(("/tmp/mutt.*" . mail-mode)) auto-mode-alist))
(add-hook 'mail-mode-hook 'turn-on-flyspell)
(add-hook 'mail-mode-hook 'turn-on-longlines)
(add-hook 'mail-mode-hook 'auto-fill-mode)
(add-hook 'mail-mode-hook 'turn-on-flyspell)
(add-hook 'mail-mode-hook 'turn-on-longlines)
(add-hook 'mail-mode-hook 'auto-fill-mode)
(provide 'mail-config)))
(provide 'mail-config)
;;; mail-config.el ends here

View File

@ -20,11 +20,7 @@
(global-set-key [f5] 'compile)
(global-set-key [f6] 'comment-or-uncomment-region)
(global-set-key [f9] 'notmuch-unread)
(define-key notmuch-search-mode-map "F"
(notmuch-search-toggle-flagged))
(global-set-key [f9] 'mu4e)
(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "C-x b") 'helm-buffers-list)