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.
This commit is contained in:
Laurens Miers 2023-04-18 22:35:18 +02:00
parent 65a0a832b4
commit e17468eece

View file

@ -1207,8 +1207,12 @@ The audible bell is annoying AF.
Emacs as a server. Emacs as a server.
Emacsclient will then use this emacs as its 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 #+BEGIN_SRC emacs-lisp
(server-start) (require 'server)
(unless (server-running-p)
(server-start))
#+END_SRC #+END_SRC
* Beacon * Beacon