Merge pull request #1034 from jschwab/docs-context-maildir

doc: Add example of matching maildir and its sub-directories in contexts
This commit is contained in:
Dirk-Jan C. Binnema 2017-02-21 07:59:31 +02:00 committed by GitHub
commit f3aa51fbc1
1 changed files with 4 additions and 4 deletions

View File

@ -2508,11 +2508,11 @@ when starting; see the discussion in the previous section.
:name "Work"
:enter-func (lambda () (mu4e-message "Switch to the Work context"))
;; 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)
(when msg
(mu4e-message-contact-field-matches msg
:to "aderleth@@miskatonic.example.com")))
(when msg
(string-match-p "^/Arkham" (mu4e-message-field msg :maildir))))
:vars '( ( user-mail-address . "aderleth@@miskatonic.example.com" )
( user-full-name . "Alice Derleth" )
( mu4e-compose-signature .