From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Adding streams for standard out and standard err Date: Fri, 22 Jul 2016 09:50:29 +0300 Message-ID: <83eg6mxj2i.fsf@gnu.org> References: <87oa5sexis.fsf@russet.org.uk> <83eg6nysug.fsf@gnu.org> <87k2ge3jsl.fsf@russet.org.uk> <83invyyffg.fsf@gnu.org> <87bn1q3g2h.fsf@russet.org.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1469170267 30687 80.91.229.3 (22 Jul 2016 06:51:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2016 06:51:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 22 08:50:59 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bQUIU-0002HP-VC for ged-emacs-devel@m.gmane.org; Fri, 22 Jul 2016 08:50:59 +0200 Original-Received: from localhost ([::1]:45418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQUIU-00024E-1N for ged-emacs-devel@m.gmane.org; Fri, 22 Jul 2016 02:50:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQUHy-000244-Iq for emacs-devel@gnu.org; Fri, 22 Jul 2016 02:50:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQUHv-0000Ym-EN for emacs-devel@gnu.org; Fri, 22 Jul 2016 02:50:26 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQUHv-0000Yd-Am; Fri, 22 Jul 2016 02:50:23 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1386 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bQUHt-0007XQ-F5; Fri, 22 Jul 2016 02:50:21 -0400 In-reply-to: <87bn1q3g2h.fsf@russet.org.uk> (phillip.lord@russet.org.uk) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206008 Archived-At: > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: emacs-devel@gnu.org > Date: Thu, 21 Jul 2016 21:13:26 +0100 > > > Maybe that's all we need: a small wrapper around append-to-file. > > Actually, adding a new stream was your idea... > > http://lists.gnu.org/archive/html/help-gnu-emacs/2016-06/msg00207.html It said "IF you want more flexibility". It's not clear to me what additional flexibility is being gained by your suggestions. > Yes, you are probably correct, that append-to-file could be used, > without resorting to new C primitives. However, all the functionality > that we need is already in the C layer. Also append-to-file (or rather > write-region) would need updating to not send messages. Nowadays avoiding the message just needs to bind inhibit-message to a non-nil value. Anyway, this is a minor issue. If I'm the only one who thinks new primitives are unnecessary, then I won't fight the addition. However, if we do add them, perhaps we need to test the file descriptor for validity and/or being different from the terminal output device, and provide some helpful diagnostics if it isn't, because I don't really believe in people being aware of the pitfalls. E.g., I many times "rediscover" the problem when I need to debug a TTY session of Emacs.