Skip to content

Commit a4232a5

Browse files
committed
added mu4econfigsample
1 parent 11f755e commit a4232a5

File tree

1 file changed

+123
-0
lines changed

1 file changed

+123
-0
lines changed

mu4econfig-sample.el

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
(add-to-list 'load-path "/home/zamansky/Dropbox/opt/mu/mu4e")
2+
3+
4+
(require 'mu4e)
5+
6+
(require 'smtpmail)
7+
8+
9+
(setq
10+
message-send-mail-function 'smtpmail-send-it
11+
starttls-use-gnutls t
12+
mu4e-sent-messages-behavior 'sent
13+
mu4e-sent-folder "/hunter/Sent Items"
14+
mu4e-drafts-folder "/hunter/Drafts"
15+
user-mail-address "[email protected]"
16+
user-full-name "Mike Zamansky"
17+
smtpmail-default-smtp-server "mail.hunter.cuny.edu"
18+
smtpmail-local-domain "hunter.cuny.edu"
19+
smtpmail-smtp-user "mz631"
20+
smtpmail-smtp-server "mail.hunter.cuny.edu"
21+
smtpmail-stream-type 'starttls
22+
smtpmail-smtp-service 587)
23+
24+
(setq mu4e-maildir "~/Maildir"
25+
mu4e-trash-folder "/Trash"
26+
mu4e-refile-folder "/Archive"
27+
mu4e-get-mail-command "mbsync -a"
28+
mu4e-update-interval 300 ;; second
29+
mu4e-compose-signature-auto-include nil
30+
mu4e-view-show-images t
31+
mu4e-view-show-addresses t
32+
mu4e-attachment-dir "~/Downloads"
33+
mu4e-use-fancy-chars t
34+
)
35+
36+
37+
38+
39+
40+
;;; Mail directory shortcuts
41+
(setq mu4e-maildir-shortcuts
42+
'(
43+
("/hunter/INBOX" . ?h)
44+
("/hunter/Archive" . ?H)
45+
("/hunter/Sent Items" .?s)
46+
))
47+
48+
;;; Bookmarks
49+
(setq mu4e-bookmarks
50+
`(
51+
("flag:unread AND NOT flag:trashed" "Unread messages" ?u)
52+
("flag:unread" "Unread messages" ?n)
53+
("date:today..now" "Today's messages" ?t)
54+
("date:7d..now" "Last 7 days" ?w)
55+
("mime:image/*" "Messages with images" ?p)
56+
(,(mapconcat 'identity
57+
(mapcar
58+
(lambda (maildir)
59+
(concat "maildir:" (car maildir)))
60+
mu4e-maildir-shortcuts) " OR ")
61+
"All inboxes" ?i)))
62+
63+
64+
(require 'org-mu4e)
65+
(setq org-mu4e-convert-to-html t)
66+
67+
(add-to-list 'load-path "/home/zamansky/Dropbox/opt/org-mode/contrib/lisp")
68+
(require 'org-mime)
69+
70+
;; this seems to fix the babel file saving thing
71+
(defun org~mu4e-mime-replace-images (str current-file)
72+
"Replace images in html files with cid links."
73+
(let (html-images)
74+
(cons
75+
(replace-regexp-in-string ;; replace images in html
76+
"src=\"\\([^\"]+\\)\""
77+
(lambda (text)
78+
(format
79+
"src=\"./:%s\""
80+
(let* ((url (and (string-match "src=\"\\([^\"]+\\)\"" text)
81+
(match-string 1 text)))
82+
(path (expand-file-name
83+
url (file-name-directory current-file)))
84+
(ext (file-name-extension path))
85+
(id (replace-regexp-in-string "[\/\\\\]" "_" path)))
86+
(add-to-list 'html-images
87+
(org~mu4e-mime-file
88+
(concat "image/" ext) path id))
89+
id)))
90+
str)
91+
html-images)))
92+
93+
(add-to-list 'mu4e-view-actions
94+
'("ViewInBrowser" . mu4e-action-view-in-browser) t)
95+
96+
97+
98+
99+
(use-package mu4e-alert
100+
:ensure t)
101+
102+
103+
(mu4e-alert-set-default-style 'libnotify)
104+
(add-hook 'after-init-hook #'mu4e-alert-enable-notifications)
105+
(add-hook 'after-init-hook #'mu4e-alert-enable-mode-line-display)
106+
107+
108+
109+
110+
;;need this for hash access
111+
(require 'subr-x)
112+
113+
114+
;; we seem to need this to fix the org-store-link issue
115+
(org-link-set-parameters "mu4e" :follow #'org-mu4e-open :store
116+
#'org-mu4e-store-link)
117+
118+
119+
;; contact tweaks
120+
121+
;;(setq mu4e-compose-complete-only-after t)
122+
;;(setq mu4e-compose-complete-only-personal t)
123+

0 commit comments

Comments
 (0)