unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: phst@google.com, 28691@debbugs.gnu.org, p.stephani2@gmail.com,
	emacs-devel@gnu.org
Subject: bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691)
Date: Mon, 17 Dec 2018 20:30:02 +0100	[thread overview]
Message-ID: <87k1k854ud.fsf__32242.9650849246$1545074948$gmane$org@gmx.de> (raw)
In-Reply-To: <838t0odpk8.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 17 Dec 2018 19:35:19 +0200")

Eli Zaretskii <eliz@gnu.org> 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")))
=> #<process foo>
--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")))
=> 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 ‘start-file-process’ (for
     example the function ‘ange-ftp-hook-function’).  In such cases,
     this function does nothing and returns ‘nil’.
--8<---------------cut here---------------end--------------->8---

I believe make-network-process shall be have similar.

Best regards, Michael.





  parent reply	other threads:[~2018-12-17 19:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 17:13 bug#28691: 27.0.50; make-process has no file-name-handler Stefan Monnier
2017-10-03 17:50 ` Michael Albinus
2017-10-03 18:34   ` Eli Zaretskii
2018-12-16 23:39 ` bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691) Philipp Stephani
2018-12-17 12:38   ` Michael Albinus
2018-12-17 17:35     ` Eli Zaretskii
2018-12-17 19:07     ` Philipp Stephani
     [not found]     ` <CAArVCkSzt=pcVG9ZRpdT6oSi30ExcqBGAQ5J8b3x0+gkOo+d2w@mail.gmail.com>
2018-12-17 19:20       ` Philipp Stephani
2018-12-17 19:58         ` Eli Zaretskii
2018-12-17 20:47           ` Philipp Stephani
2018-12-22  9:07             ` Eli Zaretskii
2018-12-22  9:31               ` Michael Albinus
2018-12-22 21:08                 ` Philipp Stephani
2018-12-23  7:41                   ` Michael Albinus
2018-12-23 10:08                     ` Philipp Stephani
2018-12-23 10:26                       ` Michael Albinus
2018-12-23 15:45                         ` Eli Zaretskii
2018-12-23 16:36                           ` Michael Albinus
2018-12-23 16:50                             ` Eli Zaretskii
2018-12-22 22:26               ` Philipp Stephani
2018-12-17 19:33       ` Michael Albinus
2018-12-17 20:03       ` Drew Adams
     [not found]     ` <838t0odpk8.fsf@gnu.org>
2018-12-17 19:30       ` Michael Albinus [this message]
     [not found] ` <20181216233936.208568-1-phst@google.com>
2018-12-17 17:34   ` Eli Zaretskii
     [not found] ` <mailman.5866.1545079749.1284.bug-gnu-emacs@gnu.org>
2018-12-18  1:57   ` Alan Mackenzie
2018-12-18  7:56     ` Michael Albinus
2018-12-22 21:05     ` Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='87k1k854ud.fsf__32242.9650849246$1545074948$gmane$org@gmx.de' \
    --to=michael.albinus@gmx.de \
    --cc=28691@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@gmail.com \
    --cc=phst@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).