all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Issue with remote async processes.
Date: Sun, 27 Mar 2022 22:46:19 +0200	[thread overview]
Message-ID: <20220327204619.xs7rz54ny4us3j5t@Ergus> (raw)
In-Reply-To: <87fsn3hnaq.fsf@gmx.de>

On Sun, Mar 27, 2022 at 09:22:53AM +0200, Michael Albinus wrote:
>Ergus <spacibba@aol.com> writes:
>
>Hi,
>
>> Sorry to bother... I have another question. When we use process-file and
>> start-file-process with tramp, how can we get the error output in a
>> buffer?
>
>The argument BUFFER can be a list. The car is the output (string or
>buffer), the cdr is the stderr (just a string, a filename).
>
>--8<---------------cut here---------------start------------->8---
>(let ((default-directory "/ssh::")
>      (output (generate-new-buffer "*Output*"))
>      (stderr "/ssh::/tmp/xxx"))
>  (process-file "echo" nil (list output stderr) nil "Hallo")
>  (process-file "echa" nil (list output stderr) nil "Holla")
>  (find-file stderr))
>--8<---------------cut here---------------end--------------->8---
>
>In start-file-process, it is similar. The difference is, that stderr can
>be either a string (filename) or a buffer.
>
>--8<---------------cut here---------------start------------->8---
>(let ((default-directory "/ssh::")
>      (output (generate-new-buffer "*Output*"))
>      (stderr (generate-new-buffer "*Stderr*")))
>  (start-file-process "test1" (list output stderr) "echo" "Hallo")
>  (start-file-process "test2" (list output stderr) "echa" "Holla"))
>--8<---------------cut here---------------end--------------->8---
>
>Best regards, Michael.
>
Very thanks Michael... This is useful.

What's reason process-file doesn't support to use a buffer for stderr?

Performance? Technical?





  reply	other threads:[~2022-03-27 20:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220324222414.6k5cj2ovxfnpozwr.ref@Ergus>
2022-03-24 22:24 ` Issue with remote async processes Ergus
2022-03-25  8:55   ` Michael Albinus
2022-03-26 19:48     ` Ergus
2022-03-27  7:22       ` Michael Albinus
2022-03-27 20:46         ` Ergus [this message]
2022-03-28  9:14           ` Michael Albinus
2022-03-28 16:47             ` Ergus
2022-03-29  8:55               ` Michael Albinus
2022-03-29 11:46                 ` Ergus
2022-03-29 17:45                   ` Michael Albinus

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

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

  git send-email \
    --in-reply-to=20220327204619.xs7rz54ny4us3j5t@Ergus \
    --to=spacibba@aol.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael.albinus@gmx.de \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.