From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.help Subject: Re: Issue with remote async processes. Date: Tue, 29 Mar 2022 13:46:38 +0200 Message-ID: <20220329114638.zc52ougvmaej4cvm@Ergus> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18697"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Michael Albinus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 29 13:52:24 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 1nZAOe-0004hn-Ng for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 29 Mar 2022 13:52:24 +0200 Original-Received: from localhost ([::1]:45122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZAOd-0000Lt-P3 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 29 Mar 2022 07:52:23 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZAJV-0004nP-Hp for help-gnu-emacs@gnu.org; Tue, 29 Mar 2022 07:47:10 -0400 Original-Received: from sonic304-9.consmr.mail.bf2.yahoo.com ([74.6.128.32]:44786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZAJQ-0004LU-1d for help-gnu-emacs@gnu.org; Tue, 29 Mar 2022 07:47:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1648554404; bh=cxAQIYYobd2H8Bop1Wf2dLfCqgB41QPYq7Si/SXYkXs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=Sdx891wnDoE2UM+HgvVvLtBGS4A/ooEO1d/COjKmGT7nl2MPdE6ciHyxtLWdN5mzaikU9k0rveACMTMd+o5Y+3ovaoMyCRo0mG0IHVWK9ep9cFjifEwINov2Z2TKmNwfzN9p3RHo4f8tA+PNWhptt3OjgT7tU9VjkvOzlh+ACQx6VZsCadfOGM34XZi+Qb8W1mMIdu6G8B4cUSDWJCi2aULR5TapjzXZGFUGS3+BapvM9rfbknTUS5WdxFhVtAPsSR+xhkSt+SaLLcT1zM0g82eSHJbUguzddPDUNLwBvXzZaEs5MfZ9qZGb6aiKnhhjkhptXDV71QIG6TXBjLVjFw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1648554404; bh=KL/ySyHFNTUUc2Aw51XUh0ibUdjK6XfTWNXg+w6PwQ1=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=dz59S+Qyrz76bFNssDa0cwxWlNNQsfAoljpM8ZkQPuIGT8QSygN50f9DfgsDeaXPUqig9oM9z5RZZAWsHv8KHHhGmxaECERNQN0gX9edPG6aBKdcYHF7qwwCZLmg1q4fjsyQ/jSZbzbfbYAuuy2QtUxBwigilOsEmTkAopObDXKdsJROVQep5VEakRwBMzyeCoKQhlKc516RXhJIAHwr61e9W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r.mail.bf2.yahoo.com with HTTP; Tue, 29 Mar 2022 11:46:44 +0000 Original-Received: by kubenode515.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID f70e37dc80e961466309e9441ffd660b; Tue, 29 Mar 2022 11:46:42 +0000 (UTC) Content-Disposition: inline In-Reply-To: <87h77hdto5.fsf@gmx.de> X-Mailer: WebService/1.1.19987 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.128.32; envelope-from=spacibba@aol.com; helo=sonic304-9.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:136810 Archived-At: Hi: I wonder about this because I find myself modifiying packages constantly to use them with tramp. On Tue, Mar 29, 2022 at 10:55:38AM +0200, Michael Albinus wrote: >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 ... > But from the practical point of view it is very confusing to keep this interface just because of this... >> 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. > 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. >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? >> 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?? >> 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... >> 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. > Please... ;) >> Again, thanks in advance, Ergus > >Best regards, Michael. >