Emacs: Start server when idle
Alan Pearce alan.pearce@spotcap.com
Wed, 09 Dec 2015 17:00:19 +0100
1 files changed, 6 insertions(+), 5 deletions(-)
jump to
M tag-emacs/emacs.d/init.org → tag-emacs/emacs.d/init.org
@@ -2428,11 +2428,12 @@ * End 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