[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reading from standard input in batch mode
From: |
Eric Abrahamsen |
Subject: |
Re: reading from standard input in batch mode |
Date: |
Tue, 22 May 2018 14:07:14 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Noam Postavsky <npostavs@gmail.com> writes:
> On 22 May 2018 at 16:44, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:
>
>>> (shell-command
>>> "emacs -Q --batch -l boomerang.el -f boomerang \"hi there\"")
>>>
>>> The subordinate emacs starts and finishes (returning 255, which just
>>> came up on a thread in emacs.devel, I think), but no file is written. As
>>> far as I know, `read' should be reading from standard-input in this
>>> case. What am I doing wrong?
>>
>> I figured it out, it should have been (read t). Ignore me!
>
> Shouldn't it have been:
>
> (shell-command
> "echo \"hi there\" | emacs -Q --batch -l boomerang.el -f boomerang")
Of course -- I don't know why I thought passing a string as an argument
would work.
Turns out I needed:
$ echo "\"hi there\""
So that the string was a string, but that was easy to figure out. The
output unfortunately also contains the string "Lisp expression:" but I
can probably figure that out, too.
Thanks!
Eric