[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacsclient in elisp
From: |
Jean Louis |
Subject: |
Re: emacsclient in elisp |
Date: |
Fri, 21 May 2021 09:36:38 +0300 |
User-agent: |
Mutt/2.0.6 (2021-03-06) |
* Eli Zaretskii <eliz@gnu.org> [2021-05-20 22:46]:
> > Cc: monnier@iro.umontreal.ca, bugs@gnu.support, emacs-devel@gnu.org
> > From: Daniel Mendler <mail@daniel-mendler.de>
> > Date: Thu, 20 May 2021 21:10:37 +0200
> >
> > Of course, there is another Emacs on the other side of the pipe. It is
> > Emacs all the way down ;)
>
> 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
And within Emacs (shell-command-to-string "cat") will also not wait,
including with call process, it will not wait.
But would it wait for STDIN just as `cat` does wait, then it would be
easy to use such external wrapper to receive STDIN and process it with
Emacs.
Thank you,
Jean Louis
- Re: emacsclient in elisp, (continued)
- Re: emacsclient in elisp, Stefan Monnier, 2021/05/20
- Re: emacsclient in elisp, Daniel Mendler, 2021/05/20
- Re: emacsclient in elisp, Eli Zaretskii, 2021/05/20
- Re: emacsclient in elisp, Daniel Mendler, 2021/05/20
- Re: emacsclient in elisp, Eli Zaretskii, 2021/05/20
- Re: emacsclient in elisp, Daniel Mendler, 2021/05/20
- Re: emacsclient in elisp, Eli Zaretskii, 2021/05/21
- Re: emacsclient in elisp, Daniel Mendler, 2021/05/21
- Re: emacsclient in elisp, Eli Zaretskii, 2021/05/21
- Re: emacsclient in elisp, Jean Louis, 2021/05/21
- Re: emacsclient in elisp,
Jean Louis <=
- Re: emacsclient in elisp, Eli Zaretskii, 2021/05/21
- Re: emacsclient in elisp, Stefan Monnier, 2021/05/20
- Re: emacsclient in elisp, Eli Zaretskii, 2021/05/21
- Re: emacsclient in elisp, Eli Zaretskii, 2021/05/21
- Re: emacsclient in elisp, Stefan Monnier, 2021/05/21
- Re: emacsclient in elisp, Eli Zaretskii, 2021/05/21
- Re: emacsclient in elisp, Stefan Monnier, 2021/05/21
- Re: emacsclient in elisp, Stefan Monnier, 2021/05/21
- Re: emacsclient in elisp, Eli Zaretskii, 2021/05/21
- Re: emacsclient in elisp, Stefan Monnier, 2021/05/21