Subject: Re: bug#66667: [PATCH] Socket forwarding in emacsclient --tramp-prefix example

From: Michael Albinus <[email-masked]>
Date: Sun, 22 Oct 2023 09:43:20 +0200

Peter Oliver <[email-masked]> writes:

Hi Peter,

> So, I’m not certain that one and a half examples is better than one complete example, but, anyway, here’s an updated patch.

Thanks. LGTM, just two nits:

> +If you are using a platform that does not have Unix domain sockets
> +(i.e., MS-Windows), or SSH implementations that are not able to

I'm not sure whether MS-Windows supports UNIX domain sockets or not. Eli
might know this.

> +forward them (e.g., OpenSSH before version 6.7), you can forward a TCP
> +port instead.  In this example, assume that the local Emacs listens on
> +tcp port 12345.  Assume further that
>  @file{/home} is on a shared file system, so that the server file
>  @file{~/.emacs.d/server/server} is readable on both hosts.
>
>  @example
>  local$ ssh -R12345:localhost:12345 remote
> -remote$ export EDITOR="emacsclient \
> -        --server-file=server \
> -        --tramp=/ssh:remote:"
> +remote$ export EMACSCLIENT_TRAMP=/ssh:remote:
> +remote$ export EDITOR=emacsclient

Here we need also

remote$ export EMACS_SERVER_FILE=server

Otherwise, the "Implicit local socket" rule comes to play, see
set_socket in emacsclient.c.

Otherwise, it is fine. Eli, can we still install it in the emacs-29 branch?

And another question. You have already contributed to Emacs. That
contribution, and your proposed changes here and in bug#66598 bring you
close to the limit of changes (~15 lines), which are accepted without
formal paperwork. In order to make further contributions from you
possible: would you like to assign the copyright of your future
contributions to the Free Software Foundation?

> Peter Oliver

Best regards, Michael.