From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: Adding streams for standard out and standard err Date: Thu, 21 Jul 2016 20:01:19 +0100 Message-ID: <87fur23jeo.fsf@russet.org.uk> References: <87oa5sexis.fsf@russet.org.uk> <83eg6nysug.fsf@gnu.org> <6a1042f5-d955-b15e-7544-636db9719af0@cs.ucla.edu> <83vazzxce3.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1469127780 27523 80.91.229.3 (21 Jul 2016 19:03:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jul 2016 19:03:00 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 21 21:02:50 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 1bQJF8-0006C9-Sz for ged-emacs-devel@m.gmane.org; Thu, 21 Jul 2016 21:02:47 +0200 Original-Received: from localhost ([::1]:42990 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQJF7-0007gc-Kr for ged-emacs-devel@m.gmane.org; Thu, 21 Jul 2016 15:02:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQJDs-0007dq-4F for emacs-devel@gnu.org; Thu, 21 Jul 2016 15:01:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQJDq-0008CQ-3V for emacs-devel@gnu.org; Thu, 21 Jul 2016 15:01:27 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:34792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQJDl-0008AZ-95; Thu, 21 Jul 2016 15:01:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=c4vEm79Bs6DhEZ/9Vg/z54Ht81KSXjPnRCCxmfvXvuI=; b=vV69+dJuEKQhsTtQ8/gEly6qFb k2VhqfyxEg24PDJ1vpr61TxwdW/+MUn+ODoSRPgza52YVB3rG7Xlzq+lTmU3f3B9eeP+u2Y9V5Haj Rpmp4zxUBOWPyhxzi3TrcoWbfEVmUZ/VqV+70+XNKbHIpgP0xAAXkdm6o9iZII/vh8swJDn6yiXw4 xtQ+o2yAojZeKmJ+iJAYjvlarpXAg9+naybeyB9Q4kc81L/0qgjqo5kadvP+3Xk42ombQXpJGJp58 22ZtwoV3RTSWM+b7JEvbcQFWi3iBCa9m+DNkCAHtvikq+VEQoJvdWg3XMTu+Ilge+q/9HKpklvLig Lxnol27Q==; Original-Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:52698 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bQJDk-0011s6-5A; Thu, 21 Jul 2016 20:01:20 +0100 In-Reply-To: <83vazzxce3.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 21 Jul 2016 18:02:28 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 31.216.48.48 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:205983 Archived-At: Eli Zaretskii writes: >> Cc: emacs-devel@gnu.org >> From: Paul Eggert >> Date: Thu, 21 Jul 2016 16:40:10 +0200 >> >> On 07/21/2016 04:21 PM, Eli Zaretskii wrote: >> > . We already have (append-to-file START END FILENAME), which can be >> > used to write a buffer or a string to a file. FILENAME can be >> > "/dev/stderr" on Posix platforms, for example, or it can be a real >> > file name. >> >> Wouldn't the proposed primitives often be more efficient than >> append-to-file, since they would use stdio buffering? > > Probably. But is performance relevant to the use cases we intend them > to be used? You are correct in this case, performance is irrelevant. In fact, buffering is a bit of a pain. It took me a few minutes to work out why (print "hello" 'stdout) worked but (princ "hello" 'stdout) didn't -- the latter gets buffered. >> Presumably people using the new primitives would know about their >> problems with tty and/or GUI frames, just as they know about the similar >> problems that append-to-file has with /dev/stderr. > > I'm not so sure. But that's not the important part of my reasoning. It's important to the "unreliable/dangerous" part of your argument. I will add further documentation to the patch, pointing out this potential problem. Phil