[Top][All Lists]

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

Re: Instruct emacs --batch to wait for something

From: Marcin Borkowski
Subject: Re: Instruct emacs --batch to wait for something
Date: Thu, 18 Nov 2021 17:20:44 +0100
User-agent: mu4e 1.1.0; emacs 28.0.50

On 2021-11-17, at 17:41, Rodrigo Morales <> wrote:

> I'm trying to use Emacs as a tool for getting the text representation of
> a website. For doing this, I'm using "eww" and I've written the
> following command that I intend to use in the command line.
> #+begin_src bash
> emacs \
>   --batch \
>   --eval='(eww 
> "";)' \
>   --eval='(with-current-buffer "*eww*" (princ (buffer-string)))'
> #+end_src
> The problem with this command is that it shows the following instead of
> showing the website.
> #+begin_example
> Loading 
> #+end_example
> My question is: How can I instruct Emacs to wait for something when the
> =--batch= flag is used?

I don't know, but did you try something blunt like
--eval='(sleep-for 5)'?
Of course, this would be very fragile and far from good practice...
Alternatively, maybe `eww-after-render-hook' would be useful?


Marcin Borkowski

reply via email to

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