dotfiles

My dotfiles.
Log | Files | Refs | LICENSE

commit 27a3dc3f4f00044fe3534819009a0b3f43b30236
parent 5e1420f21f7e0bd0e18cddbec3748c2f8b9e8e60
Author: rmj <pwishie@gmail.com>
Date:   Fri, 10 Apr 2020 22:41:30 -0700

gitignore for emacs

Diffstat:
M.econfig.org | 413++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
MREADME.org | 157+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 394 insertions(+), 176 deletions(-)

diff --git a/.econfig.org b/.econfig.org @@ -34,7 +34,7 @@ (add-to-list 'default-frame-alist - '(font . "FuraCode Nerd Font Mono:antialias=true:size=16:style=Regular") + '(font . "Hack:antialias=true:size=16:style=Regular") '(font . "Fira Code Symbol:antialias=true:size=16:style=Regular")) (defun fira-code-mode--make-alist (list) @@ -134,6 +134,17 @@ (global-set-key (kbd "M-<down>") 'text-scale-decrease) (scroll-bar-mode nil) +(use-package shr + :commands (eww + eww-browse-url) + :config + ;(setq browse-url-browser-function 'eww-browse-url) + (setq shr-use-fonts nil) + (setq shr-use-colors nil) + (setq shr-max-image-proportion 0.2) + (setq shr-width (current-fill-column))) + + #+END_SRC ** Ivy-mode #+BEGIN_SRC emacs-lisp @@ -243,6 +254,9 @@ (org-indent-mode t) :hook org-mode) +(use-package org-bullets + :ensure t) + #+END_SRC * IDE ** company-mode and flycheck @@ -356,6 +370,9 @@ (add-hook 'prog-mode-hook #'rainbow-delimiters-mode) +(dolist (hook '(emacs-lisp-mode-hook ielm-mode-hook)) + (add-hook hook #'elisp-def-mode)) + #+END_SRC ** Misc @@ -572,179 +589,201 @@ ** email #+BEGIN_SRC emacs-lisp - (require 'org-mime) + (use-package shrface + :after shr + :quelpa + (shrface :repo "chenyanming/shrface" :fetcher github)) + + (require 'shrface) + + (require 'org-mime) + + (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e/") + (require 'mu4e) + + (setq mu4e-maildir (expand-file-name "~/Maildir")) + + ; get mail + (setq mu4e-get-mail-command "mbsync pwishie-gmail" + ;; mu4e-html2text-command "w3m -T text/html" ;;using the default mu4e-shr2text + mu4e-view-prefer-html t + mu4e-update-interval 300 + mu4e-headers-auto-update t + mu4e-compose-signature-auto-include nil + mu4e-compose-format-flowed t) + + ;; to view selected message in the browser, no signin, just html mail + (add-to-list 'mu4e-view-actions + '("ViewInBrowser" . mu4e-action-view-in-browser) t) + + ;; enable inline images + (setq mu4e-view-show-images t) + ;; use imagemagick, if available + (when (fboundp 'imagemagick-register-types) + (imagemagick-register-types)) + + ;; every new email composition gets its own frame! + (setq mu4e-compose-in-new-frame t) + + ;; don't save message to Sent Messages, IMAP takes care of this + (setq mu4e-sent-messages-behavior 'delete) + + (add-hook 'mu4e-view-mode-hook #'visual-line-mode) + + ;; (defun my-render-html-message () + ;; (let ((dom (libxml-parse-html-region (point-min) (point-max)))) + ;; (erase-buffer) + ;; (shr-insert-document dom) + ;; (goto-char (point-min)))) - (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e/") - (require 'mu4e) + ;; (setq mu4e-html2text-command 'my-render-html-message) - (setq mu4e-maildir (expand-file-name "~/Maildir")) - - ; get mail - (setq mu4e-get-mail-command "mbsync pwishie-gmail" - ;; mu4e-html2text-command "w3m -T text/html" ;;using the default mu4e-shr2text - mu4e-view-prefer-html t - mu4e-update-interval 300 - mu4e-headers-auto-update t - mu4e-compose-signature-auto-include nil - mu4e-compose-format-flowed t) - - ;; to view selected message in the browser, no signin, just html mail - (add-to-list 'mu4e-view-actions - '("ViewInBrowser" . mu4e-action-view-in-browser) t) - - ;; enable inline images - (setq mu4e-view-show-images t) - ;; use imagemagick, if available - (when (fboundp 'imagemagick-register-types) - (imagemagick-register-types)) - - ;; every new email composition gets its own frame! - (setq mu4e-compose-in-new-frame t) - - ;; don't save message to Sent Messages, IMAP takes care of this - (setq mu4e-sent-messages-behavior 'delete) - - (add-hook 'mu4e-view-mode-hook #'visual-line-mode) - - ;; <tab> to navigate to links, <RET> to open them in browser - (add-hook 'mu4e-view-mode-hook - (lambda() - ;; try to emulate some of the eww key-bindings - (local-set-key (kbd "<RET>") 'mu4e~view-browse-url-from-binding) - (local-set-key (kbd "<tab>") 'shr-next-link) - (local-set-key (kbd "<backtab>") 'shr-previous-link))) - - ;; from https://www.reddit.com/r/emacs/comments/bfsck6/mu4e_for_dummies/elgoumx - (add-hook 'mu4e-headers-mode-hook - (defun my/mu4e-change-headers () - (interactive) - (setq mu4e-headers-fields - `((:human-date . 25) ;; alternatively, use :date - (:flags . 6) - (:from . 22) - (:thread-subject . ,(- (window-body-width) 70)) ;; alternatively, use :subject - (:size . 7))))) - - ;; if you use date instead of human-date in the above, use this setting - ;; give me ISO(ish) format date-time stamps in the header list - ;(setq mu4e-headers-date-format "%Y-%m-%d %H:%M") - - ;; spell check - (add-hook 'mu4e-compose-mode-hook - (defun my-do-compose-stuff () - "My settings for message composition." - (visual-line-mode) - ;(org-mu4e-compose-org-mode) - (use-hard-newlines -1) - (flyspell-mode))) - - (require 'smtpmail) - - ;;rename files when moving - ;;NEEDED FOR MBSYNC - (setq mu4e-change-filenames-when-moving t) - - ;;set up queue for offline email - ;;use mu mkdir ~/Maildir/acc/queue to set up first - (setq smtpmail-queue-mail nil) ;; start in normal mode - - ;;from the info manual - (setq mu4e-attachment-dir "~/Downloads") - - (setq message-kill-buffer-on-exit t) - (setq mu4e-compose-dont-reply-to-self t) - - (require 'org-mu4e) - - ;; convert org mode to HTML automatically - (setq org-mu4e-convert-to-html t) - - ;;from vxlabs config - ;; show full addresses in view message (instead of just names) - ;; toggle per name with M-RET - (setq mu4e-view-show-addresses 't) - - ;; don't ask when quitting - (setq mu4e-confirm-quit nil) - - (require 'smtpmail-multi) - - (require 'feedmail) - - ;; mu4e-context - (setq mu4e-context-policy 'pick-first) - (setq mu4e-compose-context-policy 'always-ask) - (setq mu4e-contexts - (list - (make-mu4e-context - :name "personal" ;;for pwishie-gmail - :enter-func (lambda () (mu4e-message "Entering context personal")) - :leave-func (lambda () (mu4e-message "Leaving context personal")) - :match-func (lambda (msg) - (when msg - (mu4e-message-contact-field-matches - msg '(:from :to :cc :bcc) "pwishie@gmail.com"))) - :vars '((user-mail-address . "pwishie@gmail.com") - (user-full-name . "Ryan") - (mu4e-sent-folder . "/pwishie-gmail/[pwishie].Sent Mail") - (mu4e-drafts-folder . "/pwishie-gmail/[pwishie].drafts") - (mu4e-trash-folder . "/pwishie-gmail/[pwishie].Bin") - (mu4e-compose-signature . (concat "Formal Signature\n" "Emacs 25, org-mode 9, mu4e 1.0\n")) - (mu4e-compose-format-flowed . t) - (smtpmail-queue-dir . "~/Maildir/pwishie-gmail/queue/cur") - (setq message-send-mail-function 'message-send-mail-with-sendmail - sendmail-program "/usr/bin/msmtp" - user-full-name "Ryan Jeffrey") - - (setq message-sendmail-envelope-from 'header) - (add-hook 'message-send-mail-hook 'choose-msmtp-account) - (smtpmail-smtp-user . "pwishie") - (smtpmail-starttls-credentials . (("smtp.gmail.com" 587 nil nil))) - (smtpmail-auth-credentials . (expand-file-name "~/.emacs.d/.authinfo.gpg")) - (smtpmail-default-smtp-server . "smtp.gmail.com") - (smtpmail-smtp-server . "smtp.gmail.com") - (smtpmail-smtp-service . 587) - (smtpmail-debug-info . t) - (smtpmail-debug-verbose . t) - (mu4e-maildir-shortcuts . ( ("/pwishie-gmail/INBOX" . ?i) - ("/pwishie-gmail/[pwishie].Sent Mail" . ?s) - ("/pwishie-gmail/[pwishie].Bin" . ?t) - ("/pwishie-gmail/[pwishie].All Mail" . ?a) - ("/pwishie-gmail/[pwishie].Starred" . ?r) - ("/pwishie-gmail/[pwishie].drafts" . ?d) - )))) - ;; (make-mu4e-context - ;; :name "personal" ;;for rmjxyz-gmail - ;; :enter-func (lambda () (mu4e-message "Entering context personal")) - ;; :leave-func (lambda () (mu4e-message "Leaving context personal")) - ;; :match-func (lambda (msg) - ;; (when msg - ;; (mu4e-message-contact-field-matches - ;; msg '(:from :to :cc :bcc) "rmjxyz@gmail.com"))) - ;; :vars '((user-mail-address . "rmjxyz@gmail.com") - ;; (user-full-name . "User Account2") - ;; (mu4e-sent-folder . "/rmjxyz-gmail/[rmjxyz].Sent Mail") - ;; (mu4e-drafts-folder . "/rmjxyz-gmail/[rmjxyz].drafts") - ;; (mu4e-trash-folder . "/rmjxyz-gmail/[rmjxyz].Trash") - ;; (mu4e-compose-format-flowed . t) - ;; (smtpmail-queue-dir . "~/Maildir/rmjxyz-gmail/queue/cur") - ;; (message-send-mail-function . smtpmail-send-it) - ;; (smtpmail-smtp-user . "rmjxyz") - ;; (smtpmail-starttls-credentials . (("smtp.gmail.com" 587 nil nil))) - ;; (smtpmail-auth-credentials . (expand-file-name "~/.emacs.d/.authinfo.gpg")) - ;; (smtpmail-default-smtp-server . "smtp.gmail.com") - ;; (smtpmail-smtp-server . "smtp.gmail.com") - ;; (smtpmail-smtp-service . 587) - ;; (smtpmail-debug-info . t) - ;; (smtpmail-debug-verbose . t) - ;; (mu4e-maildir-shortcuts . ( ("/rmjxyz-gmail/INBOX" . ?i) - ;; ("/rmjxyz-gmail/[rmjxyz].Sent Mail" . ?s) - ;; ("/rmjxyz-gmail/[rmjxyz].Trash" . ?t) - ;; ("/rmjxyz-gmail/[rmjxyz].All Mail" . ?a) - ;; ("/rmjxyz-gmail/[rmjxyz].Starred" . ?r) - ;; ("/rmjxyz-gmail/[rmjxyz].drafts" . ?d) - ;; )))) - )) + + ;; <tab> to navigate to links, <RET> to open them in browser + (add-hook 'mu4e-view-mode-hook + (lambda() + ;; try to emulate some of the eww key-bindings + (local-set-key (kbd "<RET>") 'mu4e~view-browse-url-from-binding) + (local-set-key (kbd "<tab>") 'shr-next-link) + (local-set-key (kbd "<backtab>") 'shr-previous-link))) + + ;; from https://www.reddit.com/r/emacs/comments/bfsck6/mu4e_for_dummies/elgoumx + (add-hook 'mu4e-headers-mode-hook + (defun my/mu4e-change-headers () + (interactive) + (setq mu4e-headers-fields + `((:human-date . 25) ;; alternatively, use :date + (:flags . 6) + (:from . 22) + (:thread-subject . ,(- (window-body-width) 70)) ;; alternatively, use :subject + (:size . 7))))) + + ;; if you use date instead of human-date in the above, use this setting + ;; give me ISO(ish) format date-time stamps in the header list + ;(setq mu4e-headers-date-format "%Y-%m-%d %H:%M") + + ;; spell check + (add-hook 'mu4e-compose-mode-hook + (defun my-do-compose-stuff () + "My settings for message composition." + (visual-line-mode) + ;(org-mu4e-compose-org-mode) + (use-hard-newlines -1) + (flyspell-mode))) + + (require 'smtpmail) + + ;;rename files when moving + ;;NEEDED FOR MBSYNC + (setq mu4e-change-filenames-when-moving t) + + ;;set up queue for offline email + ;;use mu mkdir ~/Maildir/acc/queue to set up first + (setq smtpmail-queue-mail nil) ;; start in normal mode + + ;;from the info manual + (setq mu4e-attachment-dir "~/Downloads") + + (setq message-kill-buffer-on-exit t) + (setq mu4e-compose-dont-reply-to-self t) + + (require 'org-mu4e) + + ;; convert org mode to HTML automatically + (setq org-mu4e-convert-to-html t) + + (setq mu4e-org-contacts-file (expand-file-name "~/.emacs.d/contacts.org")) + (add-to-list 'mu4e-headers-actions + '("org-contact-add" . mu4e-action-add-org-contact) t) + (add-to-list 'mu4e-view-actions + '("org-contact-add" . mu4e-action-add-org-contact) t) + + ;;from vxlabs config + ;; show full addresses in view message (instead of just names) + ;; toggle per name with M-RET + (setq mu4e-view-show-addresses 't) + + ;; don't ask when quitting + (setq mu4e-confirm-quit nil) + + (require 'smtpmail-multi) + + (require 'feedmail) + + ;; mu4e-context + (setq mu4e-context-policy 'pick-first) + (setq mu4e-compose-context-policy 'always-ask) + (setq mu4e-contexts + (list + (make-mu4e-context + :name "personal" ;;for pwishie-gmail + :enter-func (lambda () (mu4e-message "Entering context personal")) + :leave-func (lambda () (mu4e-message "Leaving context personal")) + :match-func (lambda (msg) + (when msg + (mu4e-message-contact-field-matches + msg '(:from :to :cc :bcc) "pwishie@gmail.com"))) + :vars '((user-mail-address . "pwishie@gmail.com") + (user-full-name . "Ryan") + (mu4e-sent-folder . "/pwishie-gmail/[pwishie].Sent Mail") + (mu4e-drafts-folder . "/pwishie-gmail/[pwishie].drafts") + (mu4e-trash-folder . "/pwishie-gmail/[pwishie].Bin") + (mu4e-compose-signature . (concat "Formal Signature\n" "Emacs 25, org-mode 9, mu4e 1.0\n")) + (mu4e-compose-format-flowed . t) + (smtpmail-queue-dir . "~/Maildir/pwishie-gmail/queue/cur") + (setq message-send-mail-function 'message-send-mail-with-sendmail + sendmail-program "/usr/bin/msmtp" + user-full-name "Ryan Jeffrey") + + (setq message-sendmail-envelope-from 'header) + (add-hook 'message-send-mail-hook 'choose-msmtp-account) + (smtpmail-smtp-user . "pwishie") + (smtpmail-starttls-credentials . (("smtp.gmail.com" 587 nil nil))) + (smtpmail-auth-credentials . (expand-file-name "~/.emacs.d/.authinfo.gpg")) + (smtpmail-default-smtp-server . "smtp.gmail.com") + (smtpmail-smtp-server . "smtp.gmail.com") + (smtpmail-smtp-service . 587) + (smtpmail-debug-info . t) + (smtpmail-debug-verbose . t) + (mu4e-maildir-shortcuts . ( ("/pwishie-gmail/INBOX" . ?i) + ("/pwishie-gmail/[pwishie].Sent Mail" . ?s) + ("/pwishie-gmail/[pwishie].Bin" . ?t) + ("/pwishie-gmail/[pwishie].All Mail" . ?a) + ("/pwishie-gmail/[pwishie].Starred" . ?r) + ("/pwishie-gmail/[pwishie].drafts" . ?d) + )))) + ;; (make-mu4e-context + ;; :name "personal" ;;for rmjxyz-gmail + ;; :enter-func (lambda () (mu4e-message "Entering context personal")) + ;; :leave-func (lambda () (mu4e-message "Leaving context personal")) + ;; :match-func (lambda (msg) + ;; (when msg + ;; (mu4e-message-contact-field-matches + ;; msg '(:from :to :cc :bcc) "rmjxyz@gmail.com"))) + ;; :vars '((user-mail-address . "rmjxyz@gmail.com") + ;; (user-full-name . "User Account2") + ;; (mu4e-sent-folder . "/rmjxyz-gmail/[rmjxyz].Sent Mail") + ;; (mu4e-drafts-folder . "/rmjxyz-gmail/[rmjxyz].drafts") + ;; (mu4e-trash-folder . "/rmjxyz-gmail/[rmjxyz].Trash") + ;; (mu4e-compose-format-flowed . t) + ;; (smtpmail-queue-dir . "~/Maildir/rmjxyz-gmail/queue/cur") + ;; (message-send-mail-function . smtpmail-send-it) + ;; (smtpmail-smtp-user . "rmjxyz") + ;; (smtpmail-starttls-credentials . (("smtp.gmail.com" 587 nil nil))) + ;; (smtpmail-auth-credentials . (expand-file-name "~/.emacs.d/.authinfo.gpg")) + ;; (smtpmail-default-smtp-server . "smtp.gmail.com") + ;; (smtpmail-smtp-server . "smtp.gmail.com") + ;; (smtpmail-smtp-service . 587) + ;; (smtpmail-debug-info . t) + ;; (smtpmail-debug-verbose . t) + ;; (mu4e-maildir-shortcuts . ( ("/rmjxyz-gmail/INBOX" . ?i) + ;; ("/rmjxyz-gmail/[rmjxyz].Sent Mail" . ?s) + ;; ("/rmjxyz-gmail/[rmjxyz].Trash" . ?t) + ;; ("/rmjxyz-gmail/[rmjxyz].All Mail" . ?a) + ;; ("/rmjxyz-gmail/[rmjxyz].Starred" . ?r) + ;; ("/rmjxyz-gmail/[rmjxyz].drafts" . ?d) + ;; )))) + )) #+END_SRC ** rss @@ -769,6 +808,36 @@ ;; Note: The customize interface is also supported. (setq rmh-elfeed-org-files (list "/home/rmj/.emacs.d/elfeed.org")) +(define-key elfeed-search-mode-map (kbd "u") '(lambda () + (interactive) + (message "Updating elfeed database.") + (elfeed-update))) + +(setq-default elfeed-search-filter "@6-months-ago +unread -reddit") + +;; from https://github.com/ravarspath/emacs-conf/blob/master/lisp/ravar-custom.el +(setq ravar/elfeed-podcast-dir "/home/rmj/Music/podcast") + +(defun ravar/elfeed-play-enclosure-mpd () + "Downloads the item in the enclosure and starts in playing in mpd using mpc" + (interactive) + (let* ((entry elfeed-show-entry) + (enclosure-index (elfeed--get-enclosure-num + "Enclosure to save" entry)) + (url-enclosure (car (elt (elfeed-entry-enclosures entry) + (- enclosure-index 1)))) + (fname + (funcall elfeed-show-enclosure-filename-function + entry url-enclosure))) + (start-process-shell-command + "play enclosure" nil + (format "cd %s; wget %s;mpc update; mpc search filename %s | mpc insert; +mpc next; mpc play " + ravar/elfeed-podcast-dir url-enclosure fname)))) + + (define-key elfeed-show-mode-map (kbd "o") 'ravar/elfeed-play-enclosure-mpd) + + #+END_SRC ** pdf #+BEGIN_SRC emacs-lisp diff --git a/README.org b/README.org @@ -1,13 +1,162 @@ #+TITLE: Dotfiles #+AUTHOR: Ryan Jeffrey -My dotfiles. The current programs I use are zsh for my shell, -emacs as my text editor, and i3 as my WM. +My dotfiles. The current programs I have are Arch Linux (which I use, btw), zsh for my shell, +emacs as my text editor/userland replacement, and dwm as my WM. * .zshrc .zshrc. Uses oh-my-zsh. Remember to change the pathnames depending on the username (ie /home/<name>) * Emacs -.emacs loads the file called .econfig.org. The file called .econfig.org is for my Thinkpad as it is the main computer I use. -The speconf.org file is the configuration for emacs on my desktop. It is stripped down with fewer features. +.emacs loads the file called .econfig.org. The file in this repo called .econfig.org is for my Thinkpad as it is the main computer I use. +The speconf.org file is the configuration for emacs on my desktop. It is stripped down with fewer features. Rename to .econfig.org to use it. * dwm Look for my fork of dwm. + +* Mail +I use mu for indexing / mu4e for my mail reading, isync for getting my mail, and msmtp for sending mail. + +#+BEGIN_SRC emacs-lisp + +(require 'org-mime) + + (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e/") + (require 'mu4e) + + (setq mu4e-maildir (expand-file-name "~/Maildir")) + + ; get mail + (setq mu4e-get-mail-command "mbsync pwishie-gmail" + ;; mu4e-html2text-command "w3m -T text/html" ;;using the default mu4e-shr2text + mu4e-view-prefer-html t + mu4e-update-interval 300 + mu4e-headers-auto-update t + mu4e-compose-signature-auto-include nil + mu4e-compose-format-flowed t) + + ;; to view selected message in the browser, no signin, just html mail + (add-to-list 'mu4e-view-actions + '("ViewInBrowser" . mu4e-action-view-in-browser) t) + + ;; enable inline images + (setq mu4e-view-show-images t) + ;; use imagemagick, if available + (when (fboundp 'imagemagick-register-types) + (imagemagick-register-types)) + + ;; every new email composition gets its own frame! + (setq mu4e-compose-in-new-frame t) + + ;; don't save message to Sent Messages, IMAP takes care of this + (setq mu4e-sent-messages-behavior 'delete) + + (add-hook 'mu4e-view-mode-hook #'visual-line-mode) + + ;; <tab> to navigate to links, <RET> to open them in browser + (add-hook 'mu4e-view-mode-hook + (lambda() + ;; try to emulate some of the eww key-bindings + (local-set-key (kbd "<RET>") 'mu4e~view-browse-url-from-binding) + (local-set-key (kbd "<tab>") 'shr-next-link) + (local-set-key (kbd "<backtab>") 'shr-previous-link))) + + ;; from https://www.reddit.com/r/emacs/comments/bfsck6/mu4e_for_dummies/elgoumx + (add-hook 'mu4e-headers-mode-hook + (defun my/mu4e-change-headers () + (interactive) + (setq mu4e-headers-fields + `((:human-date . 25) ;; alternatively, use :date + (:flags . 6) + (:from . 22) + (:thread-subject . ,(- (window-body-width) 70)) ;; alternatively, use :subject + (:size . 7))))) + + ;; if you use date instead of human-date in the above, use this setting + ;; give me ISO(ish) format date-time stamps in the header list + ;(setq mu4e-headers-date-format "%Y-%m-%d %H:%M") + + ;; spell check + (add-hook 'mu4e-compose-mode-hook + (defun my-do-compose-stuff () + "My settings for message composition." + (visual-line-mode) + ;(org-mu4e-compose-org-mode) + (use-hard-newlines -1) + (flyspell-mode))) + + (require 'smtpmail) + + ;;rename files when moving + ;;NEEDED FOR MBSYNC + (setq mu4e-change-filenames-when-moving t) + + ;;set up queue for offline email + ;;use mu mkdir ~/Maildir/acc/queue to set up first + (setq smtpmail-queue-mail nil) ;; start in normal mode + + ;;from the info manual + (setq mu4e-attachment-dir "~/Downloads") + + (setq message-kill-buffer-on-exit t) + (setq mu4e-compose-dont-reply-to-self t) + + (require 'org-mu4e) + + ;; convert org mode to HTML automatically + (setq org-mu4e-convert-to-html t) + + ;;from vxlabs config + ;; show full addresses in view message (instead of just names) + ;; toggle per name with M-RET + (setq mu4e-view-show-addresses 't) + + ;; don't ask when quitting + (setq mu4e-confirm-quit nil) + + (require 'smtpmail-multi) + + (require 'feedmail) + + ;; mu4e-context + (setq mu4e-context-policy 'pick-first) + (setq mu4e-compose-context-policy 'always-ask) + (setq mu4e-contexts + (list + (make-mu4e-context + :name "personal" ;;for pwishie-gmail + :enter-func (lambda () (mu4e-message "Entering context personal")) + :leave-func (lambda () (mu4e-message "Leaving context personal")) + :match-func (lambda (msg) + (when msg + (mu4e-message-contact-field-matches + msg '(:from :to :cc :bcc) "pwishie@gmail.com"))) + :vars '((user-mail-address . "pwishie@gmail.com") + (user-full-name . "Ryan") + (mu4e-sent-folder . "/pwishie-gmail/[pwishie].Sent Mail") + (mu4e-drafts-folder . "/pwishie-gmail/[pwishie].drafts") + (mu4e-trash-folder . "/pwishie-gmail/[pwishie].Bin") + (mu4e-compose-signature . (concat "Formal Signature\n" "Emacs 25, org-mode 9, mu4e 1.0\n")) + (mu4e-compose-format-flowed . t) + (smtpmail-queue-dir . "~/Maildir/pwishie-gmail/queue/cur") + (setq + message-send-mail-function 'message-send-mail-with-sendmail + sendmail-program "/usr/bin/msmtp" + user-full-name "Ryan Jeffrey") + + (setq message-sendmail-envelope-from 'header) + (add-hook 'message-send-mail-hook 'choose-msmtp-account) + (smtpmail-smtp-user . "pwishie") + (smtpmail-starttls-credentials . (("smtp.gmail.com" 587 nil nil))) + (smtpmail-auth-credentials . (expand-file-name "~/.emacs.d/.authinfo.gpg")) + (smtpmail-default-smtp-server . "smtp.gmail.com") + (smtpmail-smtp-server . "smtp.gmail.com") + (smtpmail-smtp-service . 587) + (smtpmail-debug-info . t) + (smtpmail-debug-verbose . t) + (mu4e-maildir-shortcuts . ( ("/pwishie-gmail/INBOX" . ?i) + ("/pwishie-gmail/[pwishie].Sent Mail" . ?s) + ("/pwishie-gmail/[pwishie].Bin" . ?t) + ("/pwishie-gmail/[pwishie].All Mail" . ?a) + ("/pwishie-gmail/[pwishie].Starred" . ?r) + ("/pwishie-gmail/[pwishie].drafts" . ?d))))))) +#+END_SRC +