all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Native OS pipelines in eshell and Emacs
@ 2024-05-28 14:42 Spencer Baugh
  2024-05-28 16:33 ` Jim Porter
  2024-05-29  1:21 ` Dmitry Gutov
  0 siblings, 2 replies; 10+ messages in thread
From: Spencer Baugh @ 2024-05-28 14:42 UTC (permalink / raw)
  To: emacs-devel; +Cc: johnw, spwhitton, dmitry


eshell "pipelines" operate by reading the data in from one process and
writing it out to the next process.  Thus the data flows from one
process, to Emacs, and then to the next process.

This differs from the native OS capability to make a pipe and pass one
end down to one process as stdout, and the other end down to another
process as stdin, which is more efficient.

Has there been work before on supporting this in eshell and Emacs?

I saw there was the new em-extpipe capability in eshell, but that
requires different syntax bypasses Eshell's usual features - adding the
ability to create pipelines natively in Emacs would allow the normal
Eshell syntax to just be efficient on its own.  (This would, I think,
remove the need for extpipe)

This same ability would be useful for project.el, where it would be nice
for the output of project-files (e.g. "git ls-files") to be piped
directly to xargs grep for commands like project-find-regexp, instead of
sending the data through Emacs which makes it substantially slower.

Specifically, the new feature would be something like an :stdin argument
to make-process which allows a make-pipe-process (or other process) to
be passed as stdin, and grabs the output file descriptor from that
process (what Emacs would normally read) and passes it down as stdin for
the new process instead.

I'm working on a patch to do this, but I wonder if any work has been
done on this before?



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-05-29 10:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 14:42 Native OS pipelines in eshell and Emacs Spencer Baugh
2024-05-28 16:33 ` Jim Porter
2024-05-28 18:38   ` Spencer Baugh
2024-05-28 19:56     ` Jim Porter
2024-05-29  1:21 ` Dmitry Gutov
2024-05-29  1:43   ` Spencer Baugh
2024-05-29  2:08     ` Dmitry Gutov
2024-05-29  8:01       ` Michael Albinus
2024-05-29 10:31         ` Dmitry Gutov
2024-05-29  7:53     ` Michael Albinus

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.