[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15180: Add a way to fflush stdout in batch mode
From: |
Lars Ingebrigtsen |
Subject: |
bug#15180: Add a way to fflush stdout in batch mode |
Date: |
Sun, 17 Apr 2022 14:05:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>>> What is the function to flush a stdio stream from Elisp? If it exists then
>>> it could be called before the sleep-for.
>>> An alternative to adding such a function is to simply have the print
>>> functions call fflush in C if noninteractive.
>> That function would be awesome. Is it possible to call such a C function
>> from Elisp?
>
> I guess it would make sense to call fflush in the batch equivalent
> of redisplay.
That sounds attractive, but I think there's a real possibility that that
could have unforeseen effects in older scripts -- uncomplete lines would
be output automatically, and that might break stuff.
So I've instead added a `flush-standard-output' function to Emacs 29, so
that the script writers can control this themselves.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#15180: Add a way to fflush stdout in batch mode,
Lars Ingebrigtsen <=