all repos — nixfiles @ 11714f9162eb12273f1b241a2dad6ed4f6973385

System and user configuration, managed by nix and home-manager

Emacs: pick work context automatically on satoshipad
Alan Pearce alan@alanpearce.eu
Mon, 05 Aug 2019 16:44:50 +0200
commit

11714f9162eb12273f1b241a2dad6ed4f6973385

parent

e275653231e711a4ede34babdb855913b6a80667

1 files changed, 4 insertions(+), 3 deletions(-)

jump to
M emacs/.emacs.d/main.elemacs/.emacs.d/main.el
@@ -653,9 +653,10 @@ (setq mu4e-contexts (list                                  (make-mu4e-context
                                   :name "SatoshiPay"
                                   :match-func (lambda (msg)
-                                                (when msg
-                                                  (mu4e-message-contact-field-matches
-                                                   msg :to "alan@satoshipay.io")))
+                                                (if msg
+                                                    (mu4e-message-contact-field-matches
+                                                     msg :to "alan@satoshipay.io")
+                                                  (string-equal system-name "satoshipad")))
                                   :vars '((user-mail-address . "alan@satoshipay.io")
                                           (mu4e-sent-messages-behavior . 'delete)
                                           (mu4e-drafts-folder . "/satoshipay/Drafts")