unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Peter" <emacs@nexoid.at>
Cc: emacs-devel@gnu.org
Subject: Re: Reading from pipes directly with a process-filter
Date: Fri, 13 Jan 2023 21:43:58 +0200	[thread overview]
Message-ID: <83wn5q8bk1.fsf@gnu.org> (raw)
In-Reply-To: <87zgam6yy6.fsf@nexoid.at> (emacs@nexoid.at)

> From: "Peter" <emacs@nexoid.at>
> Date: Fri, 13 Jan 2023 20:01:37 +0100
> 
> I've been slowly sliding into using Emacs more and more like a Lisp OS,
> so one thing that has come up is directly reading data from pipes or
> special devices (like /dev/input/event...). I can do that fine by
> running `start-process' with `cat /dev/input/event..', however that
> seems a bit wasteful. Is there any way to *directly* open such a file
> and put a process-filter in front of it?

Did you try to use make-pipe-process?

> Semi-relatedly, is there any support for `fnctl' or `ioctl' in elisp, so
> that I could even *write* to those special devices?

Doesn't a simple 'write' (a.k.a. write-region in Emacs) work?  If not,
can you show a recipe that fails with all the details?



  reply	other threads:[~2023-01-13 19:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 19:01 Reading from pipes directly with a process-filter Peter
2023-01-13 19:43 ` Eli Zaretskii [this message]
2023-01-13 21:51   ` Peter
2023-01-14  6:56     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wn5q8bk1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs@nexoid.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).