What is the remote variant of call-process-region or an easy way to implement it?

I tried

(let ((fh (find-file-name-handler default-directory 'call-process-region)))
   (apply fh #'call-process-region ...))

But this fails with unsupported i/o primitive.

tramp itself (as part of emacs-25.2) has a tramp-call-process-region function which I tried to use in a way like

       (with-parsed-tramp-file-name default-directory v
         (apply #'tramp-call-process-region v ...))

But this seems to execute the process on the local machine.

Some packages implement the functionality manually by copying buffer content into a temporary file in the remote site and call process-file in it. But code is non trivial.

  • You'll have to write something based on process-file. – wasamasa Sep 20 '17 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.