[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Asynchronous blocks for everything (was Re: [BUG] Unexpected result
From: |
Bruno Barbier |
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/)]) |
Date: |
Wed, 21 Feb 2024 16:43:48 +0100 |
Hi Jack,
Jack Kamm <jackkamm@gmail.com> writes:
> Bruno Barbier <brubar.cs@gmail.com> 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?
Good point. The REPL should be created in the same subprocess; the
REPL display and interaction must happen in the user main emacs. If
the REPL is based on comint, it should be relatively easy to
implement.
> If so, that's a problem. Org-babel sessions need to play nicely with
> inferior Python, inferior ESS, and other interactive comint modes.
With this solution, the user and the REPL/execution will be in
separate processes; so there will be disavantages. For basic
interactions, mostly based on text input/output, it should work well.
>> 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.
>
> 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."
Good point. I'll switch to such a solution as soon as possible.
> 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).
> ...
My bad: I should have compiled the demo code in a standalone emacs.
I forgot to require some libraries: cl-lib and org-id.
I've now tested with your command line (thanks). It should now
work. Sorry about that.
> Finally here are the warnings when running "make":
I should have fixed everything; no more (new) warnings.
Thanks!
Please find attached the new set of patchs. I'll switch to using a
clone and a branch soon, in case if you prefer to wait.
Thanks again!
Bruno
0001-ob-core-async-Add-faces-1-5.patch
Description: 0001-ob-core-async-Add-faces-1-5.patch
0002-ob-core-async-Add-org-babel-async-tools-2-5.patch
Description: 0001-ob-core-async-Add-faces-1-5.patch
0003-ob-core-async-Refactor-handle-result-3-5.patch
Description: 0003-ob-core-async-Refactor-handle-result-3-5.patch
0004-ob-core-async-Handle-nasync-param-4-5.patch
Description: 0004-ob-core-async-Handle-nasync-param-4-5.patch
0005-ob-core-async-Add-execute-with-5-5.patch
Description: 0005-ob-core-async-Add-execute-with-5-5.patch
0006-lisp-org-elib-async.el-New-package-about-async-helpe.patch
Description: 0006-lisp-org-elib-async.el-New-package-about-async-helpe.patch
0007-lisp-ob-core.el-Notify-when-execution-fails.patch
Description: 0007-lisp-ob-core.el-Notify-when-execution-fails.patch
0008-scratch-bba-ob-core-async-Some-temporary-test-files.patch
Description: 0007-lisp-ob-core.el-Notify-when-execution-fails.patch
- 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/)]), (continued)
- 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/)]), Matt, 2024/02/15
- 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/)]), Bruno Barbier, 2024/02/16
- 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/)]), Matt, 2024/02/18
- 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/)]), Jack Kamm, 2024/02/18
- 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/)]), Ihor Radchenko, 2024/02/20
- 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/)]), tomas, 2024/02/20
- 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/)]), Ihor Radchenko, 2024/02/20
- 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/)]), tomas, 2024/02/20
- 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/)]), Bruno Barbier, 2024/02/21
- 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/)]), Jack Kamm, 2024/02/18
- 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/)]),
Bruno Barbier <=
- 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/)]), Ihor Radchenko, 2024/02/19
- 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/)]), Matt, 2024/02/19
- 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/)]), Ihor Radchenko, 2024/02/19
- 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/)]), Ihor Radchenko, 2024/02/20
- 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/)]), Jack Kamm, 2024/02/20
- 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/)]), Bruno Barbier, 2024/02/21
- 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/)]), Ihor Radchenko, 2024/02/23
- 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/)]), Bruno Barbier, 2024/02/23
- 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/)]), Ihor Radchenko, 2024/02/24
- 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/)]), Bruno Barbier, 2024/02/24