Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F176965
emacs mu4e setup
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
kuba-orlik
Feb 1 2021, 22:06
2021-02-01 22:06:51 (UTC+1)
Size
954 B
Referenced Files
None
Subscribers
None
emacs mu4e setup
View Options
(defun kuba/generate-mu4-context (key_ category_ name_ addresses_ fullname_ smtp-server_ smtp-port_ smtp-user_ smtp-stream-type_ inbox-prefix_)
"NAME is the name in offlineimap directory"
(let (
(key key_)
(category category_)
(name name_)
(addresses addresses_)
(fullname fullname_)
(smtp-server smtp-server_)
(smtp-port smtp-port_)
(smtp-user smtp-user_)
(smtp-stream-type smtp-stream-type_)
(inbox-prefix inbox-prefix_)
)
(message "!!! addresses %S" addresses)
(make-mu4e-context
:name (concat key "-" name)
:enter-func (lambda () (mu4e-message (concat "Entering " name " context")))
:leave-func (lambda () (setq mu4e-maildir-list nil) (mu4e-message (concat "Leaving " name " context")))
:match-func (lambda (msg)
(when msg (some
(lambda (any) any)
(mapcar (lambda (addr) (or (mu4e-message-contact-field-matches msg :to addr) (mu4e-message-contact-field-matches msg :cc addr))) addresses)))))))
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
104271
Default Alt Text
emacs mu4e setup (954 B)
Attached To
Mode
P18 emacs mu4e setup
Attached
Detach File
Event Timeline
Log In to Comment