Ihor Radchenko <yanta...@posteo.net> writes:

> This looks like Emacs bug, because the same problem with all that
> boilerplate text happens when using shell-command-on-region.
>
> I reported it as
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71081
>
> Let's see what Emacs devs say.

... and they say that it is not Emacs bug. Just cmd.exe cannot be used
this way (piping input to it).

So, no `process-file' on Windows. We must either dump the script into
.bat file or pass it via -c '....' switch. Or maybe just remove the
boilerplate via regexp (heuristics).

I think that our current code for :shebang will not work either on
Windows.

Bottom line - Windows does not follow POSIX and does all kinds of weird
staff. Oh well.
Unimportant.

For :session, the situation is similar - there is simply no easy way to
distinguish actual command output and the boilerplate spat by
cmd.exe. Maybe we can create a workaround removing the boilerplate via
regexp. That's probably the easiest.

Whoever is familiar with Windows, feel free to work on a fix.
We probably need a whole separate branch of logic just for Windows in
`org-babel-eval' and ob-shell.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to