From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33934: 26.1; server.el/emacsclient mismatch regarding socket... Date: Mon, 31 Dec 2018 16:59:21 +0200 Message-ID: <83o9914u9i.fsf@gnu.org> References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1546269363 29009 195.159.176.226 (31 Dec 2018 15:16:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 31 Dec 2018 15:16:03 +0000 (UTC) Cc: 33934@debbugs.gnu.org To: kris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 31 16:15:59 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 1gdzIM-0007Px-H8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Dec 2018 16:15:58 +0100 Original-Received: from localhost ([127.0.0.1]:51142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdzKT-0002B1-9A for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Dec 2018 10:18:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdz39-0008LO-43 for bug-gnu-emacs@gnu.org; Mon, 31 Dec 2018 10:00:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gdz2y-00075S-68 for bug-gnu-emacs@gnu.org; Mon, 31 Dec 2018 10:00:11 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50754) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gdz2w-00072t-N4 for bug-gnu-emacs@gnu.org; Mon, 31 Dec 2018 10:00:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gdz2w-0006Wo-DA for bug-gnu-emacs@gnu.org; Mon, 31 Dec 2018 10:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Dec 2018 15:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33934 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33934-submit@debbugs.gnu.org id=B33934.154626838625043 (code B ref 33934); Mon, 31 Dec 2018 15:00:02 +0000 Original-Received: (at 33934) by debbugs.gnu.org; 31 Dec 2018 14:59:46 +0000 Original-Received: from localhost ([127.0.0.1]:43559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdz2f-0006Vq-U3 for submit@debbugs.gnu.org; Mon, 31 Dec 2018 09:59:46 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48455) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdz2d-0006Vh-Hn for 33934@debbugs.gnu.org; Mon, 31 Dec 2018 09:59:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gdz2U-0006Cb-7R for 33934@debbugs.gnu.org; Mon, 31 Dec 2018 09:59:43 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdz2U-0006CL-3Q; Mon, 31 Dec 2018 09:59:34 -0500 Original-Received: from [176.228.60.248] (port=3510 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gdz2T-0006Ez-NM; Mon, 31 Dec 2018 09:59:34 -0500 In-reply-to: (message from kris on Mon, 31 Dec 2018 03:02:22 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:154052 Archived-At: > From: kris > Date: Mon, 31 Dec 2018 03:02:22 +0100 > > emacsclient has the -s option for specifying a UNIX socket directory > (emacslient -h says filename but it is a directory in the code - the bug > report!). > but server.el uses defvar to set server-socket-dir and there appears no > way to override it. > > I changed defvar to defcustom to continue. > this is useful for my use case of running separate emacs > processes per project directory in order to do file change monitoring > with emacsclient -e signalling the correct session. Can you explain how you arrived at the conclusion that -s names the directory of the socket file? My reading of the code is that it's indeed the name of the socket file, either with or without the leading directories. In the former case, the file is placed under a user-specific subdirectory of $TMPDIR; in the latter case, the file is placed where the leading directories specify. And the user option server-name in Emacs, which _is_ a defcustom, causes the server to do the same, depending on whether server-name includes leading directories. So it sounds to me like you could use a different server-name and argument to -s for each project, and get what you want without any changes, without ever needing to modify socket-dir. If I'm missing something, please point out what did I miss. Thanks.