Add editorial context for mu4e

master
Jacopo De Simoi 1 year ago
parent 781dd8b9e8
commit 11e0175092
  1. 27
      global.org

@ -958,9 +958,8 @@
:key ?i)) :key ?i))
#+end_src #+end_src
Customize ~mu4e~ context Customize ~mu4e~ contexts
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq mu4e-contexts (setq mu4e-contexts
`( ,(make-mu4e-context `( ,(make-mu4e-context
:name "Work" :name "Work"
@ -969,7 +968,7 @@
;; we match based on the maildir of the message ;; we match based on the maildir of the message
:match-func (lambda (msg) :match-func (lambda (msg)
(when msg (when msg
(string-match-p "^/math" (mu4e-message-field (string-match-p "^/math/INBOX" (mu4e-message-field
msg :maildir)))) msg :maildir))))
:vars '( ( user-mail-address . "jacopods@math.utoronto.ca" ) :vars '( ( user-mail-address . "jacopods@math.utoronto.ca" )
( user-full-name . "Jacopo De Simoi" ) ( user-full-name . "Jacopo De Simoi" )
@ -981,6 +980,28 @@
( smtpmail-smtp-service . 587 ) ( smtpmail-smtp-service . 587 )
( mu4e-compose-signature . (concat ( mu4e-compose-signature . (concat
"Jacopo De Simoi (he · him)\n" "Jacopo De Simoi (he · him)\n"
"Professor · U Toronto\n"))))
,(make-mu4e-context
:name "CMP Editor"
:enter-func (lambda () (mu4e-message "Switch to the CMP Editor context"))
:leave-func (lambda () (mu4e-message "Leave the CMP Editor context"))
;; we match based on the maildir of the message
:match-func (lambda (msg)
(when msg
(string-match-p "^/math/editorial.CMP" (mu4e-message-field
msg :maildir))))
:vars '( ( user-mail-address . "jacopods@math.utoronto.ca" )
( user-full-name . "Jacopo De Simoi" )
( mu4e-sent-folder . "/math/Sent")
( mu4e-drafts-folder . "/math/Drafts")
( mu4e-trash-folder . "/math/Trash")
( mu4e-refile-folder . "/math/editorial.CMP.Archive")
( smtpmail-stream-type . starttls )
( smtpmail-smtp-service . 587 )
( mu4e-compose-signature . (concat
"Jacopo De Simoi (he · him)\n"
"Associate Editor for CMP\n"
"Professor · U Toronto\n")))))) "Professor · U Toronto\n"))))))
;; set `mu4e-context-policy` and `mu4e-compose-policy` to tweak when mu4e should ;; set `mu4e-context-policy` and `mu4e-compose-policy` to tweak when mu4e should

Loading…
Cancel
Save