2014-05-21 16:33 GMT+02:00 Thomas 'Mash Herbert <[email protected]>:
> > 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")))) > > Any help? > > Also how would I implement an "or" for the :from and :to ... > > (mu4e-message-contact-field-matches msg (or :from :to) (... > I'm using this: (setq mu4e-refile-folder (lambda (msg) (cond ;; message refilling according to to or cc ((or (mu4e-message-contact-field-matches msg :cc "something.com") (mu4e-message-contact-field-matches msg :to "something.com")) "/something") ((or (mu4e-message-contact-field-matches msg :cc "test.cz") (mu4e-message-contact-field-matches msg :to "test.cz") (mu4e-message-contact-field-matches msg :cc "tests.cz") (mu4e-message-contact-field-matches msg :to "tests.cz")) "/test") ((or (mu4e-message-contact-field-matches msg :cc "somedomain.com") (mu4e-message-contact-field-matches msg :to "somedomain.com") (mu4e-message-contact-field-matches msg :from "somedomain.com") (mu4e-message-contact-field-matches msg :from " [email protected]")) "/somedomain") -- 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.
