emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacsclient in elisp


From: Eli Zaretskii
Subject: Re: emacsclient in elisp
Date: Fri, 21 May 2021 10:10:52 +0300

> Date: Fri, 21 May 2021 09:36:38 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: Daniel Mendler <mail@daniel-mendler.de>,
>   monnier@iro.umontreal.ca, emacs-devel@gnu.org
> 
> > But then I don't understand the importance of stdin in this context.
> > If you want to read output from another program, just run that
> > program, in this case another Emacs, as a subprocess.  Then anything
> > that other program writes to its stdout will be read as part of normal
> > machinery of reading sub-process output, including filters, sentinels,
> > and all that.
> 
> Side note to your comment, I find it somehow good. So I could just
> fake the STDIN reading by using for example `cat`. But it does not
> work. Please if you have some reference to demonstration of the above,
> let me know.
> 
> My expectation is for following to work:
> 
> process-org.el:
> 
> (defun cat ()
>   (princ (shell-command-to-string "cat"))) ;; later call-process to be used
> 
> then on command line:
> 
> $ emacs -Q -l process-org.el --batch -f cat 
> 
> So that does not work, it exits immediately, it is not waiting for
> stdin

I don't understand what "doesn't work" mean in this case.  The code
you show isn't supposed to wait for anything, and it doesn't use
start-process to start async subprocesses.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]