Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Paste
P18
emacs mu4e setup
Active
Public
Actions
Authored by
kuba-orlik
on Feb 1 2021, 22:06.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F176965: emacs mu4e setup
Feb 1 2021, 22:06
2021-02-01 22:06:51 (UTC+1)
Subscribers
None
(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)))))))
Event Timeline
kuba-orlik
created this paste.
Feb 1 2021, 22:06
2021-02-01 22:06:51 (UTC+1)
kuba-orlik
shifted this object from the
Restricted Space
space to the
S5 Publiczna
space.
kuba-orlik
changed the visibility from "All Users" to "Public (No Login Required)".
Log In to Comment