From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id eEH0EMad0mUEEwAA62LTzQ:P1 (envelope-from ) for ; Mon, 19 Feb 2024 01:16:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id eEH0EMad0mUEEwAA62LTzQ (envelope-from ) for ; Mon, 19 Feb 2024 01:16:06 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ah0GIlyY; dmarc=pass (policy=none) header.from=gmail.com; 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=1708301766; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ybKZXHbJu3NF9nWpiVQKDvp4BgokfG0u9ZVA79OGM/w=; b=UI4yizPuQbiIHaNrFUyx31BHhLliIjR7MGoalXphTd4tR4G4i8v7s8CourJbEn5RLZ31iW sUYVC+HgDXkqq5CvAf0OKTe2U1JB2JEh3C5+QFB+JfbMW+nAdHqr3pBmffxuXS/TlLZdOh XrvHTIndj+p6fnhhUecCn5Fcz/nj/uhMOqVN2gXBzTSqq6BCkLEG+joJNGXw1cUAVMO4gT Ldr+cc+lH65Q/Oq34L3OHv0VadmSksXKBK3rpsF6qapf33+bEIb69n8GVWbBuZ1ljfekLl 6cK4/zpiBTK71zsCo1lWUH1V+jUofg/FDmlTLfPeoAOEQK0x4h3GX94I4rQ+yA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ah0GIlyY; dmarc=pass (policy=none) header.from=gmail.com; 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-Seal: i=1; s=key1; d=yhetil.org; t=1708301766; a=rsa-sha256; cv=none; b=S3kZLpd4BGrRIOyt6+B0xEkINmG3ZtrPR78IEE4st7AdTImiuSvyHuGa5bcpvSuzGNA7Ok OoeTI3ihihrL5VIFO1qk0UDRyeBNjDiTMtbuM8vACW0+33xZX89yqKxCyXaWmxEm4dSwnl tEQMWb/nZiMUaJ88Wy+VYzdfn9P9aJmp50MpsLugSvUhsnM3VJoUaoGG5YzcCcSmHA615t x8x87w8r+0ZbkH2yHgo7DUXvTmMott1Tg/jSZKcLuI46Lpn2lcPULwUPcG8m4daBEi4Brc 3ewShp/orSMO/2ym5DW35RDdz8laC8yn2U2wxHmjz32aBZX2xRr/zh46q4/1QQ== 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 01CB6546D6 for ; Mon, 19 Feb 2024 01:16:06 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rbrJT-0000I5-LY; Sun, 18 Feb 2024 19:15:15 -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 1rbrJS-0000Ht-9D for emacs-orgmode@gnu.org; Sun, 18 Feb 2024 19:15:14 -0500 Received: from mail-oo1-xc29.google.com ([2607:f8b0:4864:20::c29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rbrJQ-0003NX-EC for emacs-orgmode@gnu.org; Sun, 18 Feb 2024 19:15:14 -0500 Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-59927972125so2556168eaf.3 for ; Sun, 18 Feb 2024 16:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708301710; x=1708906510; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ybKZXHbJu3NF9nWpiVQKDvp4BgokfG0u9ZVA79OGM/w=; b=ah0GIlyYTrwP1cCZBIVitj4kTBxoknkNjfHAtM18QDm3DcZM++7C8tN6pDbA4+MAW+ kS0HoP8Zq5jDwzJRtLaiPAwZ4X1tC1NgM9mIvU9/aIqBLP4JjaOpeKpaGaJYD3Aq7Wci HbucT12p4lwA7APHPdlCJQUVytI/FbDLjUrM56WHV7d19GLuycMW9WxEVuXntsz4QBEJ iqiFmpcErMmDLAMW/6nNXTcrXZ3wIfExfEbQa3I+jr+c/+JDsNHxbv3DyFtAZhI+Rh8h 8o6XYq62/3m0TeQsJUQ9FBI0qsxur549xibAvC8atYYmwjPgwWiZHf70CSYpKQzqHMOz RkZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708301710; x=1708906510; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ybKZXHbJu3NF9nWpiVQKDvp4BgokfG0u9ZVA79OGM/w=; b=G6Pzt1+RENM605oOVqU3m89RBQ1NthFM7gpADF0izMTTN3/7GcGr0cuXZK9s6n31FI 3y3QVXE0fjfT66SZjwKLPHBkyHxDUjp2lx+zCpntTInCb2j/mguaxlrb4Rjsso/MaKee 8EYAlu4cN2ov5SiONlzdyZaF4AxLuwhnI4tVBR3iXYBeVH7avkENoH8HDBHk7uXVyVdr GitsRn+CHL/LoYqY2WCYynt1zkHqhQd1uyWVursDmtLsteu1kNC/trhdUEq5NIZE5dPz hbm/1ApAauxJmJi3HT3U3eFA90MmzYw9Bpq0JT6XwoIM/VQkyQ9bZV2tgrdW0zBfUHXg 8IhA== X-Forwarded-Encrypted: i=1; AJvYcCXKVz7WtaThi9ziyJCCo6bLy9mY/0s/YJJbiH+t4oQbTcc44YNW4x3bklO1urvVITwf0e6rH5Jbju/QAXfxB6eTgIEEg1M= X-Gm-Message-State: AOJu0Yyc9waOc4AooR88wRL33NXhgd7yMuvTMdF7MyRz73PH+p0rojdp nD61gXHkOupAHUi0dwokrj8QmolkDMJc5qNepQ+DnTMIZbIhsZcE X-Google-Smtp-Source: AGHT+IEohDsn6647nHByTNga8FRMAJg5y8ljxFo+V40FQNTO+k1c4BP1NVDGlfVi2vNlToTzRdVb7A== X-Received: by 2002:a05:6358:8097:b0:176:226:1496 with SMTP id a23-20020a056358809700b0017602261496mr12431594rwk.6.1708301709946; Sun, 18 Feb 2024 16:15:09 -0800 (PST) Received: from localhost (157-131-78-143.fiber.dynamic.sonic.net. [157.131.78.143]) by smtp.gmail.com with ESMTPSA id s12-20020aa7828c000000b006e0651ec05csm3506669pfm.43.2024.02.18.16.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 16:15:08 -0800 (PST) From: Jack Kamm To: Bruno Barbier , Matt Cc: Ihor Radchenko , emacs-orgmode Subject: Re: Asynchronous blocks for everything (was Re: [BUG] Unexpected result when evaluating python src block asynchronously [9.7-pre (release_9.6.17-1131-gc9ed03.dirty @ /home/yantar92/.emacs.d/straight/build/org/)]) In-Reply-To: <65cfa0d8.050a0220.cb569.ce34@mx.google.com> References: <87o7d0mm54.fsf@localhost> <65bbb108.050a0220.b60fd.6790@mx.google.com> <87jznm8hcu.fsf@gmail.com> <875xz42rp9.fsf@localhost> <874jen8zec.fsf@gmail.com> <87o7cv9e80.fsf@localhost> <65c2875f.050a0220.caf6d.8291@mx.google.com> <18dae5cab1d.bf1c7563863897.4896289306902277373@excalamus.com> <65cfa0d8.050a0220.cb569.ce34@mx.google.com> Date: Sun, 18 Feb 2024 16:15:08 -0800 Message-ID: <87a5nxmhrn.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::c29; envelope-from=jackkamm@gmail.com; helo=mail-oo1-xc29.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: -6.73 X-Spam-Score: -6.73 X-Migadu-Queue-Id: 01CB6546D6 X-Migadu-Scanner: mx13.migadu.com X-TUID: 2byhucLOP+/s Bruno Barbier writes: > I'm not using it with official org backends (yet). I'm using it with > several custom backends that I'm working on. One of the backend > delegate the block executions to emacs subprocesses: so I have a kind of > asynchronous executions for free for any language, including elisp > itself. For sessions, wouldn't running in a subprocess prevent the user from directly interacting with the REPL outside of Org? If so, that's a problem. Org-babel sessions need to play nicely with inferior Python, inferior ESS, and other interactive comint modes. > So, here we go. You'll find attach a set of patchs. It works for me with > Emacsc 30.50 and 9.7-pre (from today). I suggest to keep these patches on a public branch somewhere, see: https://orgmode.org/worg/org-contribute.html#patches "When discussing important changes, it is sometimes not so useful to send long and/or numerous patches. =20=20 In this case, you can maintain your changes on a public branch of a public clone of Org and send a link to the diff between your changes and the latest Org commit that sits in your clone." I tried running your example on emacs29 using emacs -q -L /path/to/org-mode/lisp my-async-tests.org but it fails with the error below. Also "make" gives a bunch of compilation warnings (which I've put at the bottom). > +You need to load: > + #+begin_src elisp :results silent > + (load-file "my-async-tests.el") > + #+end_src This raises the following error in *Org-Babel Error Output* void-variable (org-elib-async-process) [ Babel evaluation exited with code 127 ] All the subsequent blocks don't work because of that, for example: > +A simple execution: > + #+begin_src bash > + date > + #+end_src yields: org-babel-execute-src-block: No org-babel-execute function for bash: my-s= hell-babel-schedule! Finally here are the warnings when running "make": Compiling single /home/jack/src/org-mode/2024-02-brubar-async/lisp/ob-core.= el... In org-babel--async-feedbacks: ob-core.el:851:2: Warning: docstring has wrong usage of unescaped single qu= otes (use \=3D or different quoting) ob-core.el:871:9: Warning: Unused lexical variable `result-indent' ob-core.el:906:18: Warning: Unused lexical variable `header' Compiling single /home/jack/src/org-mode/2024-02-brubar-async/lisp/org-elib= -async.el... In toplevel form: org-elib-async.el:52:11: Warning: reference to free variable =E2=80=98org-e= lib-async-process=E2=80=99 org-elib-async.el:52:43: Warning: reference to free variable =E2=80=98&key= =E2=80=99 org-elib-async.el:52:48: Warning: reference to free variable =E2=80=98input= =E2=80=99 org-elib-async.el:52:54: Warning: reference to free variable =E2=80=98callb= ack=E2=80=99 org-elib-async.el:78:29: Warning: reference to free variable =E2=80=98comma= nd=E2=80=99 org-elib-async.el:127:9: Warning: Variable =E2=80=98last-elapsed=E2=80=99 l= eft uninitialized In org-elib-async-wait-condition: org-elib-async.el:137:12: Warning: =E2=80=98signal=E2=80=99 called with 3 a= rguments, but accepts only 2 In end of data: org-elib-async.el:262:16: Warning: the function =E2=80=98org-id-uuid=E2=80= =99 is not known to be defined. org-elib-async.el:52:35: Warning: the function =E2=80=98command=E2=80=99 is= not known to be defined. org-elib-async.el:52:2: Warning: the function =E2=80=98cl-defun=E2=80=99 mi= ght not be defined at runtime.