From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24287: Process filters received stderr output, not documented Date: Wed, 24 Aug 2016 17:44:04 +0300 Message-ID: <83zio2dy6j.fsf@gnu.org> References: <83y43ofysz.fsf@gnu.org> <2f595455-af39-b61e-91ce-a03c58011fba@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1472049934 17052 195.159.176.226 (24 Aug 2016 14:45:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 24 Aug 2016 14:45:34 +0000 (UTC) Cc: 24287-done@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 24 16:45:25 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcZQg-0003TJ-CN for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Aug 2016 16:45:22 +0200 Original-Received: from localhost ([::1]:51721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcZQa-0007kI-Lz for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Aug 2016 10:45:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcZQS-0007hu-NJ for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2016 10:45:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcZQM-0002O4-OX for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2016 10:45:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcZQM-0002Ny-LJ for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2016 10:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bcZQM-0007VU-Gi for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2016 10:45:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Aug 2016 14:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 24287 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 24287@debbugs.gnu.org, eliz@gnu.org, steck@stecksoft.com Original-Received: via spool by 24287-done@debbugs.gnu.org id=D24287.147204985028567 (code D ref 24287); Wed, 24 Aug 2016 14:45:02 +0000 Original-Received: (at 24287-done) by debbugs.gnu.org; 24 Aug 2016 14:44:10 +0000 Original-Received: from localhost ([127.0.0.1]:39202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcZPR-0007Qa-6B for submit@debbugs.gnu.org; Wed, 24 Aug 2016 10:44:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcZPL-0007Pt-Bv for 24287-done@debbugs.gnu.org; Wed, 24 Aug 2016 10:44:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcZPB-00029u-8E for 24287-done@debbugs.gnu.org; Wed, 24 Aug 2016 10:43:54 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcZPB-00029R-54; Wed, 24 Aug 2016 10:43:49 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2462 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bcZP9-0005Jz-DQ; Wed, 24 Aug 2016 10:43:47 -0400 In-reply-to: <2f595455-af39-b61e-91ce-a03c58011fba@gmail.com> (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel on Tue, 23 Aug 2016 17:47:16 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122589 Archived-At: > From: Clément Pit--Claudel > 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.