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 10:55:38 +0200 Message-ID: <87h77hdto5.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14903"; 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 10:56:53 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 1nZ7em-0003lI-L6 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 29 Mar 2022 10:56:52 +0200 Original-Received: from localhost ([::1]:58536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZ7el-0003Rb-8S for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 29 Mar 2022 04:56:51 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZ7dg-0003QX-Bl for help-gnu-emacs@gnu.org; Tue, 29 Mar 2022 04:55:44 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:36601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZ7de-000216-Dl for help-gnu-emacs@gnu.org; Tue, 29 Mar 2022 04:55:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648544139; bh=Ln5fUDqxJEQ+Z5q2FTeebxMonSPPgfbZJgfe23FabbE=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date; b=AE8lnask+P0tEIrfSUZxaUwfqjfcPlJO2ItHQO+zSZ5Z4qOH6nFt18yUvTfLiCiOM TX6H6OQ+INKpqrxqW8rRQx7W8Bf+c4QHBJd7BREZ4LFjZpVzI/nd2etlK90piNnPZP AGHBhxBgSIXfQX4j/LBnGFVY5NWtjc9xZeo7d8GY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.156.255]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MO9z7-1nOKx803cP-00OX4U; Tue, 29 Mar 2022 10:55:39 +0200 X-Provags-ID: V03:K1:aO178TmElXKAg4ySAFEsISrUO/oVmI8GQRhPpAWTDUcPC/Cs7T1 pOabdmza8VFawiGx3UBXNOPcTDBNaS+uW1GereAqJg01nzVJ5V8BPXfwpLtJnyQML5xt2An HC4yVoeJWtY0JxPVoNuuNshTaUsWoJ4lqQy/64vRC/SbfC2+H/l5OCmVU123IXSHay5vv6N 1kzlETtjqVyXFW/wZ6OIw== X-UI-Out-Filterresults: notjunk:1;V03:K0:mpFNSRHOYmg=:NRUFYCDXe+darKyWUgVy0h b3fcz+BSAjI+k0Uvlp8YWysHZXlRBalWgJh8PeP7av5vTQqs23fgj23D2Xr3vU3XrKmlsWaM6 /MO0Tc8+RO01+5kG1/MD27rNvy4SXehR4/9GUl8j1qqRbcVwGCbYaMif/ANXOrhhUGWH0HUtd Byd+gAT24ZjZiIKkt3fo0IpdDc6NUL3lhL/STvyrlUx0Y6sIRTpfBVASlPjcAW/MuVUsIcbpR m5yz7qr7Df5egNCZOOLInZFYMU6yAjf94P3hbxpwRFpaQSNgNrVAWgnG4V4ttoCjt5+uSDRYI pAgToqbObfRMVL9S+WDutxsZPg+0m7h+nIkr9TyannThnVBn2Wj1PSRYNMxV+bPpYS6RinZoY fdxKa0CflVlmPTnBxs9A+m0aD/Krz+6JYF0kh+kCNQtp6TmSyXI4sBfO0qE1OMJRtgYuurRBt /Ab9JetFAk+7uFyDfpB/uuOuAelNl4sOBFQpHdznQ7mIohUCGkPWVbecNkR2c8cH8B51MrmuB jMqAizeoDePrprMvG/rIZjAiyD5afJwg2IY3bM92q//tW27ubNbHgg5Goz9cGHcIO8KaDiAXb Nds36LVvdbjxV0mJe+/X/qJOw7mDzUad7TZKzWWbwgtz+vYARZ/1qaDNLU5VYtycIIuXt7XUc jWEr23Utj3K4B2LdT72JkQcpkxm+uvGIL+S4jl6O3HflDHjzPafnqDAQ/po+pCaCTkB0LT0HT umEXEzDGGxHuSgkO0HuwfsEx5lb9wk/3pRAxU2LamqcB6FgDSyXk3rJbZOvEAE0qrxvDljzY Received-SPF: pass client-ip=212.227.17.22; 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:136808 Archived-At: Ergus writes: Hi, > So far I have complains with the emacs process API, there are many > function sometimes redundant and with confusing similar names, some of > them are only available for one specific case (like process-lines*, > which is available as a wrapper of call-process but not for the > process-file case considering if there is a find-file-name-handler)... It is just history ... > I would actually expect a simpler function interface with two extra > parameters (remote async). > > The async may unify make-process and call-process families 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. These days, writing new code, I would simply use make-process, that's it. > 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. > 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. > An extra comment: > > (process-command process) always returns `/bin/sh -i` when the process > was executed remotely. I understand the reasons, but I am not sure if > this is intended... I mean, I am interested in the real executed command > when it failed for example. (either the complete one or the one passed > to start-file-process) > > Is there a way to retrieve the full command like when the process > executed locally?? Not yet (you must look into the Tramp traces). Maybe you write a wishlist bug report? Tramp adds already the remote-pid and remote-tty properties to process objects. It would be easy to add another property remote-command which would keep a list of the program and its arguments. > Again, thanks in advance, Ergus Best regards, Michael.