[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Teaching emacsclient to act as a pager, and more
From: |
sbaugh |
Subject: |
Re: Teaching emacsclient to act as a pager, and more |
Date: |
Fri, 09 Sep 2016 13:16:18 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> From: address@hidden
>> Date: Fri, 09 Sep 2016 10:14:33 -0400
>>
>> >From c2ff58ce764801101fb4c37fd3963f99cb8652a2 Mon Sep 17 00:00:00 2001
>> From: Spencer Baugh <address@hidden>
>> 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.
- Re: Teaching emacsclient to act as a pager, and more, (continued)
- Re: Teaching emacsclient to act as a pager, and more, sbaugh, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, Stefan Monnier, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, sbaugh, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, Stefan Monnier, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, Eli Zaretskii, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, sbaugh, 2016/09/09
- Re: Using file descriptors in Emacs (was: Teaching emacsclient to act as a pager, and more), Eli Zaretskii, 2016/09/10
- Re: Teaching emacsclient to act as a pager, and more, sbaugh, 2016/09/10
- Re: Teaching emacsclient to act as a pager, and more, Leo Liu, 2016/09/10
- Re: Teaching emacsclient to act as a pager, and more, Eli Zaretskii, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more,
sbaugh <=
- Re: Teaching emacsclient to act as a pager, and more, Eli Zaretskii, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, sbaugh, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, Eli Zaretskii, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, sbaugh, 2016/09/09
- Re: Using file descriptors in Emacs, Eli Zaretskii, 2016/09/10
- Re: Using file descriptors in Emacs, sbaugh, 2016/09/10
- Re: Using file descriptors in Emacs, Eli Zaretskii, 2016/09/11
- Re: Using file descriptors in Emacs, sbaugh, 2016/09/11
- Re: Using file descriptors in Emacs, Eli Zaretskii, 2016/09/11
- Re: Using file descriptors in Emacs, sbaugh, 2016/09/11