From: Matthew Leach <matthew@mattleach.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 24218@debbugs.gnu.org, lomov.vl@gmail.com,
Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#24218: 25.1.50; server-name, server-socket-dir and daemon start through, systemd socket
Date: Tue, 09 Jan 2018 19:53:03 +0000 [thread overview]
Message-ID: <878td6u7vk.fsf@mattleach.net> (raw)
In-Reply-To: <83608d80vy.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 08 Jan 2018 05:50:25 +0200")
[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Paul Eggert <eggert@cs.ucla.edu>
>> Date: Sun, 7 Jan 2018 13:55:04 -0800
>> Cc: 24218@debbugs.gnu.org, Vladimir Lomov <lomov.vl@gmail.com>
>>
>> Matthew proposed a patch for this here:
>>
>> https://lists.gnu.org/r/emacs-devel/2017-12/msg00903.html
>>
>> which I am attaching in git form (see first attached patch). I also
>> propose the second attached patch as a followup. It makes some of the
>> newly-added features "private" (since they don't seem to be generally
>> useful) and moves the low-level initialization code from emacs.c to
>> process.c which is a more-natural home for it.
Thanks for the cleanup patch Paul!
>
> Thanks. I'm not an expert on this stuff, so I have only minor
> comments:
>
> . Please update the :version tag of server-name, to reflect the fact
> that its default value changes
> . This needs a NEWS entry, and I think the description of
> server-name in the manual should be updated to mention this
> facility
Please see the attached patch that should address these points.
>
> . internal--external-sockname should be documented in the ELisp
> manual (a better name that doesn't use both "internal" and
> "external" will be appreciated)
May I suggest `internal--daemon-sockname'?
Thanks,
--
Matt
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Update-server-name-version-tag-and-document-sockname.patch --]
[-- Type: text/x-patch, Size: 2181 bytes --]
From 5dc51350e7e744f26236e0018112d2eed2dbcc93 Mon Sep 17 00:00:00 2001
From: Matthew Leach <matthew@mattleach.net>
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.
\f
* 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
next prev parent reply other threads:[~2018-01-09 19:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-13 16:35 bug#24218: 25.1.50; server-name, server-socket-dir and daemon start through systemd socket Vladimir Lomov
2016-08-15 2:25 ` Paul Eggert
2018-01-07 21:55 ` bug#24218: 25.1.50; server-name, server-socket-dir and daemon start through, " Paul Eggert
2018-01-08 3:50 ` Eli Zaretskii
2018-01-08 4:24 ` Paul Eggert
2018-01-08 18:33 ` Eli Zaretskii
2018-01-08 18:42 ` Paul Eggert
2018-01-08 19:14 ` Eli Zaretskii
2018-01-08 19:23 ` Paul Eggert
2018-01-09 19:53 ` Matthew Leach [this message]
2018-01-24 23:00 ` Paul Eggert
2018-01-25 19:34 ` Matthew Leach
2018-02-10 16:07 ` Paul Eggert
2018-02-12 14:24 ` Matthew Leach
2018-02-12 20:58 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878td6u7vk.fsf@mattleach.net \
--to=matthew@mattleach.net \
--cc=24218@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
--cc=lomov.vl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.