From 86e1b50e0491b1047e3c0484ef7aad7a02019b67 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 9 Dec 2015 17:00:19 +0100 Subject: Emacs: Start server when idle --- tag-emacs/emacs.d/init.org | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 1b7a03e9..0e062f56 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -2428,11 +2428,12 @@ the =org=-document after changes. Start a server if possible. A daemon is already a server. #+BEGIN_SRC emacs-lisp - (unless (daemonp) - (require 'server) - (if (server-running-p server-name) - (message "Server already appears to be running") - (server-start))) + (run-with-idle-timer 2 nil (lambda () + (unless (daemonp) + (require 'server) + (if (server-running-p server-name) + (message "Server already appears to be running") + (server-start))))) (benchmark-init/deactivate) (setq gc-cons-threshold 800000) #+END_SRC -- cgit 1.4.1