From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matthew Leach Newsgroups: gmane.emacs.bugs 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 Message-ID: <878td6u7vk.fsf@mattleach.net> References: <87popclj82.fsf@yandex.ru> <83608d80vy.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1515527706 21292 195.159.176.226 (9 Jan 2018 19:55:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 Jan 2018 19:55:06 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 24218@debbugs.gnu.org, lomov.vl@gmail.com, Paul Eggert To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 09 20:55:01 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYzz0-0004Xb-3x for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jan 2018 20:54:50 +0100 Original-Received: from localhost ([::1]:44265 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZ00z-00042i-Hu for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jan 2018 14:56:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZ00E-0003ba-2q for bug-gnu-emacs@gnu.org; Tue, 09 Jan 2018 14:56:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZ00A-0000PX-Q7 for bug-gnu-emacs@gnu.org; Tue, 09 Jan 2018 14:56:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42032) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZ00A-0000PR-LZ for bug-gnu-emacs@gnu.org; Tue, 09 Jan 2018 14:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eZ00A-0007K3-Dr for bug-gnu-emacs@gnu.org; Tue, 09 Jan 2018 14:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Matthew Leach Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jan 2018 19:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24218-submit@debbugs.gnu.org id=B24218.151552771827842 (code B ref 24218); Tue, 09 Jan 2018 19:56:02 +0000 Original-Received: (at 24218) by debbugs.gnu.org; 9 Jan 2018 19:55:18 +0000 Original-Received: from localhost ([127.0.0.1]:49929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYzzS-0007Ex-IH for submit@debbugs.gnu.org; Tue, 09 Jan 2018 14:55:18 -0500 Original-Received: from mx0.mattleach.net ([176.58.118.143]:33012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYzzP-0007ES-Tq for 24218@debbugs.gnu.org; Tue, 09 Jan 2018 14:55:16 -0500 Original-Received: by mx0.mattleach.net (Postfix, from userid 99) id 1B8A36270B; Tue, 9 Jan 2018 19:55:15 +0000 (GMT) Original-Received: from matt-desktop.mattleach.net (unknown [IPv6:2a02:c7f:bc21:2100:3530:5f1b:917c:3899]) by mx0.mattleach.net (Postfix) with ESMTPSA id 683F561CCF; Tue, 9 Jan 2018 19:55:09 +0000 (GMT) In-Reply-To: <83608d80vy.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 08 Jan 2018 05:50:25 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141946 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Paul Eggert >> Date: Sun, 7 Jan 2018 13:55:04 -0800 >> Cc: 24218@debbugs.gnu.org, Vladimir Lomov >> >> 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Update-server-name-version-tag-and-document-sockname.patch >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 --=-=-=--