From: Vlastimil Vondra <vlastimil.vondra@gmail.com>
To: emacs-orgmode@gnu.org
Subject: org-babel shell in windows not finishing command
Date: Mon, 12 Dec 2022 09:17:44 +0100 [thread overview]
Message-ID: <CACjq+cy8G+EkMgSwr5KWNbN7jjLE3tzqKwbQiTy84ZvJsumMwQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]
Hello,
I'm trying to run some shell block code (in windows they should evaluate in
cmd). But when executing org-babel block code, it seems that org-babel is
not finishing the last command. If I run:
#+begin_src shell :results output
echo %cd%
echo "hello"
#+end_src
then the output is
#+RESULTS:
: Microsoft Windows [Version 10.0.19045.2251]
: (c) Microsoft Corporation. All rights reserved.
:
: c:\Users\johndoe\Org>echo %cd%
: c:\Users\johndoe\Org
:
: c:\Users\johndoe\Org>More?
More? means cmd is expecting some additional command (creating multiline
statemens). In cmd typying either ( or ^ result in More?, but I don't know
what is causing this error in org-babel. Interestingly, if run like this:
#+begin_src shell :results output :session shell
echo "%cd%"
echo "hello"
#+end_src
I'm getting the right output:
#+RESULTS:
: Microsoft Windows [Version 10.0.19045.2251]
: (c) Microsoft Corporation. All rights reserved.
: echo "%cd%"
: "c:\Users\johndoe\Org"
: echo "hello"
: "hello"
But only when run for the first time, if running for second time, I'm
getting this:
#+RESULTS:
:
: cd%"
: "c:\Users\johndoe\Org"
: echo "hello"
: "hello"
Any way how to fix it either with :session shell command or without?
Best regards,
Vlastimil Vondra
[-- Attachment #2: Type: text/html, Size: 2984 bytes --]
next reply other threads:[~2022-12-12 8:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 8:17 Vlastimil Vondra [this message]
2022-12-12 12:39 ` org-babel shell in windows not finishing command 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
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=CACjq+cy8G+EkMgSwr5KWNbN7jjLE3tzqKwbQiTy84ZvJsumMwQ@mail.gmail.com \
--to=vlastimil.vondra@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).