From 5dc51350e7e744f26236e0018112d2eed2dbcc93 Mon Sep 17 00:00:00 2001 From: Matthew Leach Date: Tue, 9 Jan 2018 19:45:30 +0000 Subject: [PATCH] Update `server-name' :version tag and document sockname support * lisp/server.el: (server-name): Update :version tag. * etc/NEWS: Document that `server-name' and `server-socket-dir' automatically update. * doc/misc.texi: (Emacs Server): Likewise. --- doc/emacs/misc.texi | 5 +++++ etc/NEWS | 3 +++ lisp/server.el | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 633e1e881d..c9b8f08252 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -1654,6 +1654,11 @@ Emacs Server @samp{foo}. The @code{emacsclient} program can specify a server by name, using the @samp{-s} option (@pxref{emacsclient Options}). + If Emacs is passed a socket by an external program --- for example +by systemd socket activation --- the value of @code{server-name} and +@code{server-socket-dir} is automatically updated to reflect the name +and path of the socket. + If you want to run multiple Emacs daemons (@pxref{Initial Options}), you can give each daemon its own server name like this: diff --git a/etc/NEWS b/etc/NEWS index f6f36dfc85..66cb0834c5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -194,6 +194,9 @@ as new-style, bind the new variable 'force-new-style-backquotes' to t. * Lisp Changes in Emacs 27.1 +** The `server-name' and `server-socket-dir' variables are set when a +socket has been pased to Emacs (Bug#24218). + ** Internal parsing commands now use syntax-ppss and disregard open-paren-in-column-0-is-defun-start. This affects mostly things like forward-comment, scan-sexps, and forward-sexp when parsing backward. diff --git a/lisp/server.el b/lisp/server.el index c867fde832..16b3f8e4e2 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -266,7 +266,7 @@ server-name changed while a server is running." :group 'server :type 'string - :version "23.1") + :version "27.1") ;; We do not use `temporary-file-directory' here, because emacsclient ;; does not read the init file. -- 2.15.1