unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: kris <cq.personal@gmail.com>
Cc: 33934@debbugs.gnu.org
Subject: bug#33934: 26.1; server.el/emacsclient mismatch regarding socket...
Date: Mon, 31 Dec 2018 16:59:21 +0200	[thread overview]
Message-ID: <83o9914u9i.fsf@gnu.org> (raw)
In-Reply-To: <CACTzTFA5eFuL_qQeD6J9DctWntPHzq0GgynotQxROPm9BdarRQ@mail.gmail.com> (message from kris on Mon, 31 Dec 2018 03:02:22 +0100)

> From: kris <cq.personal@gmail.com>
> 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.





      parent reply	other threads:[~2018-12-31 14:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-31  2:02 bug#33934: 26.1; server.el/emacsclient mismatch regarding socket kris
2018-12-31  5:25 ` Phil Sainty
2018-12-31 15:05   ` Eli Zaretskii
     [not found]     ` <CACTzTFDCNDdRePDdeun=gX9+V8k=AtrZio4U3y=9n9wQGF-ZDw@mail.gmail.com>
2019-01-04 13:58       ` Eli Zaretskii
2018-12-31 14:59 ` Eli Zaretskii [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83o9914u9i.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=33934@debbugs.gnu.org \
    --cc=cq.personal@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).