From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#66667: [PATCH] Socket forwarding in emacsclient --tramp-prefix example Date: Sun, 22 Oct 2023 09:43:20 +0200 Message-ID: <87pm17rtk7.fsf@gmx.de> References: <20231021150127.66683-1-git@mavit.org.uk> <87v8azsyjs.fsf@gmx.de> <6f458d1e-a536-7b90-2027-077c9767677b@mavit.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15686"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66667@debbugs.gnu.org To: Peter Oliver Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 22 09:43:59 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1quT7v-0003sl-9F for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Oct 2023 09:43:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quT7Z-0008Qz-F5; Sun, 22 Oct 2023 03:43:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quT7X-0008Ql-3s for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2023 03:43:35 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1quT7W-0001qY-Rw for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2023 03:43:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quT7y-0005c7-Jj for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2023 03:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Oct 2023 07:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66667 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66667-submit@debbugs.gnu.org id=B66667.169796064221575 (code B ref 66667); Sun, 22 Oct 2023 07:44:02 +0000 Original-Received: (at 66667) by debbugs.gnu.org; 22 Oct 2023 07:44:02 +0000 Original-Received: from localhost ([127.0.0.1]:45426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quT7x-0005bl-Ja for submit@debbugs.gnu.org; Sun, 22 Oct 2023 03:44:01 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:57275) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quT7s-0005bU-AM for 66667@debbugs.gnu.org; Sun, 22 Oct 2023 03:43:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1697960601; x=1698565401; i=michael.albinus@gmx.de; bh=d8rkONupqklBbERh2sf1af9aPYm6Jp4SPjiKz34QqZU=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=JNTP+3L3OnYM1WjpWLAiacPpW7nRKjIfLkF76e8QQVUHg3p6rd82BFsOqPrFe+jy knMvP/sTSYQy5JZRq/E5vPgQux+77PV3o3xi/+CXfcjA/iykcwE0XwpV3/dQ6gHkp tgxO/Uo7HMsTlOuUTjPP3Yuc4M+6vcpQg8jGoTNDQa7HOvkWlC+w5BdDuz9hSOjaD Z3jTjy9DFdpeZrsEyM+O1mpcfwD8WI9u4L4vsCWWvoBTgVdYuCBgU3yv/odbRQJZ/ kgOturDOJNMhbREPaVaXO47DQWFHBenLg+p1k5FRpijeVv4h2fYaQAVj/wnwLaAO7 xDHSuRUuraMtzelU7g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.30]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N6KYl-1raMSn4BrN-016iFs; Sun, 22 Oct 2023 09:43:21 +0200 In-Reply-To: <6f458d1e-a536-7b90-2027-077c9767677b@mavit.org.uk> (Peter Oliver's message of "Sat, 21 Oct 2023 20:28:17 +0100 (BST)") X-Provags-ID: V03:K1:blVHK5//n/CFQGARFOLszJcHDu0ZMLullenRDz5VC1PK/fliS3D XmFAVCJdpKfS7NYZYbWHZ6agjD6beoA+wwNyWxCIRhoJ6VYoxHpnrarIQdn6sDLV6QC1TVA 7X5q/fVPj+dfj0J4PdYHLtpIb08dqaTr5bL7vik7WWob5QOZc9ZYdC/PepfeJwprXouwfxu 7tDXMLx7514M5+XipF3fA== UI-OutboundReport: notjunk:1;M01:P0:AqF3sfPvyho=;Ig1Y5kDoNSy2+Dn3ZiTyMlYLjuT dgghB3WSsOY5HU4dQCJOaBQagkSOq9pqnQfYElb9LZ0zYyWCmjYw2RK3PGCrw5EXuWhZA6lw/ 6zOm8h5trW7GTPAAtI0PYdy0s999qXchxbUwc4onfvGI/g3jRmqM6u3NHKcmGk1lV0O6i5I70 elBTxojgaANEG3sTamWmOTqhdSHavywLlLtzf5W5McjWw+eFWE2Svx0uyua+bJwTIpxCRE8BG 2MC5KPArJevMIZApiiBljyeMLPm8iW8CBK8t0J5J6yqnl55cJutHUtwqrMIoYQSjxNdkj0YT8 r3dFjgnBsT2AoT5TsUtzYarEuGNLwS3SCDXBXL4gMbnbNPB99xU2qtHJsITpL9/YJdlSFNZUU aDgxd199s4e/Tmj3Tn8WdlfwyNBKAIYM4pY/fMROYkd9jIC3jIm8roGu0yt+R+pVTDNGyeO3+ icoucdpM4ela9uRJN3XdLzlcGhJnBdCcw9efUcOgxW72Uk3nQInj+i/r2rJjNaZDJK/z2wBfg w9xCAtLhteQtcqAp6TXx42pW8R3PczrZ+EwbJKiilfc0DQrX35rF0hqbGYWkdfmA0RieyS9Gq Uv906MuHaOzNsdh3SJaVaKmYEBbvTkBHmXtklA+5kpzNIMx7b5OZ0cPsNvijPp5X2l1m80Mio dkOt6IPvWQ9OI5WczHgYiGcdFpJ4ZI+y2cMOm/P1csRua7HesXD78Mn4x4bQbUAGUJrSQKomO O1Mg/Wcg5Xew5kC4NaeNmEqwZWlIauBw3Zs/R5vm3tjDhNiSmaThySX+b2IEd0X73GfY4CUJ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272963 Archived-At: Peter Oliver writes: Hi Peter, > So, I=E2=80=99m not certain that one and a half examples is better than o= ne complete example, but, anyway, here=E2=80=99s 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=3D"emacsclient \ > - --server-file=3Dserver \ > - --tramp=3D/ssh:remote:" > +remote$ export EMACSCLIENT_TRAMP=3D/ssh:remote: > +remote$ export EDITOR=3Demacsclient Here we need also remote$ export EMACS_SERVER_FILE=3Dserver 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.