From e53ff468c242ba4db93502b5eac2b0eb28ae1654 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 31 Oct 2022 08:43:56 -0700 Subject: add spw/on-host-primary-p --- .emacs.d/init.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index f93c1b1d..4bb24694 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -528,6 +528,9 @@ that's something we can determine.") ;; If HOST looks like an FQDN, require that `spw/fqdn' is non-nil and equal. (string= host (if (cl-find ?. host) spw/fqdn (system-name)))) +(defun spw/on-host-primary-p (host) + (and (eq (daemonp) t) (spw/on-host-p host))) + ;; This is a combination of the two `transient-cycles-define-commands' forms ;; for `transient-cycles-buffer-siblings-mode'. We could factor this out of ;; those and make it part of the library's API, but currently those two forms @@ -3495,7 +3498,7 @@ mutt's review view, after exiting EDITOR." (dolist (process (rcirc-process-list)) (rcirc-send-string process "AWAY :"))))) -(when (spw/on-host-p "athena.silentflame.com") +(when (spw/on-host-primary-p "athena.silentflame.com") (defvar spw/irc-autoaway-timer (progn (load (expand-file-name "irc-init" user-emacs-directory)) (irc nil) @@ -3536,7 +3539,7 @@ mutt's review view, after exiting EDITOR." (kill-buffer) (delete-file "~/local/irclogs/mail.log.tmp"))))) -(when (spw/on-host-p "athena.silentflame.com") +(when (spw/on-host-primary-p "athena.silentflame.com") (defvar spw/rcirc-mail-hilights-timer (run-at-time t 21600 #'spw/rcirc-mail-hilights))) @@ -4751,7 +4754,7 @@ We don't use the FILES parameter in the entry for \"d\" in ;; Use HTML not plain text primarily so that links are more readable. (org-agenda-write "~/local/diary-export.html")))) -(when (spw/on-host-p "athena.silentflame.com") +(when (spw/on-host-primary-p "athena.silentflame.com") ;; Update the web view every four hours. (defvar spw/export-diary-web-view-timer (run-at-time t 14400 #'spw/export-diary-web-view))) -- cgit v1.2.3