Commit a59996b3cc7e

Vincent Demeester <vincent+git@demeester.fr>
2014-08-10 00:43:03
Start server if not running
1 parent a3eeb78
Changed files (1)
.emacs.d
.emacs.d/emacs.org
@@ -275,7 +275,6 @@
 (require-package 'powerline)
 (powerline-default-theme)
      #+end_src
-
 *** Behaviour
 
     First thing first, let's define a shortcuts for editing this configuration.
@@ -464,6 +463,23 @@
 
 
 **** TODO Evil
+*** Server mode
+
+Start a server in not already running. I usually start emacs as a
+daemon when at the start of the computer, but you never know =;-)=.
+
+
+#+BEGIN_SRC emacs-lisp
+  (unless (string= (user-login-name) "root")
+    (require 'server)
+    (when (or (not server-process)
+              (not (eq (process-status server-process)
+                       'listen)))
+      (unless (server-running-p server-name)
+        (server-start))))
+#+END_SRC
+
+
 ** TODO Modes
 *** TODO Prompts
 **** DONE ido