From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shintaro Katayama Subject: Re: ob-shell, output and continuation prompts Date: Sun, 04 Feb 2018 19:32:00 +0000 Message-ID: References: <87tvxea8x3.fsf@luisa.c0t0d0s0.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1137b5c4796bc20564680003" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiQ1O-0008H3-Lz for emacs-orgmode@gnu.org; Sun, 04 Feb 2018 14:32:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eiQ1N-0007md-Hp for emacs-orgmode@gnu.org; Sun, 04 Feb 2018 14:32:14 -0500 Received: from mail-qt0-x22c.google.com ([2607:f8b0:400d:c0d::22c]:45604) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eiQ1N-0007j0-BL for emacs-orgmode@gnu.org; Sun, 04 Feb 2018 14:32:13 -0500 Received: by mail-qt0-x22c.google.com with SMTP id x27so37107508qtm.12 for ; Sun, 04 Feb 2018 11:32:11 -0800 (PST) In-Reply-To: <87tvxea8x3.fsf@luisa.c0t0d0s0.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" --001a1137b5c4796bc20564680003 Content-Type: text/plain; charset="UTF-8" Hi, A similar issue - a code block and the result below would be normal. #+BEGIN_SRC shell echo $PWD #+END_SRC #+Results: : /Users/shin/Documents However, when I specified a session name, the first evaluation returns a table-format value as below, ... #+BEGIN_SRC shell :session *shell* echo $PWD #+END_SRC #+Results: | | | /Users/shin/Documents | ... but, the second or more latter evaluations return the normal value. #+BEGIN_SRC shell :session *shell* echo $PWD #+END_SRC #+Results: : /Users/shin/Documents ... How can I get the normal value in all evaluations of the session? I attached the session log in the *shell* buffer below. I am using Org mode version 9.1.6 (9.1.6-16-g86a382-elpaplus @ /Users/shin/.emacs.d/elpa/org-plus-contrib-20180115/ on macOS. Regards, Shintaro ---- echo $PWD bash-3.2$ /Users/shin/Documents bash-3.2$ echo 'org_babel_sh_eoe' org_babel_sh_eoe bash-3.2$ echo $PWD /Users/shin/Documents bash-3.2$ echo 'org_babel_sh_eoe' org_babel_sh_eoe bash-3.2$ ---- On Tue, Nov 28, 2017 at 1:25 PM Michael Welle wrote: > Hello, > > this code block: > > #+BEGIN_SRC shell :session n42 :shebang "#!/bin/bash" > for i in "aa" "bb" "cc" ; do > echo "u: $i" > done > #+end_src > > produces this output when it first runs: > > #+RESULTS: > | | | | | > | > | > | u: | aa | > | u: | bb | | | > | u: | cc | | | > > > After the first run, subsequent runs produce this output: > > #+RESULTS: > | | | | > | > | u: | aa | > | u: | bb | | > | u: | cc | | > > If I set :session to none the output is always like follows: > > #+RESULTS: > | u: | aa | > | u: | bb | > | u: | cc | > > > I think that last one is what one would expect ;). Anyways, using sessions, > is there a way to get rid off of the shell's continuation prompts? > > Regards > hmw > > --001a1137b5c4796bc20564680003 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

A similar issue - a code block and = the result below would be normal.

#+BEGIN_SRC= shell
=C2=A0 echo $PWD
#+END_SRC

<= div>#+Results:
: /Users/shin/Documents

=

However, when I specified a session name, the first eva= luation returns a table-format value as below, ...

#+BEGIN_SRC shell :session *shell*
=C2=A0 echo $PWD
#+END_SRC

#+Results:
|=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|
| /Users/shin/Documents |


... but, the second or more latter evaluations return the normal value.<= /div>

#+BEGIN_SRC shell :session *shell*
= =C2=A0 echo $PWD
#+END_SRC

#+Results:
: /Users/shin/Documents


... How can I get the normal value in all evaluations of the session?=C2= =A0

I attached the session log in the *shell* buff= er below. I am using Org mode version 9.1.6 (9.1.6-16-g86a382-elpaplus @ /U= sers/shin/.emacs.d/elpa/org-plus-contrib-20180115/ on macOS.

=
Regards,
Shintaro

----
<= div>
echo $PWD
bash-3.2$ /Users/shin/Documents
bash= -3.2$ echo 'org_babel_sh_eoe'
org_babel_sh_eoe
= bash-3.2$ echo $PWD
/Users/shin/Documents
bash-3.2$ ech= o 'org_babel_sh_eoe'
org_babel_sh_eoe
bash-3.2$= =C2=A0
----

On Tue, Nov 28, 2017 at 1:25 PM Michael Welle <mwe012008@gmx.net> wrote:
Hello,

this code block:

#+BEGIN_SRC shell :session n42 :shebang "#!/bin/bash"
for i in "aa" "bb" "cc" ; do
echo "u: $i"
done
#+end_src

produces this output when it first runs:

#+RESULTS:
|=C2=A0 =C2=A0 |=C2=A0 =C2=A0 |=C2=A0 =C2=A0 |=C2=A0 =C2=A0 |
| >=C2=A0 | >=C2=A0 | u: | aa |
| u: | bb |=C2=A0 =C2=A0 |=C2=A0 =C2=A0 |
| u: | cc |=C2=A0 =C2=A0 |=C2=A0 =C2=A0 |


After the first run, subsequent runs produce this output:

#+RESULTS:
|=C2=A0 =C2=A0 |=C2=A0 =C2=A0 |=C2=A0 =C2=A0 |
| >=C2=A0 | u: | aa |
| u: | bb |=C2=A0 =C2=A0 |
| u: | cc |=C2=A0 =C2=A0 |

If I set :session to none the output is always like follows:

#+RESULTS:
| u: | aa |
| u: | bb |
| u: | cc |


I think that last one is what one would expect ;). Anyways, using sessions,=
is there a way to get rid off of the shell's continuation prompts?

Regards
hmw

--001a1137b5c4796bc20564680003--