From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691) Date: Mon, 17 Dec 2018 20:30:02 +0100 Message-ID: <87k1k854ud.fsf@gmx.de> References: <20181216233936.208568-1-phst__21526.1563113474$1545003551$gmane$org@google.com> <87zht45nw6.fsf@gmx.de> <838t0odpk8.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1545074936 5632 195.159.176.226 (17 Dec 2018 19:28:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Dec 2018 19:28:56 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: phst@google.com, 28691@debbugs.gnu.org, p.stephani2@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 17 20:28:51 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gYyZO-0001Je-L4 for ged-emacs-devel@m.gmane.org; Mon, 17 Dec 2018 20:28:50 +0100 Original-Received: from localhost ([::1]:48664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gYybU-0001g4-FI for ged-emacs-devel@m.gmane.org; Mon, 17 Dec 2018 14:31:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gYyau-0001dr-JS for emacs-devel@gnu.org; Mon, 17 Dec 2018 14:30:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gYyar-0007X1-VI for emacs-devel@gnu.org; Mon, 17 Dec 2018 14:30:23 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:53957) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gYyal-0007St-Jt; Mon, 17 Dec 2018 14:30:15 -0500 Original-Received: from detlef.gmx.de ([212.86.54.89]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LlDx4-1h6OSp2lFu-00azmC; Mon, 17 Dec 2018 20:30:05 +0100 In-Reply-To: <838t0odpk8.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 17 Dec 2018 19:35:19 +0200") X-Provags-ID: V03:K1:OH/BFNwAxFB55gxvjNzMibIiYJprnwF6ZF7zAxFKXLOoA9tmbXk aGpJCeTqy1E29ji7tlGpDUEM+AYyjEwrWSqG7z459PW+PFqkXa0NNqLCzjYc0jt54qr3v5o ORHZp0FiGiD6B9MY+A0Gulzd0JDAF9ozenXtTWvWYXXPm/qBAzIrzzoyNSkfNRDrFnwIfgg e/MRUiGeN0Sd+ZEy3cvgA== X-UI-Out-Filterresults: notjunk:1;V03:K0:zEPr1Leotmw=:9hyFtUQkAjI7TBaNbYpchs 3zX9Y/aL9RqS7rtwnjsUWEpdgjw4/4qFL1p3IalQ38Dapv0gYySwBAVsiIAUOuoxvG+IU99Hv KPOZEparmFZvlGECa1XNlsT1pc/A46s23+dTC/EKvg9MQVazVEa+Xuwy9hh6vSwmaRA3LrUVQ HwmWxjLQDjHR6q1+D1y99XpKeaFuso7C7zyYHLjijSsCSV3TAuZoCB0T4Px6oEufoTkHbvWdl tcoHd7dZafba7eS/89VNU9McsYjUGUnqpYjuUzcFO6cEdAoyOiPA+qpdilphzPcAC02hca6op hhImGGOQ0ro/O4mGjLzddFy/mhCb8dFrwKAJbUabqsSg59qVNqd/7XzmigMrwypR0WGgLH+la xaMosZ7P6jdC60CtvuIejUU9UeqgTRKVhycChkK8jc62ooBl57IgT9s7TxLfiZFPyZuMNhVkc Ddm8VtO5dIp9QicouGj5vnn2tYh9aMmUDZS16BjF7ZNANDSnD1KdoXMYSkADP77dYSY/s5eFZ UxpQFrnYwTZMDh4MCsJwSVIm+w17CSTrJdpvxHZ6F2AV9ee5xlxk+kVpQ180Dgee4GYpy2nd3 Vwd7iEf0M3ZNbPQv29wLKOFj/0TbR5TIIXQU6U2AQC/wXGi8J28vr4+L+te2r+F8R3tsrHx3v yLtt9vz194C3LZxKCRTbgOrXGHJkyU+Ki5a3vTPmRRhYw/o5CHVhn9GLS27hUWxVQ2A0wCHQi bVZdqzvYZ6NE8fwnsPJ7kzsfvYnilWJSgOPAxCnFiMsxfuS/S9Rm7RGfimNN9wfC+W7POe7H X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231892 Archived-At: Eli Zaretskii writes: Hi Eli, >> What happens, if no file name handler is found? Should there be a local >> process then, or should this be ignored (returning nil)? > > The proposed code runs the process locally, which I think is > reasonable. Yes, when default-directory is local. If default-directory is remote, and :file-handler indicates that a remote process shall run, the situation is different. If the corresponding file name handler offers an own make-network-process implementation, it returns that process. But if the file name handler misses an implementation, no local process shall run. This is the same situation as with start-file-process. The file name handler for ssh returns a process object: --8<---------------cut here---------------start------------->8--- (with-temp-buffer (let ((default-directory "/ssh::")) (start-file-process "foo" (current-buffer) "/bin/true"))) =3D> # --8<---------------cut here---------------end--------------->8--- But for Tramp methods which do not own a start-file-process implementation, no process is created: --8<---------------cut here---------------start------------->8--- (with-temp-buffer (let ((default-directory "/sftp::")) (start-file-process "foo" (current-buffer) "/bin/true"))) =3D> nil --8<---------------cut here---------------end--------------->8--- This is documented in the Lisp Manual, see node "Asynchronous Processes": --8<---------------cut here---------------start------------->8--- Some file handlers may not support =E2=80=98start-file-process=E2=80= =99 (for example the function =E2=80=98ange-ftp-hook-function=E2=80=99). In su= ch cases, this function does nothing and returns =E2=80=98nil=E2=80=99. --8<---------------cut here---------------end--------------->8--- I believe make-network-process shall be have similar. Best regards, Michael.