mirror of https://github.com/djcb/mu.git
Add example of matching maildir and its sub-directories in contexts
Inspired by this mu-discuss thread: https://groups.google.com/d/msg/mu-discuss/rAT2YJPEwsA/eYmoGJbUCgAJ
This commit is contained in:
parent
ea40939810
commit
195b91a3db
|
@ -2508,11 +2508,11 @@ when starting; see the discussion in the previous section.
|
||||||
:name "Work"
|
:name "Work"
|
||||||
:enter-func (lambda () (mu4e-message "Switch to the Work context"))
|
:enter-func (lambda () (mu4e-message "Switch to the Work context"))
|
||||||
;; no leave-func
|
;; no leave-func
|
||||||
;; we match based on the contact-fields of the message
|
;; we match based on the maildir of the message
|
||||||
|
;; this matches maildir /Arkham and its sub-directories
|
||||||
:match-func (lambda (msg)
|
:match-func (lambda (msg)
|
||||||
(when msg
|
(when msg
|
||||||
(mu4e-message-contact-field-matches msg
|
(string-match-p "^/Arkham" (mu4e-message-field msg :maildir))))
|
||||||
:to "aderleth@@miskatonic.example.com")))
|
|
||||||
:vars '( ( user-mail-address . "aderleth@@miskatonic.example.com" )
|
:vars '( ( user-mail-address . "aderleth@@miskatonic.example.com" )
|
||||||
( user-full-name . "Alice Derleth" )
|
( user-full-name . "Alice Derleth" )
|
||||||
( mu4e-compose-signature .
|
( mu4e-compose-signature .
|
||||||
|
|
Loading…
Reference in New Issue