From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oL2II7ur6WM6CAEAbAwnHQ (envelope-from ) for ; Mon, 13 Feb 2023 04:17:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CAdzI7ur6WNeMgEAauVa8A (envelope-from ) for ; Mon, 13 Feb 2023 04:17:15 +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 2900229914 for ; Mon, 13 Feb 2023 04:17:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRPKR-0005vB-4W; Sun, 12 Feb 2023 22:16:31 -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 1pRPKP-0005uc-M7 for emacs-orgmode@gnu.org; Sun, 12 Feb 2023 22:16:29 -0500 Received: from mail-108-mta230.mxroute.com ([136.175.108.230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRPKN-0002Mo-LU for emacs-orgmode@gnu.org; Sun, 12 Feb 2023 22:16:29 -0500 Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta230.mxroute.com (ZoneMTA) with ESMTPSA id 18648c5fc6c000011e.002 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Mon, 13 Feb 2023 03:16:20 +0000 X-Zone-Loop: 58bc1752e50fd58080ee112690faa2ff198d2fa3d53a 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=qKogB4Ub6uvVLiRP/QIjVwDNLAAMVu3jYvz0kqE72qw=; b=HWBRMrvqtQJY0aSCcog5b0ai99 HRhdhpjshghr0OFJzFgSLQMqxMxkFYi/iEDTBvT4OOVXlI+wKcL7hCvnUXGogpAo0K6k3iFjXnn9Q Q2/zjUy2QNXwhEPjbAYXOJbjvfl7wONq7W8xijT8CwGKfQmtC16nzoz/jeTECbv57u6qe1cc2cK8c IeX4gXMSsa3bKDNNS6UeivP+Wr+6NtC9VjyTDWCK5YJRDUaBTAq/HJdfYKLrrXVKeEy6US0Nkq5XI OeNFncPM0McBkitNPK7pst+7RLzGwq8yNdbpGOPjfjwqCT8BnPSIOgwUzmidRERJPLihSkDQaOxm2 P99dKQ9Q==; From: Jack Kamm To: Matt Cc: emacs-orgmode Subject: Re: [PATCH] Async evaluation in ob-shell In-Reply-To: <1864701b4b8.e37160d6373275.4308190093579612690@excalamus.com> References: <186283d230a.129f5feb61660123.3289004102603503414@excalamus.com> <87a61j3orj.fsf@gmail.com> <1864701b4b8.e37160d6373275.4308190093579612690@excalamus.com> Date: Sun, 12 Feb 2023 19:16:16 -0800 Message-ID: <87357a2r27.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.230; envelope-from=jackkamm@tatersworld.org; helo=mail-108-mta230.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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676258235; a=rsa-sha256; cv=none; b=Cm/ToQ4IInp6mX10KgAEKXfRYplXFApIo0BatW4sNJ4V+RntoBkqW5c23nMfKh5vbJ4sYR mOHBtCWC/zeToQp9Y/jclWGf1/FD7nXqoUOAO+lxMkqphDaQaCGGujrNbuVtp6hgmb05pE K+VPMF/IK8mGgh1oA2dPPhPY/HJAQq3brU1lGGEvoA1cIyuddhFN6xL4FK13YTVumTiwIU x65WlCWHf7LopEy3G2KHZMzFg5zXdUkQeGbEdreQXk9JJWaMsswCR8sy/GfnqozqOG8wDl K+KI40znJxvdJntkIf3E2C7SAn0g12KKZjdMdpDQdvHfTWnOP+KBPe7gnwXIFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tatersworld.org header.s=x header.b=HWBRMrvq; 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=1676258235; 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=qKogB4Ub6uvVLiRP/QIjVwDNLAAMVu3jYvz0kqE72qw=; b=a0FnMMSczrShHrF7+DOAwIf9gp8swH+CilxmlYd0PqrH6JumgDBd2KsAFuPW5ieeLDZ83M a+wKmNYeFiYmkdRsNpelavtgJlV5OFqjSUZeIBHOxX4jTjG77GHgvKHex1J5DpCCVseV/3 oBWy3xEsDSgUGQyHxN1kD5kvVDnWWEElwyNODa6YabhgyXNTO1X454Ph8z3uR/w5dWFEoe ES67ecRUfqIMPS0HrfODgwdrD8bniEt8B9vv6E3YwIcvjAIDersblEr+BsR4RVowhEF/wK ADmGa+Z9zxm33D47/1B9/oc+oKq8XsM+kh9lx2qWO+FIPG8oKyUTbTYlzi97Ew== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tatersworld.org header.s=x header.b=HWBRMrvq; 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-Migadu-Spam-Score: -1.17 X-Spam-Score: -1.17 X-Migadu-Queue-Id: 2900229914 X-Migadu-Scanner: scn1.migadu.com X-TUID: WkmtXysbd2Hu Matt writes: > Is this something you consider a bug? Yes I think so. When I was testing ob-shell today I initially tried with an M-x shell session, and I was surprised it didn't work. But I also noticed another prompt-related issue: conda doesn't seem to work in ob-shell sessions anymore. That is a bigger problem for my use case. > > I believe this approach would be > > generally more robust, but the major weakness is that it would break if > > you SSH'd to a remote host in the middle of the session. I guess, SSH doesn't work with the current implementation either. This isn't a feature I need, but I have seen others make use of it in the past, e.g. [1]. > Instead of writing to a temp file, it could use a here document. > Here documents, AFAIK, are POSIX portable, although function > definitions aren't. That is a really neat idea. Sadly, "conda activate" doesn't seem to work in here-documents :( ob-shell is really tricky, with so many cases (bash/zsh/fish/Windows/etc). Perhaps ob-shell could have a main "batch-like" implementation (either here-documents, or source'ing tempfile, or wrapper function), but also have a fallback line-by-line implementation for certain edge cases? [1] https://howardism.org/Technical/Emacs/literate-devops.html