emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Vlastimil Vondra <vlastimil.vondra@gmail.com>
Cc: Matt <matt@excalamus.com>, emacs-orgmode@gnu.org
Subject: Re: org-babel shell in windows not finishing command
Date: Mon, 20 May 2024 19:39:50 +0000	[thread overview]
Message-ID: <87zfskp915.fsf@localhost> (raw)
In-Reply-To: <874jasqqh9.fsf@localhost>

Ihor Radchenko <yantar92@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	other threads:[~2024-05-20 19:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12  8:17 org-babel shell in windows not finishing command Vlastimil Vondra
2022-12-12 12:39 ` Ihor Radchenko
2022-12-12 13:07   ` Vlastimil Vondra
2022-12-12 13:10     ` Ihor Radchenko
2022-12-12 15:28       ` Vlastimil Vondra
2022-12-13  7:45         ` Ihor Radchenko
2024-05-20 18:37           ` Ihor Radchenko
2024-05-20 19:39             ` Ihor Radchenko [this message]
2024-05-21 10:34             ` Max Nikulin
2024-05-21 10:39               ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zfskp915.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=matt@excalamus.com \
    --cc=vlastimil.vondra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).