[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug
From: |
Michael Albinus |
Subject: |
bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691) |
Date: |
Mon, 17 Dec 2018 13:38:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Philipp Stephani <p.stephani2@gmail.com> writes:
Hi Philipp,
> +:file-handler FILE-HANDLER -- If FILE-HANDLER is non-nil, then search
> +for a file name handler for `default-directory'.
What happens, if no file name handler is found? Should there be a local
process then, or should this be ignored (returning nil)?
> +(ert-deftest make-process/file-handler ()
> + "Check that the ‘:file-handler’ argument of ‘make-process’
> +works as expected."
> + (let ((file-handler-calls 0))
> + (cl-flet ((file-handler
> + (&rest args)
> + (should (equal default-directory "test-handler:/dir/"))
> + (should (equal args '(make-process :name "name"
> + :command ("/bin/true")
> + :file-handler t)))
> + (cl-incf file-handler-calls)
> + 'fake-process))
> + (let ((file-name-handler-alist
> + (cons (cons (rx bos "test-handler:") #'file-handler)
> + file-name-handler-alist))
> + (default-directory "test-handler:/dir/"))
> + (should (eq (make-process :name "name"
> + :command '("/bin/true")
> + :file-handler t)
> + 'fake-process))
> + (should (= file-handler-calls 1))))))
I would make a second test, that calling `make-process' w/o the
`:file-handler' argument returns the plain process #<process name>.
The third test is for using non-nil `:file-handler', w/o finding one.
This returns either a local process, or nil (see remark above).
I also miss documentation in the Elisp manual, nodes "Magic File Names"
and "Asynchronous Processes".
And of course, the implementation of a file name handler is missing in
tramp-adb.el, tramp-sh.el and tramp-smb.el.
Best regards, Michael.
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691), Philipp Stephani, 2018/12/16
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691),
Michael Albinus <=
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691), Eli Zaretskii, 2018/12/17
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691), Philipp Stephani, 2018/12/17
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691), Philipp Stephani, 2018/12/17
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691), Eli Zaretskii, 2018/12/17
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691), Philipp Stephani, 2018/12/17
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691), Eli Zaretskii, 2018/12/22
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691), Michael Albinus, 2018/12/22
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691), Philipp Stephani, 2018/12/22
- bug#28691: [PATCH] Add file name handler support for 'make-process' (Bug#28691), Michael Albinus, 2018/12/23