From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2B9yO7c68mNCmgAAbAwnHQ (envelope-from ) for ; Sun, 19 Feb 2023 16:05:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sLmRO7c68mMwDQEAauVa8A (envelope-from ) for ; Sun, 19 Feb 2023 16:05:27 +0100 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 AF950219D0 for ; Sun, 19 Feb 2023 16:05:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTlFC-0000O1-1p; Sun, 19 Feb 2023 10:04:50 -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 1pTlF4-00008z-SL for emacs-orgmode@gnu.org; Sun, 19 Feb 2023 10:04:43 -0500 Received: from mail-108-mta253.mxroute.com ([136.175.108.253]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTlF1-00012C-76 for emacs-orgmode@gnu.org; Sun, 19 Feb 2023 10:04:41 -0500 Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta253.mxroute.com (ZoneMTA) with ESMTPSA id 1866a348719000edb4.002 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Sun, 19 Feb 2023 15:04:32 +0000 X-Zone-Loop: c2ff000536693c35df9f98ed9f7e4d7c428c16b019c2 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tatersworld.org; s=x; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7K+0jC9lgYADH0AASa/cWQdK/hn3b7JQTrfYbN4f+2c=; b=EaV3ZsaasSTNY2VSOM+UAolqr3 +0b5yJcJZdRIwAht/MyvrWodCWsH3ewiQpTgdXufp+8rHkE0TDZQf0TAY68DQdCYTbDyGHmL2Rjeq JdajqQU0J3tJv+rppVHS5xEdCfLSPynkweoL1QKTDmnhFmHQEPaPCnaGiUVZlIH59PCLc3O8pl3qE 4Oz6f2NsvZo7TSWZcil2SLCG6yru+wResXB+CBCSadiczll8lbwhZDTsZOFxoPTebXYAKenEbA3Pz bK4aE9yb+VYI0YanX0Krc3iG/L2Yyn8yQ1M45WVRC9wpe9jhmLhqauFfmktMRgXPRe1V+AOD5WZIJ elE0K7LA==; From: Jack Kamm To: Ihor Radchenko Cc: Matt , emacs-orgmode Subject: Re: [BUG] shell sessions started outside of Babel broken In-Reply-To: <875yc1wz37.fsf@localhost> References: <186283d230a.129f5feb61660123.3289004102603503414@excalamus.com> <87a61j3orj.fsf@gmail.com> <1864701b4b8.e37160d6373275.4308190093579612690@excalamus.com> <87357a2r27.fsf@gmail.com> <1864bbf632d.acf83486624816.5548943856411522610@excalamus.com> <87wn4j1mee.fsf@gmail.com> <875yc1wz37.fsf@localhost> Date: Sun, 19 Feb 2023 07:04:29 -0800 Message-ID: <87ttzhy9vm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: jackkamm@tatersworld.org Received-SPF: pass client-ip=136.175.108.253; envelope-from=jackkamm@tatersworld.org; helo=mail-108-mta253.mxroute.com 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, 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.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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676819127; a=rsa-sha256; cv=none; b=TCiC6HxKKa9nIVL48kFakDL7wUBoYW55xhyhz9elrk3AknoW3MCc6+nyBdxCr+BiplDOrt tcw3nYOzg2cBRhf13xiNwTvNe65QIJQ+KrIYVQXFrRqqnJPNvjdar9YwOx7pd8Pcvj1aOD GirAERI9AhXhhmXYN8qRpwDBQOUvKYPwOPPeNZL5/oJFarAiV4K3+BKCYGGkpkvU/Jy1eg tZF0mSkPs+3ic2BDfxF90w/Ux0yAYPN3mK6rThpYdT/VaSevU/rRgwjLiI7JhVf008akUG ecHlfOnga1DwkecSuwtRwNzyxLkPyXLqmK6Sd+cgB9qPy8NPeg1oPs174dsK1w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tatersworld.org header.s=x header.b=EaV3Zsaa; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676819127; 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=7K+0jC9lgYADH0AASa/cWQdK/hn3b7JQTrfYbN4f+2c=; b=Hmg0GOoJbe8uIPAVEsp3jY82j0qBDr548q+eGEpqyOmGH8E04VohJB+gQxA/Lggr8D8OZe z8qc4D3phkEqvQpC6uXB98E9NdL/L0vnR+5bpv+o+M4pZJRhko0nKlsB6nohDV6U5arILH 9hTylTeEoBI06FAImu3cFZyXdvmGgMKyFwiM2yKgmu3mT3aDv2BZWqicGgCfZ9JjHa695Z VQKbSAOWIcC6DbQt5aPrinFMWzf8Uh47QgyU3UrRvwt4oO9dyUjWlc2Jk1dWyFhrDnDAof S0V0zM4WDhf5AFyWtYOqOk6HSiaifxmtBFOkTgwLkxmRCxenrnh1EnR/g64M2A== X-Migadu-Spam-Score: -1.94 X-Spam-Score: -1.94 X-Migadu-Queue-Id: AF950219D0 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tatersworld.org header.s=x header.b=EaV3Zsaa; dmarc=none; 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" X-TUID: 6y17w1qVuZBq Ihor Radchenko writes: > Org babel assumes ... session is properly initialized if that buffer > exists. Forgive me for opining a moment -- but I think it's worthwhile for Org Babel to support external sessions where feasible. ob-R and ob-python have long supported this, though recent changes to ob-python seem to have broken it there (I'm looking into fixing that). Having the extra flexibility to start the session manually can be handy. For example, conda is currently broken with ob-shell sessions (as discussed in this thread), but not M-x shell sessions, so it provides a useful workaround. For ob-python, in the past I found that manually invoking "M-x run-python" was convenient for starting different types of python sessions, such as with IPython, or with conda environments. That being said, I do appreciate that supporting this use case adds extra headaches for maintenance, and is difficult to test. In the end, I think it should be up to the individual Babel maintainer whether they want to support it for their language.