From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8LuBO6AZQV8gSQAA0tVLHw (envelope-from ) for ; Sat, 22 Aug 2020 13:12:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oFtKN6AZQV/VJQAA1q6Kng (envelope-from ) for ; Sat, 22 Aug 2020 13:12:00 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 58655940509 for ; Sat, 22 Aug 2020 13:12:00 +0000 (UTC) Received: from localhost ([::1]:34568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9TJP-0007Dw-2h for larch@yhetil.org; Sat, 22 Aug 2020 09:11:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9TIv-0007Dm-Cf for emacs-orgmode@gnu.org; Sat, 22 Aug 2020 09:11:29 -0400 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]:42951) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9TIt-0003ir-HT for emacs-orgmode@gnu.org; Sat, 22 Aug 2020 09:11:29 -0400 Received: by mail-ot1-x334.google.com with SMTP id o8so988708otp.9 for ; Sat, 22 Aug 2020 06:11:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N8keLrJyG8P0lwgE/oirxnkvEDv2LmT4v/+TwZcyri0=; b=HKy+QMk2vArQQAxiNl2wb5t0zoQlRWcooMiMLM2fBqI17GDeOmPjaAZWCU4038ebsV JIsvVUnxuvIy9B7fSTZVJxk+gfwyZrKVTIwVook+rOWtL+xOQuAmk6dkhISXuPE2yPHu v6bVeJIFN6yxjoRgjghQefPGhrtFGxv9qG8b5qFsOcrbbfFFJT+8Tknp5nMMhWCu1P9C HjrIq91K2gL3LxmwdS6I5soS7hZg8LPEsDp6wkZcuSozmnbLywWjfi2qOnnSuUZARI7f 6uw5edfpLKIO6XJ1astv9zgPfOnTiNAlUdtmpaqs25OtEUQ0zp1wldE7wiZ/OqAVcCCE cvpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N8keLrJyG8P0lwgE/oirxnkvEDv2LmT4v/+TwZcyri0=; b=scSqqwO/oKLPN0WLRl5wiuaz7gWkPc0j89iTpy5c9wZPxlEjLXWvKLYQP0vY/f0nS8 gM40mJeHpS/JEuKi+05AUfOjOMPWoNem3QnnEsz1Kz88MNIe+gA3BUWknqRm2mWxGEFR XTN91mnszh40POFzOLTZ7AG4bnD/xcJVTIOJuGCZa7ZZ6YaYV1Pj2p1uKr8HbBUrA7pw +exrS9/sh/YahTRtecUVYK0ymNBNAofxpc/IHxNHqmoY9poswF4U7yvsTO+q8fx7Trd+ 3xp4KlupsQCP+y2G6nt2T+SbTwSgYW09Oy4ho3qtiQHlDAeRcPWuLxH2k5RLevKODt8R MJ4w== X-Gm-Message-State: AOAM5338kY8BaJ8kJxq0AT8mSkVJLWzjtNX/OMensmteYc0Rcw4n2L6I TuJYDAWRvFxxMxaEjgJkHp4Hu8IplrSxm2swQBQ= X-Google-Smtp-Source: ABdhPJxi/FfiBnM3pWyALEsy2vlJtbPRgHKA1vTdlCZx8jWeU7v4NVk35epSJmFGkpigO2zBS9/LQHmcJRh0ElGI+K4= X-Received: by 2002:a05:6830:1286:: with SMTP id z6mr4959990otp.240.1598101886061; Sat, 22 Aug 2020 06:11:26 -0700 (PDT) MIME-Version: 1.0 References: <87ft8fwcc2.fsf@kyleam.com> In-Reply-To: <87ft8fwcc2.fsf@kyleam.com> From: Rudi C Date: Sat, 22 Aug 2020 17:40:53 +0430 Message-ID: Subject: Re: [BUG] babel runs bash instead of zsh when sessions are used To: Kyle Meyer Content-Type: multipart/alternative; boundary="0000000000003bcd7205ad771766" Received-SPF: pass client-ip=2607:f8b0:4864:20::334; envelope-from=rudiwillalwaysloveyou@gmail.com; helo=mail-ot1-x334.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=HKy+QMk2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: EFV2C/S2vPHd --0000000000003bcd7205ad771766 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I tried using emacs -Q and org 9.4, and you're right, this bug is nonexistent there. I am using Doom, so that's where the bug is coming from most probably. Unfortunately, things don't work without that bug either. The evaluation hangs indefinitely. I have used C-g to cancel them and take a look at the session buffer: ``` echo $HOME $0 ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org =E2=9D=AF echo $HOME $0echo $HOME $0 echo 'org_babel_sh_eoe' echo 'org_babel_sh_eoe' ]2;echo $HOME $0 ]1;echo /Users/evar /usr/local/bin/zsh ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org =E2=9D=AF echo 'org_babel_sh_eoe'echo 'org_babel_sh_eoe' ]2;echo 'org_babel_sh_eoe' ]1;echo org_babel_sh_eoe ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org ~/cellar/notes/org master ~/cellar/notes/org master* =E2=9D=AF echo $HOME $0 echo $echo 'org_babel_sh_eoe' HOME $0 ]2;echo $HOME $0 ]1;echo /Users/evar /usr/local/bin/zsh ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF echo 'org_babel_sh_eoe'echo 'org_babel_sh_eoe' ]2;echo 'org_babel_sh_eoe' ]1;echo org_babel_sh_eoe ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF echo $HOME $0 echo $echo 'org_babel_sh_eoe' HOME $0 ]2;echo $HOME $0 ]1;echo /Users/evar /usr/local/bin/zsh ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF echo 'org_babel_sh_eoe'echo 'org_babel_sh_eoe' ]2;echo 'org_babel_sh_eoe' ]1;echo org_babel_sh_eoe ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* ~/cellar/notes/org master* =E2=9D=AF ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF echo hi echo ]2;echo hi ]1;echo hi ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF echo jk echo ]2;echo jk ]1;echo jk ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF echo $HOME $0 echo $echo 'org_babel_sh_eoe' HOME $0 ]2;echo $HOME $0 ]1;echo /Users/evar /usr/local/bin/zsh ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF echo 'org_babel_sh_eoe'echo 'org_babel_sh_eoe' ]2;echo 'org_babel_sh_eoe' ]1;echo org_babel_sh_eoe ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master* =E2=9D=AF exit exit ]2;exit ]1;exit Process shell finished echo $HOME $0 ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org =E2=9D=AF echo $echo 'org_babel_sh_eoe' HOME $0 ]2;echo $HOME $0 ]1;echo /Users/evar /usr/local/bin/zsh ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org =E2=9D=AF echo 'org_babel_sh_eoe'echo 'org_babel_sh_eoe' ]2;echo 'org_babel_sh_eoe' ]1;echo org_babel_sh_eoe ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org ~/cellar/notes/org master ~/cellar/notes/org master* ~/cellar/notes/org master* =E2=9D=AF ``` On Sat, Aug 22, 2020 at 8:39 AM Kyle Meyer wrote: > Rudi C writes: > > > #+BEGIN_SRC zsh :session z1 > > echo $HOME $0 > > #+END_SRC > > > > #+RESULTS: > > : /Users/evar /bin/bash > > What version of Org are you using? > > I tried with both the latest release (9.3.7) and the current master > branch (220f2b0d9), using default configuration aside from > > (org-babel-do-load-languages > 'org-babel-load-languages > '((shell . t))) > > I see "/usr/bin/zsh" in both cases. > --0000000000003bcd7205ad771766 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I tried using emacs -Q and org 9.4, and you're right, = this bug is nonexistent there. I am using Doom, so that's where the bug= is coming from most probably. Unfortunately, things don't work without= that bug either. The evaluation hangs indefinitely. I have used C-g to can= cel them and take a look at the session buffer:

```
<= div>echo $HOME $0
]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]= 1;..lar/notes/org
~/cellar/notes/org
=E2=9D=AF echo $HOME $0echo $HO= ME $0
echo 'org_babel_sh_eoe'
echo 'org_babel_sh_eoe'=
]2;echo $HOME $0 ]1;echo /Users/evar /usr/local/bin/zsh
]2;evar@F= ereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org
~/cellar/= notes/org
=E2=9D=AF echo 'org_babel_sh_eoe'echo 'org_babel_s= h_eoe'
]2;echo 'org_babel_sh_eoe' ]1;echo org_babel_sh_eoe=
]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org=
~/cellar/notes/org
~/cellar/notes/org master
~/cellar/notes/org = master*
=E2=9D=AF echo $HOME $0
echo $echo 'org_babel_sh_eoe'=
HOME $0
]2;echo $HOME $0 ]1;echo /Users/evar /usr/local/bin/zsh ]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org ~/cellar/notes/org master*
=E2=9D=AF echo 'org_babel_sh_eoe'ec= ho 'org_babel_sh_eoe'
]2;echo 'org_babel_sh_eoe' ]1;ec= ho org_babel_sh_eoe
]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org = ]1;..lar/notes/org
~/cellar/notes/org master*
=E2=9D=AF echo $HOME = $0
echo $echo 'org_babel_sh_eoe'
HOME $0
]2;echo $HOME $0= ]1;echo /Users/evar /usr/local/bin/zsh
]2;evar@Fereidoons-MacBook-Pro= : ~/cellar/notes/org ]1;..lar/notes/org
~/cellar/notes/org master*
= =E2=9D=AF echo 'org_babel_sh_eoe'echo 'org_babel_sh_eoe' ]2;echo 'org_babel_sh_eoe' ]1;echo org_babel_sh_eoe
]2;evar@= Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org
~/cellar= /notes/org master*
~/cellar/notes/org master*
=E2=9D=AF

]2;e= var@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org
~/ce= llar/notes/org master*
=E2=9D=AF

]2;evar@Fereidoons-MacBook-Pro= : ~/cellar/notes/org ]1;..lar/notes/org
~/cellar/notes/org master*
= =E2=9D=AF

]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;.= .lar/notes/org
~/cellar/notes/org master*
=E2=9D=AF

]2;evar= @Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org
~/cella= r/notes/org master*
=E2=9D=AF echo hi
echo
]2;echo hi ]1;echo hi=
]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org=
~/cellar/notes/org master*
=E2=9D=AF echo jk
echo
]2;echo jk= ]1;echo jk
]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes/org ]1;..l= ar/notes/org
~/cellar/notes/org master*
=E2=9D=AF echo $HOME $0
e= cho $echo 'org_babel_sh_eoe'
HOME $0
]2;echo $HOME $0 ]1;ec= ho /Users/evar /usr/local/bin/zsh
]2;evar@Fereidoons-MacBook-Pro: ~/cel= lar/notes/org ]1;..lar/notes/org
~/cellar/notes/org master*
=E2=9D= =AF echo 'org_babel_sh_eoe'echo 'org_babel_sh_eoe'
]2;e= cho 'org_babel_sh_eoe' ]1;echo org_babel_sh_eoe
]2;evar@Fereid= oons-MacBook-Pro: ~/cellar/notes/org ]1;..lar/notes/org
~/cellar/notes= /org master*
=E2=9D=AF exit
exit
]2;exit ]1;exit
Process she= ll finished
echo $HOME $0
]2;evar@Fereidoons-MacBook-Pro: ~/cellar/n= otes/org ]1;..lar/notes/org
~/cellar/notes/org
=E2=9D=AF echo $echo= 'org_babel_sh_eoe'
HOME $0
]2;echo $HOME $0 ]1;echo /Users= /evar /usr/local/bin/zsh
]2;evar@Fereidoons-MacBook-Pro: ~/cellar/notes= /org ]1;..lar/notes/org
~/cellar/notes/org
=E2=9D=AF echo 'org_= babel_sh_eoe'echo 'org_babel_sh_eoe'
]2;echo 'org_babel= _sh_eoe' ]1;echo org_babel_sh_eoe
]2;evar@Fereidoons-MacBook-Pro: = ~/cellar/notes/org ]1;..lar/notes/org
~/cellar/notes/org
~/cellar/n= otes/org master
~/cellar/notes/org master*
~/cellar/notes/org master*=
=E2=9D=AF=C2=A0
```

On Sat, Aug 22, 2020 at 8:= 39 AM Kyle Meyer <kyle@kyleam.com= > wrote:
Rudi= C writes:

> #+BEGIN_SRC zsh :session z1
> echo $HOME $0
> #+END_SRC
>
> #+RESULTS:
> : /Users/evar /bin/bash

What version of Org are you using?

I tried with both the latest release (9.3.7) and the current master
branch (220f2b0d9), using default configuration aside from

=C2=A0 =C2=A0 (org-babel-do-load-languages
=C2=A0 =C2=A0 =C2=A0'org-babel-load-languages
=C2=A0 =C2=A0 =C2=A0'((shell . t)))

I see "/usr/bin/zsh" in both cases.
--0000000000003bcd7205ad771766--