From 26d4f755f47a329f5f29ccaa4a5077914d1ae33e Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 24 Oct 2022 12:19:17 +0200 Subject: emacs: only clean the email on my workstation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- .doom.d/config.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.doom.d/config.el b/.doom.d/config.el index 77ab01f..b32fbd2 100644 --- a/.doom.d/config.el +++ b/.doom.d/config.el @@ -10,6 +10,13 @@ (setq user-full-name "Miquel Sabaté Solà" user-mail-address "mikisabate@gmail.com") +;;; General utility functions. + +(defun mssola/workstation-p () + "Returns true if the current machine is my workstation." + + (string= (system-name) "freezeezy")) + ;;; General ;; Bindings for managing windows, buffers, etc. @@ -356,7 +363,11 @@ littering will happen locally." ;; This is the only hook that `mu4e' allows us to actually do something around ;; fetching emails. Let's clean the environment before anything, which should be ;; fine for stupid maildirs such as 'ajuntament'. -(add-hook 'mu4e-update-pre-hook 'mssola/clean-email-env) +;; +;; NOTE: this is only done for my workstation. For other machines this is not so +;; relevant. +(when (mssola/workstation-p) + (add-hook 'mu4e-update-pre-hook 'mssola/clean-email-env)) ;; And a binding! (map! "C-c m" #'mu4e) -- cgit v1.2.3