From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gH6yJgsRqWUZHQAA62LTzQ:P1 (envelope-from ) for ; Thu, 18 Jan 2024 12:52:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id gH6yJgsRqWUZHQAA62LTzQ (envelope-from ) for ; Thu, 18 Jan 2024 12:52:43 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=cddrotBc; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705578763; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=XmlHNtkvWDaq1phnD7BwZOAMaV+nvjMwMdkcBJg8xu8=; b=NHBlsolpT3k+PlKuxJb0mRJlwKyVd2surM9DmT88XOeEwSIGMQCqfQtHb4r/pC4U5HOrUU UCxDOjXRYs3EbjuTdUdC5eYSvcKBZ+0iiGQVqCfGwDZXDb5/ma9kiK/rmD1sj6crxVdpX1 cFYcKhoLycMmdBuxwX0MtVrlJy8IPo/mgIj9+/xOgQ38EfzKPtiyU9qmhXeSUdaMe0Olaf zMCbY9uKlB8lIfNgMP+EiguHxOvdRgjrW23p66CLVm4ww2FIIxvRMIsMQdRyEwBB1V+A0M EYPjh6WxeJfi6JBvxMXlXFAGSJgMBXeuvedBBK6PiRrjzP+zGwtvcUPceSiW5Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=cddrotBc; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705578763; a=rsa-sha256; cv=none; b=U7GpjN+sGUFSuRoGDUnWk3pU2I9jb2c4ayJgLWfBtDN3zoXOt/7X9k7d89C5/2yUTL4QBh JVJ3DvVv5c0s4hbJueZU02EbKobH+HpKEkGsuX32meTotIkCBviGpvwAVuum0Z7IdVV/Q8 WU03Z4MEVki9d7H1LriSDBie2/rbBJTh1Pm+SXQhiXznsCJ+qfpJ6g3FPnLjq1+at2eDy0 0mbrnelxtdJqOv7l5gteYBRmSzrTR3siNGSUgzmaYSkyuQ63S45y6ih6Py5lkFLD7YEIZr 5c3d2t43PBV8jK/3HbzeUIekY/WY6qH9PyaMgE4Dk1mMOqsHeItnfw1dhq8D1g== 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 8996D5A8E0 for ; Thu, 18 Jan 2024 12:52:43 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQQwE-0007N3-A8; Thu, 18 Jan 2024 06:52:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQQwB-0007MW-VB for emacs-orgmode@gnu.org; Thu, 18 Jan 2024 06:51:59 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQQw7-0007m9-4C for emacs-orgmode@gnu.org; Thu, 18 Jan 2024 06:51:59 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C467A240101 for ; Thu, 18 Jan 2024 12:51:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705578712; bh=7xr6jQPm2riSP8UJPPcBQTGtQpZPszDWq5pgz6xlDQI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=cddrotBchCLRvyaYaE/GA2a5bvtt2I+eAy/jnKXCdUl3PqkYJWJdjPyiY5YzCLx26 v3yCvhMdLNvATLbp2kro5gsJCEoT4wBJEKtgOAzGhMIDsyGB3sWPRthLNkNhhP53h8 3wbgEZGw93OIvP41HROHUkP9cMZIZOAh57UnH/bL28yt+Qpz/GtbD2UFEn6EfrPhGe 1HX30FvTVX/um1RYNUPCKc3JpdaVEEYiSHsFiaUYjR1TjekHrARYiplRz1okJpE18M vHJRV8NTdkqJSVPBfPCDIlJ4+NVzVCMHqPAQq6BcBZyHbWgw8RIkMo+bmF0RrOPGhT cIaXyp8h8TCjg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TG1Lb5Csqz6txN; Thu, 18 Jan 2024 12:51:51 +0100 (CET) From: Ihor Radchenko To: Jack Kamm Cc: Matt , emacs-orgmode Subject: Re: [BUG] conda doesn't work in ob-shell sessions In-Reply-To: <87ttzn1mai.fsf@gmail.com> References: <186283d230a.129f5feb61660123.3289004102603503414@excalamus.com> <87a61j3orj.fsf@gmail.com> <1864701b4b8.e37160d6373275.4308190093579612690@excalamus.com> <87357a2r27.fsf@gmail.com> <1864c676b9f.e1bae673679825.2955884247216895930@excalamus.com> <87ttzn1mai.fsf@gmail.com> Date: Thu, 18 Jan 2024 11:55:03 +0000 Message-ID: <87h6jaj1pk.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.43 X-Migadu-Queue-Id: 8996D5A8E0 X-Spam-Score: -8.43 X-Migadu-Scanner: mx11.migadu.com X-TUID: Lmv+rz1WJmKB Jack Kamm writes: >> 1. M-x shell > > When I follow your example, in particular starting the session with > M-x shell, then conda works as expected, and behavior is same as you > report. > > But when I don't start with M-x shell, instead letting ob-shell create > the session, then conda gives the error about needing to run conda init > (despite the fact that conda init had already set up my zshrc). > > #+begin_src sh :session *myshell* :results output > conda activate ledger > #+end_src > #+RESULTS: > #+begin_example > CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. > To initialize your shell, run > > $ conda init I believe that is it because you explicitly specified "sh" shell, not zsh. When you use M-x shell, Emacs will pick up the system shell. In contrast, ob-shell will let-bind `shell-file-name' to the shell name you specify in the src block. The only exception is #+begin_src shell, which will use the default system shell. So, I believe that the following should work for you #+begin_src shell :session *myshell* :results output conda activate ledger #+end_src -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at