From e17468eece3a104667faf0c364c51df9a55edf3e Mon Sep 17 00:00:00 2001 From: Laurens Miers Date: Tue, 18 Apr 2023 22:35:18 +0200 Subject: [PATCH] fix: test if server is already running If server is already running, we get a warning/error when starting. Test if it is running before we actually start it. It's not really 100% proof: https://lists.gnu.org/archive/html/bug-gnu-emacs/2018-06/msg00720.html But it works for me, so don't ask questions. --- config.org | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config.org b/config.org index 6c6a97f..8e64567 100644 --- a/config.org +++ b/config.org @@ -1207,8 +1207,12 @@ The audible bell is annoying AF. Emacs as a server. Emacsclient will then use this emacs as its server. +Use server-running-p to test if it is already running. + #+BEGIN_SRC emacs-lisp -(server-start) +(require 'server) +(unless (server-running-p) + (server-start)) #+END_SRC * Beacon