Matt <m...@excalamus.com> writes:

> I agree, putting in the newline is simple and it would be easy enough to 
> create a separate path for Windows/cmd if it were a problem.
>
> I wonder if it might make sense to move where the trimming happens so that 
> the body passed into `org-babel-sh-evaluate' is ready to go and we could 
> handle the cmd case separately and earlier (by inserting the newline there)?

I think `org-babel--shell-command-on-region' will be more appropriate.
Because similar issues might appear when attempting to evaluate other
code blocks on Windows, where `shell-file-name' is set to cmdproxy.exe.

It will also be useful to leave a comment in the code explaining why we
need this newline.

-- 
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