From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Proposal for extending set-process-filter Date: 27 Apr 2004 14:51:59 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083092339 21178 80.91.224.253 (27 Apr 2004 18:58:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Apr 2004 18:58:59 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 27 20:58:52 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 1BIXn9-0000Gw-00 for ; Tue, 27 Apr 2004 20:58:51 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BIXn9-0003ey-00 for ; Tue, 27 Apr 2004 20:58:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BIXj3-0004c9-1L for emacs-devel@quimby.gnus.org; Tue, 27 Apr 2004 14:54:37 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BIXi0-0004JZ-L7 for emacs-devel@gnu.org; Tue, 27 Apr 2004 14:53:32 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BIXhC-00036w-Qc for emacs-devel@gnu.org; Tue, 27 Apr 2004 14:53:14 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BIXgX-0002U7-QX; Tue, 27 Apr 2004 14:52:01 -0400 Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 1A66520F7D; Tue, 27 Apr 2004 14:52:00 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 06F568C6AE; Tue, 27 Apr 2004 14:51:59 -0400 (EDT) Original-To: David Kastrup In-Reply-To: Original-Lines: 34 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-0.904, requis 5, BAYES_30 -0.90) 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:22263 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22263 >> > 3) a file name for output. >> Can be handled by (1) just fine. What would you use it for (other than >> /dev/null which is rather special since append is the same as overwrite)? > Consistency with the BUFFER argument of start-process (which would be > pretty much the same as the FILTER function, with the exception that > it establishes a control buffer that is the default for process > output, that will list the process as one of its processes, and that > will kill the process if the buffer gets killed). Also efficiency: > redirecting a file descriptor to a file does not require Emacs > processing power. It also does not require conversion into multibyte > strings and back and so on. AFAIK, you can't do such a redirection after the exec. I.e. it has to be an argument of `start-process' rather than set-process-filter. >> Output-appending can be done via a filter-function. > Not really. An open in append mode will also append at the end if > the file gets extended by a different process. That's pretty hard to > do with a filter function. One could start the file descriptor list > with > :append t > or so, however. I thought the `append' arg of write-region did it right. >> What is still missing is the ability to open more file descriptors >> than stdin, stdout, stderr. > Item 5) above was supposed to cater for that. But for the same reason as above I don't think this can be done in set-process-filter: it has to be done before the `exec'. Stefan