From: Ihor Radchenko <yantar92@posteo.net>
To: "Rudolf Adamkovič" <salutis@me.com>
Cc: Ihor Radchenko <yantar92@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Org 9.6-pre and Bash sessions
Date: Sat, 22 Oct 2022 10:59:38 +0000 [thread overview]
Message-ID: <87a65o15ut.fsf@localhost> (raw)
In-Reply-To: <m2czakgpk8.fsf@me.com>
Rudolf Adamkovič <salutis@me.com> writes:
> Ihor Radchenko <yantar92@posteo.net> writes:
>
>>> I did some testing and found no issues.
>
> Update: Today I needed to run some Bash, and it seems broken.
>
> PROBLEM 1: WITHOUT A SESSION
> ============================
>
> CONFIGURATION:
>
> Emacs 29, Org from Git (2f5e7103e59f06631e985d3dd39af21b5b7464ea)
>
> REPRODUCTION STEPS:
>
> Run the following code block:
>
> #+begin_src bash :results output
> echo one > one.txt
> echo two > two.txt
> diff one.txt two.txt
> #+end_src
>
> ACTUAL RESULTS:
>
> #+RESULTS:
>
> EXPECTED RESULTS:
>
> #+RESULTS:
> : 1c1
> : < one
> : ---
> : > two
This is actually expected. Without session, ob-shell discards results of
src blocks that fail and display *Error* window (empty in this case).
If you try
#+begin_src bash :results output
echo one > one.txt
echo two > two.txt
diff one.txt two.txt || true
#+end_src
things will work as expected.
I guess we can display a bit more info in `org-babel-eval'.
> PROBLEM 2: WITH A SESSION
> =========================
>
> CONFIGURATION:
>
> Emacs 29, Org from Git (2f5e7103e59f06631e985d3dd39af21b5b7464ea)
>
> REPRODUCTION STEPS:
>
> #+begin_src bash :session bash :results output
> echo one > one.txt
> echo two > two.txt
> diff one.txt two.txt
> #+end_src
>
> ACTUAL:
>
> #+RESULTS:
> : org_babel_sh_prompt> 1c1
> : < one
> : ---
> : > two
>
> EXPECTED:
>
> #+RESULTS:
> : 1c1
> : < one
> : ---
> : > two
Confirmed.
I know what is the problem. It is comint sometimes throwing output
without newlines, which leads to comint-prompt-regexp not matching all
the prompts after concatenating. Will take a look tomorrow.
> ADDENDUM
> ========
>
> A friend of mine, who uses Org that comes with Emacs 28.1 on Linux,
> tried the PROBLEM 1 source block shown above, the one *without* a
> session, and he got no results either.
>
> (We might need better tests.)
Better tests are always needed :)
https://orgmode.org/list/874k81bsvz.fsf@localhost
--
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>
next prev parent reply other threads:[~2022-10-22 11:29 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 15:14 Org 9.6-pre and Bash sessions Rudolf Adamkovič
2022-10-13 17:07 ` Michael Welle
2022-10-14 3:44 ` Ihor Radchenko
2022-10-15 20:56 ` Rudolf Adamkovič
2022-10-17 8:34 ` Ihor Radchenko
2022-10-21 5:29 ` Ihor Radchenko
2022-10-21 13:38 ` Rudolf Adamkovič
2022-10-22 4:22 ` Ihor Radchenko
2022-10-22 9:44 ` Rudolf Adamkovič
2022-10-22 10:59 ` Ihor Radchenko [this message]
2022-10-23 4:27 ` Ihor Radchenko
2022-10-26 11:56 ` Rudolf Adamkovič
2022-10-26 13:21 ` Rudolf Adamkovič
2022-10-27 3:53 ` Ihor Radchenko
2022-10-28 13:12 ` Rudolf Adamkovič
2022-10-28 13:29 ` Ihor Radchenko
2022-10-28 21:52 ` Rudolf Adamkovič
2022-10-29 4:05 ` [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions) Ihor Radchenko
2022-10-29 6:14 ` tomas
2022-10-29 6:43 ` Samuel Wales
2022-10-29 9:00 ` tomas
2022-10-29 9:09 ` Ihor Radchenko
2022-10-29 9:18 ` tomas
2022-10-30 3:31 ` Ihor Radchenko
2022-10-30 6:11 ` tomas
2022-10-30 7:09 ` Ihor Radchenko
2022-10-30 8:18 ` tomas
2022-10-29 11:58 ` Max Nikulin
2022-10-30 3:37 ` Ihor Radchenko
2022-10-30 20:28 ` Tim Cross
2022-10-31 1:13 ` Org babel API (was: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)) Ihor Radchenko
2022-10-31 2:03 ` Tim Cross
2022-10-31 3:12 ` Ihor Radchenko
2022-10-29 4:05 ` Org 9.6-pre and Bash sessions Ihor Radchenko
2022-11-03 16:30 ` Rudolf Adamkovič
2022-11-04 2:52 ` Ihor Radchenko
2022-11-05 1:12 ` Rudolf Adamkovič
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=87a65o15ut.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=salutis@me.com \
--cc=yantar92@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).