From: Michael Albinus <michael.albinus@gmx.de>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: Philipp Stephani <phst@google.com>, 28691@debbugs.gnu.org
Subject: bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691)
Date: Sun, 23 Dec 2018 08:41:52 +0100 [thread overview]
Message-ID: <87muowzo3j.fsf@gmx.de> (raw)
In-Reply-To: <CAArVCkSYX1FA__JPQXg+ao1STyX4D0N9BT-vYvz92dukmcGUBQ@mail.gmail.com> (Philipp Stephani's message of "Sat, 22 Dec 2018 22:08:30 +0100")
Philipp Stephani <p.stephani2@gmail.com> writes:
Hi Philipp,
>> > this LGTM,
>>
>> Same here, but I still appreciate a clarification in the doc, that not
>> all file name handlers will support this function,
>
> That isn't the case:
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Magic-File-Names.html
> states clearly "The handler function must handle all of the above
> operations, and possibly others to be added in the future."
Tramp does *handle* all operations. But it does not *support* all of
them. In case it is not possible to offer an implementation for
`start-file-process' (as example), Tramp uses `ignore' as implementation.
>> and they will return
>> nil in that case.
>
> That is also not the case. If there's no handler, setting
> :file-handler to t has no effect. That's the same as for
> start-file-process, which calls start-process if no handler is found.
Of course. I do not speak about this case. Tramp offers a handler, which
will also supports `make-network-process'. This handler is called
`tramp-file-name-handler', and you see it in
`file-name-handler-alist'. But this handler could decide, that for a
given connection method there's nothing to do.
Remember the example I have shown already:
--8<---------------cut here---------------start------------->8---
(with-temp-buffer
(let ((default-directory "/ssh::"))
(start-file-process "foo" (current-buffer) "/bin/true")))
=> #<process foo>
(with-temp-buffer
(let ((default-directory "/sftp::"))
(start-file-process "foo" (current-buffer) "/bin/true")))
=> nil
--8<---------------cut here---------------end--------------->8---
"sftp" belongs to the connection methods implemented via GVFS, no
external processes are possible. See `tramp-gvfs-file-name-handler-alist',
many operations use `ignore' as their implementation. `make-network-process'
will get a similar entry.
Best regards, Michael.
next prev parent reply other threads:[~2018-12-23 7:41 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 [this message]
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
[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=87muowzo3j.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=28691@debbugs.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).