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.help Subject: Re: Issue with remote async processes. Date: Tue, 29 Mar 2022 19:45:02 +0200 Message-ID: <87v8vw8xgh.fsf@gmx.de> References: <20220324222414.6k5cj2ovxfnpozwr.ref@Ergus> <20220324222414.6k5cj2ovxfnpozwr@Ergus> <87y20yif6s.fsf@gmx.de> <20220326194813.r33vff2a3z7zcjnd@Ergus> <87fsn3hnaq.fsf@gmx.de> <20220327204619.xs7rz54ny4us3j5t@Ergus> <87lewufngz.fsf@gmx.de> <20220328164729.ksbpk6j3urc76b35@Ergus> <87h77hdto5.fsf@gmx.de> <20220329114638.zc52ougvmaej4cvm@Ergus> 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="34657"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Ergus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 29 19:49:22 2022 Return-path: Envelope-to: geh-help-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 1nZFy5-0008tP-LV for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 29 Mar 2022 19:49:21 +0200 Original-Received: from localhost ([::1]:33864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZFy4-0005qh-2C for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 29 Mar 2022 13:49:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZFu5-0005o9-CO for help-gnu-emacs@gnu.org; Tue, 29 Mar 2022 13:45:15 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:55937) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZFu3-0005zh-KA for help-gnu-emacs@gnu.org; Tue, 29 Mar 2022 13:45:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648575903; bh=LW3r2GnTQ0ecy0sJbVXsoN4s3h5omJeolbSVC12KUqY=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=PXQksH/Bvr6e28u7U+yg4sn5QbRfF69cWF8oaa6rGSH/uiiirfIxzO9WjPyqEDYIB 3wEy5JOm0ILMJ4BgNLMYb8n6hBck0KbniVPowzl2OYSVBpddrbEl5DE7zye/xcAx1B 0LD1oUaTWvkPGhlXFfc0jeqhAYYEHi71v3moWpbc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.156.255]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mf0BM-1oEfS91n3a-00gW3t; Tue, 29 Mar 2022 19:45:03 +0200 In-Reply-To: <20220329114638.zc52ougvmaej4cvm@Ergus> (Ergus's message of "Tue, 29 Mar 2022 13:46:38 +0200") X-Provags-ID: V03:K1:MScgmhb7mOFWpEj/r19FLe228TQXfVKIwxUrn9zMGuddVPtXCeE +IndOE6j2/jLF61UnHtfEc7ZYjOJfhRYEkiGYgLC0X1AIJdoGxp+9Zj8PvSo7A57je1VJ4e QwouRgVMLMMpFCz0Ea2W8T6VQkTAN7P6Y7+VtO6lxLE15VGwYLa/EbkMP4mYRBp8hzRa1hp zPN17pJco1074UX/zztiw== X-UI-Out-Filterresults: notjunk:1;V03:K0:aFJGt0g06jk=:7ZDqVCLw1qeAufYuuU37lQ R8nzPpBE79ACaSaSDFVk5rYq6kRW/clUwmIb20uzYKumU7uVyt3oxq51tgJFL0pFsjwxBe6UR DQD80YB+ciWCBUD1Jp3pxsvJiHXMea5xxdJChj/yH+BQTD6ws4SA0MdSGAnUeMIO8PpZC7dk2 v15kaBcdOwudB1BSEhaLU6V+SA4J/3rggZdpEwtw9ezhE7VqccxApssWUbpUloZ1BVKNFxqbt RC1HAnwMZ6JgKb7fq2gd5V3bihDaTbnGLHhpz6dJB66Qf6lympzhFLxteoZW4ZedmKuAQZ8vS trTdWXNCUXh8H0czXa6Jkat9EhQ3+rBpvW5L+KaDSr5UxWRkL1168m92BtW1KJD5RPQzmZPn6 XFZCV0KcmOkI5KX6fXTK4TCrL1kZZtysshB/OVAW9AyTRbPYSE3LC/YppSiDEkimmJzMY9gl4 nwqXwMZh9FGovY0nO4GRBnHEqKL5xsYXngvc+t0+S4xIGPXDwfWpIYcFPwPM6y+qAlIoyxq9n EFPTOBfBXeCusloKv9fdK6TVj4rBhaTART8BsWxC9svJGGHhTx0/4H/vTUOv4h3MmCxzg5Isy dzrTplbaFGT6eHNZRpJFca1uPSLhN5nRaHofZb/WOLwl5MLDCXtsppJpDIsu+I4vPrD0SwQoA qICPQ1W0BgoTh7VCWhb1C07Roz+liFZQpRL27cG/B/bSl0Nc3AP7CjE82jVeTiQ4MfHfhV0Kc gOpxqsKbF/uEXNLa3IeQwoThfgrzmhbrkY04xermkKt7ksZ4wKYrNYrgjRe/6U6jOLoR+GG5 Received-SPF: pass client-ip=212.227.15.19; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:136811 Archived-At: Ergus writes: > Hi: Hi, >>call-process is synchronous. Likely, you mean unification of >>make-process and start{-file}-process? Technically, it would be possible >>to obsolete start{-file}-process, make-process would be sufficient. But >>there's ton of packages in the wild using that, so it might create more >>trouble than it is worth for. >> > With the obsoletion policies in emacs you will have the function with > the obsolete warning for the next 10 years probably... The packages that > don't update during that time, probably may need to be removed too > because that means they are abandoned. 10 years would be too long for me. No idea, whether I'll still use Emacs then :-) >>These days, writing new code, I would simply use make-process, that's it. >> > How do you use find-file-name-handler then? Just with :file-handler t? Yes. >>> The remote may unify process-file with call-process families >> >>Not so simple. There is a reason for call-process: a guarantee that it is >>executed always locally, whatever default-directory. >> > Couldn't that be solved with the variable? I called it remote, but may > call it `local` instead... so when local not-nil guarantees... But the > idea is the same... > > You could even reuse the file-handler parameter for example?? We've discussed this decades ago, when process-file was invented. The agreement was not to touch packages which use call-process for a reason, even an additional customization of a variable would be too much. Here we are ... >>> That may reduce the 4 functions to a single one... >> >>I don't believe it will work. But perhaps we could at least bring the >>arguments of the local process functions and the remote process >>functions in line, at least for the stdout and stderr handling. >> > Please... Hmm. Let's see. No promise! >>It would be easy to add another property >>remote-command which would keep a list of the program and its arguments. >> > Please... ;) I've implemented this, pushed to master. The Tramp manual got a new subsection: --8<---------------cut here---------------start------------->8--- 5.6.8 Process properties of asynchronous remote processes --------------------------------------------------------- When available, TRAMP adds process properties to process objects of asynchronous properties. However, it is not guaranteed that all these properties are set. =E2=80=A2 =E2=80=98remote-tty=E2=80=99 This is the name of the terminal a PROCESS uses on the remote host, i.e., it reads and writes on. =E2=80=A2 =E2=80=98remote-pid=E2=80=99 The process id of the command executed on the remote host. This is used when sending signals remotely. =E2=80=A2 =E2=80=98remote-command=E2=80=99 The remote command which has been invoked via =E2=80=98make-process=E2= =80=99 or =E2=80=98start-file-process=E2=80=99, a list of strings (program and i= ts arguments). This does not show the additional shell sugar TRAMP makes around the commands, in order to see this you must inspect TRAMP *note traces: Traces and Profiles. --8<---------------cut here---------------end--------------->8--- Best regards, Michael.