From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.devel Subject: Re: request for review: Doing direct file I/O in Emacs Lisp Date: Thu, 13 May 2004 09:59:34 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87isf0vjtl.fsf@emptyhost.emptydomain.de> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084455399 1243 80.91.224.253 (13 May 2004 13:36:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 May 2004 13:36:39 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu May 13 15:36:31 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOGNz-0005UH-00 for ; Thu, 13 May 2004 15:36:31 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOGNz-0005ZB-00 for ; Thu, 13 May 2004 15:36:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BOG5X-0006KS-6B for emacs-devel@quimby.gnus.org; Thu, 13 May 2004 09:17:27 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BOBdD-0001DW-7L for emacs-devel@gnu.org; Thu, 13 May 2004 04:31:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BOBXe-0000Ep-SO for emacs-devel@gnu.org; Thu, 13 May 2004 04:26:43 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BOB7f-0004M7-KP for emacs-devel@gnu.org; Thu, 13 May 2004 03:59:19 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BOB7f-0001IH-00 for ; Thu, 13 May 2004 09:59:19 +0200 Original-Received: from 213-203-244-156.kunde.vdserver.de ([213.203.244.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 May 2004 09:59:19 +0200 Original-Received: from kai by 213-203-244-156.kunde.vdserver.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 May 2004 09:59:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 32 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213-203-244-156.kunde.vdserver.de User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:+CZYAmDOTvgwCBI8sClgyCGLYd4= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23315 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23315 Richard Stallman writes: > I understand that rationale, but in this case Eshell has a crying need > for being able to directly write to files. It makes output > redirection thousands of times faster, and also makes it possible to > output to device files and named pipes. > > Could you tell me more? What data does eshell want to write into > files? Where is the data coming from? Is it coming from subprocesses > started by eshell, or is it generated from eshell itself? Both. Like any shell, eshell provides builtins and it is able to invoke subprocesses. For example, you can type "find-file foo" as a command to eshell, and eshell will then invoke the builtin find-file. Just as a random command example, perhaps somebody would like to type "ls > foo" at a shell prompt. Surely that person would also use the same command from eshell. In eshell, ls is a builtin command, so this is an example of redirection of output generated from eshell itself. As another random example, perhaps people type commands similar to "awk '{print $1}' bar > bar.out". awk is not a builtin in eshell, so this is an example of redirection of output generated from a subprocess. I would very much like to combine input and output redirection with builtin and external commands, just as it is possible in other shells: if I type "x | y | z > a" at a shell, then I don't normally think about whether x, y, z are builtin commands. Kai