> Op 21 mei 2014 om 16:33 heeft Thomas 'Mash Herbert <[email protected]> 
> het volgende geschreven:
> 
> 
> I am trying to tidy up my mu4e-refile-folder conditional and not quite sure 
> of the lisp for "or". Tried to find examples but nothing appears to work.
> 
> For example I would like a condition for matching multiples.
> 
> (setq mu4e-refile-folder
>      (lambda (msg)
>        (cond
>         ;; message refiling
>         ((mu4e-message-contact-field-matches msg :from (or "[email protected]" 
> "[email protected]")) "/cartoons")
>     ;; everything else refiles to /archive
>     (t "/archive"))))

or takes any number of arguments and returns the first one that doesn't 
evaluate to nil. In your case, that would be the string "[email protected]". So if 
you want to test multiple strings, you need to write an or-clause with a 
'mu4e-message-contact-field-matches' call for each string. 

A more convenient idiom in such cases is to use member:

(member <string-to-test> '("Tom" "Dick" "Harry"))

But you'd need a different function than mu4e-message-contact-field-matches for 
that...

HTH

Joost



Verstuurd vanaf mijn iPhone

-- 
You received this message because you are subscribed to the Google Groups 
"mu-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to