From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit--Claudel" <clement.pit@gmail.com>
Cc: 24287-done@debbugs.gnu.org
Subject: bug#24287: Process filters received stderr output, not documented
Date: Wed, 24 Aug 2016 17:44:04 +0300 [thread overview]
Message-ID: <83zio2dy6j.fsf@gnu.org> (raw)
In-Reply-To: <2f595455-af39-b61e-91ce-a03c58011fba@gmail.com> (message from Clément Pit--Claudel on Tue, 23 Aug 2016 17:47:16 -0400)
> From: Clément Pit--Claudel <clement.pit@gmail.com>
> Date: Tue, 23 Aug 2016 17:47:16 -0400
>
> > That is described in the parent section:
> >
> > It is impossible to separate the standard output and standard error
> > streams of the subprocess, because Emacs normally spawns the subprocess
> > inside a pseudo-TTY, and a pseudo-TTY has only one output channel. If
> > you want to keep the output to those streams separate, you should
> > redirect one of them to a file—for example, by using an appropriate
> > shell command.
>
> Hi Eli,
>
> Am I misunderstanding something? This section sounds misleading, at least for Emacs 25 (I'm not sure about Emacs 24). The documentation of make-process (which is new in Emacs 25, right?) says:
>
> :stderr STDERR
> Associate STDERR with the standard error of the process.
> STDERR is either a buffer or a pipe process created with
> ‘make-pipe-process’.
>
> The docstring of start-process was updated accordingly:
>
> If you want to separate standard output from standard error, use
> ‘make-process’ or invoke the command through a shell and redirect
> one of them using the shell syntax.
>
> Both of these suggest that the impossibility that the manual mention only applies to the pty case (the manual recommends against using PTYs for non-user-facing processes anyway). What about something like this:
>
> It is impossible to separate the standard output and standard error streams
> of a subprocess spawned inside a pseudo-TTY, as pseudo-TTYs have only one
> output channel. If you want to keep the output to those streams separate,
> you should either use `make-process' with the :stderr argument, or redirect
> one of the streams to a file—for example, by using
> start-process-shell-command with an appropriate redirection.
>
> Additionally, we could update the documentation of make-process: right now, it starts with "This function is like ‘start-process’, but takes keyword arguments.", but from what I understand it can actually do more than start-process. What about this:
>
> This function is like ‘start-process’, but takes keyword arguments, and can
> separate output to standard output and standard error.
Actually, the situation was much worse than those minor changes could
handle. The documentation of process-related APIs was not reviewed in
its entirety for quite some time, and as result bit-rotted quite a
lot. I fixed that.
This is what happens and will continue to happen if people will not
volunteer to review documentation during the pretest, certainly when a
major version is about to be released. For Emacs 25.1, only a single
individual volunteered, and a single *.texi file was reviewed. I
expect the accuracy and the overall quality of our documentation to go
downhill if we don't see more volunteers.
> Btw, was there a way in Emacs 24 to separate these streams if the process was run after setting process-connection-type to nil? (I can't think of one).
No, I don't think so.
next prev parent reply other threads:[~2016-08-24 14:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-22 17:35 bug#24287: Process filters received stderr output, not documented Paul A. Steckler
2016-08-22 18:23 ` Eli Zaretskii
2016-08-22 18:38 ` Clément Pit--Claudel
2016-08-22 19:15 ` Eli Zaretskii
2016-08-22 19:08 ` Paul A. Steckler
2016-08-23 21:47 ` Clément Pit--Claudel
2016-08-24 14:44 ` Eli Zaretskii [this message]
2016-08-24 15:18 ` Clément Pit--Claudel
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=83zio2dy6j.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=24287-done@debbugs.gnu.org \
--cc=clement.pit@gmail.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 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.