Page MenuHomeSealhub

emacs mu4e setup

Authored By
kuba-orlik
Feb 1 2021, 22:06
Size
954 B
Referenced Files
None
Subscribers
None

emacs mu4e setup

(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

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)

Event Timeline