+* mu4e
+[[info:org#External links]]
+[[info:mu4e#Keybindings]]
+
+alsot tried notmuch, it had some glitches, and it's config
+has a list of folders which i'd rather not publish, so it's config is archived.
+
+#+begin_src emacs-lisp
+;;(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
+(require 'mu4e)
+(setq send-mail-function (quote sendmail-send-it) ;; common to gnus also
+ mu4e-maildir "/m/4e"
+ ;; use the standard imap folders
+ mu4e-sent-folder "/Sent"
+ mu4e-drafts-folder "/Drafts"
+ mu4e-trash-folder "/Trash"
+ ;; standard imap folder is /Archive, but I've set this to /Junk,
+ ;; because I don't manually archive individual messages, and mu4e
+ ;; is lacking a button to move to the spam folder "Junk", and I
+ ;; want one to train spamassassin better. Note: It calls
+ ;; archiving "refiling", so it's bound to r.
+ mu4e-refile-folder "/Junk"
+ ;; reindex new mail this often in seconds
+ ;; show addresses instead of just names
+ mu4e-view-show-addresses t
+ mu4e-use-fancy-chars t
+ mu4e-confirm-quit nil
+ mu4e-headers-leave-behavior 'apply ;; dont ask, do whatever was marked
+ mu4e-headers-fields (delq (assoc :mailing-list mu4e-headers-fields) mu4e-headers-fields)
+ ;; a bit faster than the default 500. trying out the default for now
+ ;;mu4e-headers-results-limit 80
+
+ ;; looking up the list of maildirs when doing jo from summary
+ ;; can take a few seconds if we have a ton of messages.
+ ;; Only take that time for the first lookup.
+ ;; if we add a new maildir, just restart mu4e for it to be in that list.
+ mu4e-cache-maildir-list t
+ ;; default is 8, way too small for my big monitors
+ mu4e-headers-visible-lines 50
+ )
+
+;; fucks up reading unread bookmark. when that is fixed, enable it
+;; (setq mu4e-update-interval 60)
+
+
+;; this file includes setting up my email addresses, which are not public,
+;; including
+;; mu4e-user-mail-address-list
+;; and a function
+;; inspired by mu4e info manual, search for mu4e-compose-pre-hook.
+(load "/p/c/mu4e.el")
+
+;; it's implemented in mu4e, but not in the actions list for
+;; some reason.
+(add-to-list 'mu4e-view-actions
+ '("browser view" . mu4e-action-view-in-browser) t)
+(setq mu4e-maildir-shortcuts
+ '( ("/INBOX" . ?i)
+ ("/github" . ?g)
+ ("/zroe" . ?z)
+ ("/Drafts" . ?d)
+ ("/Sent" . ?d)
+ ))
+
+;; normally, you would add to this, but we want to
+;; modify unread messages. the first 4 are defined by default.
+(setq mu4e-bookmarks
+ `( ,(make-mu4e-bookmark
+ :name "Unread messages"
+ :query "flag:unread AND NOT flag:trashed AND NOT maildir:/Junk AND NOT maildir:/fwfw"
+ :key ?u)
+ ,(make-mu4e-bookmark
+ :name "Today's messages"
+ :query "date:today..now"
+ :key ?t)
+ ,(make-mu4e-bookmark
+ :name "Last 7 days"
+ :query "date:7d..now"
+ :key ?w)
+ ,(make-mu4e-bookmark
+ :name "Messages with images"
+ :query "mime:image/*"
+ :key ?p))
+ )
+
+
+(defun mu4e-action-msgs-by-this-sender (msg)
+ "In header view, view messages by the sender of the message under point."
+ (let ((from (mu4e-message-field msg :from)))
+ (unless from
+ (mu4e-error "No from header for this message"))
+ ;; from is structured like: (("Anacron" . "root@x2.lan"))
+ (mu4e-headers-search (concat "f:" (cdar from)))))
+
+(add-to-list 'mu4e-headers-actions
+ '("from this sender" . mu4e-action-msgs-by-this-sender) t)
+(add-to-list 'mu4e-view-actions
+ '("from this sender" . mu4e-action-msgs-by-this-sender) t)
+#+end_src
+
+
+