Nick Dokos <nicholas.do...@hp.com> writes: > (message "foo") prints to stderr in batch mode, which is an unbuffered > stream. E.g ``emacs --batch -l foo.el'' with foo.el containing
> (message "foo") > (sit-for 10) > prints out ``foo'' and then sits for 10 seconds before exiting. Hi, Nick. It seems you are right. I initially guessed that -batch might have Emacs to allocate an output buffer, or at least do it when output is not directed to a terminal. But it even works as you say if I do: emacs 2>&1 --batch -l foo.el | cat This is more similar to my actual usage, which really is: [...] write = sys.stderr.write for line in os.popen('emacs 2>&1 -batch' ' -l ~/fp/notes/publish.el' ' -f org-publish-all'): write(repr(line) + '\n') sys.stderr.flush() [...] The write(...) and the flush() are only there for debugging: I wanted to see if the lines are delivered timely or not (and I'm seemingly getting the Emacs output in one blow). I just do not understand why the behavior differs between the "... | cat" line and the Python excerpt. I'm surely missing something somewhere... Sigh! > Also, don't you get messages for every file? Yes, and these messages usually say: "Skipping unmodified file ..." On the "entertaining side", this is too much noise; I would have preferred a mere line per project. Not a big deal anyway for me. On the "debugging side", this is sufficient indeed. > I would recommend looking at the worg publishing mechanism in > general. See > http://orgmode.org/worg/worg-setup.html > particularly the sections entitled > - What .emacs.el file is used on the server? > - I want it for my own server! Hey, thanks for this pointer, Nick; there seems to be useful hints or tricks in there. I'm saving it for later study. I plan to progressively convert more of my previous pages to Org format, and use it more for new pages too, as Org format and mode are so nice for maintenance. I plan to retain a few reStructuredText sources as such, as reST also has it virtues for publishing. I also hope that Org publishing offers me opportunities for experimenting (OK, OK: toying!) with new HTML/CSS avenues, I'm not familiar enough to be sure yet. François