From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.devel Subject: Re: Teaching emacsclient to act as a pager, and more Date: Fri, 09 Sep 2016 13:16:18 -0400 Message-ID: <877fal56zh.fsf@earth.catern.com> References: <1465262706-5229-1-git-send-email-sbaugh@catern.com> <87twfevqu7.fsf@earth.catern.com> <87pood5fee.fsf@earth.catern.com> <834m5p83yy.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1473441453 12230 195.159.176.226 (9 Sep 2016 17:17:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Sep 2016 17:17:33 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 09 19:17:29 2016 Return-path: Envelope-to: ged-emacs-devel@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 1biPQf-0002iD-E3 for ged-emacs-devel@m.gmane.org; Fri, 09 Sep 2016 19:17:29 +0200 Original-Received: from localhost ([::1]:59244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biPQd-0006DO-EE for ged-emacs-devel@m.gmane.org; Fri, 09 Sep 2016 13:17:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biPQ3-0006DF-LH for emacs-devel@gnu.org; Fri, 09 Sep 2016 13:16:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biPPz-000277-6y for emacs-devel@gnu.org; Fri, 09 Sep 2016 13:16:51 -0400 Original-Received: from [195.159.176.226] (port=57735 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biPPy-00025r-W1 for emacs-devel@gnu.org; Fri, 09 Sep 2016 13:16:47 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1biPPn-0005Ew-8a for emacs-devel@gnu.org; Fri, 09 Sep 2016 19:16:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:LYh3QFT7XTJMnFmbJPESOF/18BA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:207319 Archived-At: Eli Zaretskii writes: >> From: sbaugh@catern.com >> Date: Fri, 09 Sep 2016 10:14:33 -0400 >> >> >From c2ff58ce764801101fb4c37fd3963f99cb8652a2 Mon Sep 17 00:00:00 2001 >> From: Spencer Baugh >> Date: Sun, 5 Jun 2016 00:40:28 -0400 >> Subject: [PATCH 1/5] process: add features for direct use of FDs >> >> - A new keyword argument for make-network-process, :ancillary. When >> non-nil, Emacs will check for ancillary data when reading from the >> network process. If any is found, it is passed as an additional argument >> to the process filter function. At the moment, this only supports >> reading passed file descriptors out of ancillary data. >> This is inherited by the children of server processes. >> >> - A new Lisp function make-fd-process, which accepts keyword arguments >> exactly like make-pipe-process, but also accepts :infd and :outfd, which >> take Lisp integers which should be file descriptors that can be read >> from and written to, respectively. > > Cannot this be handled by the existing make-pipe-process? If not, why > not? > > Thanks. First off, make-fd-process is only an exact clone of make-pipe-process at the moment because that was the fastest way to get something working. Still, they are quite similar. But make-pipe-process makes a process object backed by a pipe. make-fd-process makes a process object backed by arbitrary file descriptors. I don't think it would be a good API to add :infd and :outfd arguments to make-pipe-process. That would cause make-pipe-process to make process objects backed by arbitrary file descriptors and not just pipes. For one, the name would become confusing. If there was a file-descriptor Elisp type, then one solution would be to add a make-pipe Elisp function that is just a thin wrapper around the pipe system call, returning two FD objects. Then make-pipe-process can just call make-pipe followed by make-fd-process.