From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id MJOgIyOL2GWZpQAAqHPOHw:P1 (envelope-from ) for ; Fri, 23 Feb 2024 13:10:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id MJOgIyOL2GWZpQAAqHPOHw (envelope-from ) for ; Fri, 23 Feb 2024 13:10:11 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=AJnhyRFP; 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=1708690211; 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=km/A22NcISdhHZZpRTaDjT53irO0YmPxrknrrmzYKGk=; b=qSHJFNK+qdGg61uviU9RGIMcS2/Fwt+9fByKjTuFu6LJ2mHPRDzPTDcCJXCVwHo8hcMLib TphvJh8RX0VbPC5euz67w8XXHMhAYqsbLPEjybbByz4hs6MTEjYX9WVZ2l7b4tCDx29pPU UN2teMJbiFLKxNWEfPUdlcsActngll/7IAVtZ3loYtfNymHf1rNhG1MISSooFQ7lRItn5L RE44f7zMHzRsQcOQIhOwakjsWDmrKveG8ie8x0T9KRny6+pYqH9OjmfV5rqzGw8U4baIkr qQEJUwBCWZ1gIaEX8PD5UB8JCCRPzUVsC1II0aL6zQks0rcv4mV4C43kbnykWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=AJnhyRFP; 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=1708690211; a=rsa-sha256; cv=none; b=cmXCnadUogQW0WQpeo8dihXmWzof5xpkIGV+zXmCT3s/91vbVPvgJU6CKVyUDsTdu1GUPS sHjCy5cUw9v8y9r4EgoRcOHoZw6Qy3TyqSSsPhkRALnul7vhtlO+vhghRXVlenYbndR6j+ C2rm/c4Jh4RkxtV4C/TydXqwBKswva0QTPcgVKJh09BkIlys/739GrjOshwPXr8ncOaKSl 2pF054+OHs/849TgQoP6V+/AW5pW6s2CEi4oU6ll+lQAhrxKdmsjB90yG8bA57mcNZSFyF g6SJIUNlODWN5zlhAOaKALLbAVEbR8+5AbLTOXBFMY6qZhY7vefOqbeCEbUDbA== 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 B91AF23489 for ; Fri, 23 Feb 2024 13:10:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdUMe-0006To-By; Fri, 23 Feb 2024 07:09:16 -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 1rdULE-00069O-VF for emacs-orgmode@gnu.org; Fri, 23 Feb 2024 07:07:49 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdULC-000494-1t for emacs-orgmode@gnu.org; Fri, 23 Feb 2024 07:07:48 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id BE66B240029 for ; Fri, 23 Feb 2024 13:07:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1708690062; bh=E/bsgBR2NGm32HoTfttyPUZsDb+L45fbrb06C1KWFvg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=AJnhyRFP5NhJeaIvTGFaqcj+4KhvfFoxSstmGRwRGe1IoTjvKWDR/T/UOuaXzWL7j +kj23BWM6YrrN7xdzgHlIyPU6uduMCUfOXqLMgLEwQ0mWKHHzf4IpIaqwaB27oA1qp HEnOzBHRYtr/9S8Om4YMjVJeI+53ew3NaIHvpxmDSvCP/GiPBHs5bFMsVIyWFzcoNj 5lBbqZwUpe6dS0Z6SN5AQhWcnpeimoak59slPfZzZu+c+YdFmzYxSRpBvkITtxQkBy vjtyOnJEz+WaRcAcIBeg/RnFJcTbWu8LhQN85oLt17Bc6Do7SO8XQFJ4mH3mOTwXjq c5wDigkYGdPDQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Th80F3H1yz9rxP; Fri, 23 Feb 2024 13:07:41 +0100 (CET) From: Ihor Radchenko To: Bruno Barbier Cc: Matt , Jack Kamm , 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: <65d61ec7.050a0220.999f7.a39b@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> <87frxohlgo.fsf@localhost> <65d61ec7.050a0220.999f7.a39b@mx.google.com> Date: Fri, 23 Feb 2024 12:11:25 +0000 Message-ID: <87jzmvjs7m.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H3=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-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -4.56 X-Spam-Score: -4.56 X-Migadu-Queue-Id: B91AF23489 X-TUID: wUrJ7185W/Ws Bruno Barbier writes: > Note that only the first 5 patchs are real patchs. The remaining things > are just a demo how it could be used. The current async (ob-comint) > depends on writing UUIDs in org files, and, that's why I couldn't use it > as a demo. I'm thinking about dropping the patch: > > 'ob-core async: Add org-babel--async tools [2/5]' > > and just provide an other new keyword (feedbacks-with) so that anybody > may plug its own feedback process. May you please clarify if adding the new code block parameter that defines custom execute function is something you want to add to Org mode or just a helper code to demo you main patch? >> Or consider user running an src block, quickly editing it, and then >> running again. What should we do then? Should we stop the first running >> process? > > To keep things simple and generic, I would just forbid the user to > reschedule the task until the previous outcome is available. This may not be as trivial as one might think. Consider #+name: foo #+begin_src bash :async yes ... #+end_src #+results: foo Another code block with the same name will write results under #+results: foo #+name: foo #+begin_src bash :async yes ... #+end_src We can currently have multiple code blocks writing to the same place. And async execution should not only check is the current src block is scheduled, but also whether we are attempting to write to a place where no other running block is scheduled to write. >> - on failure, Org babel sometimes uses ~org-babel-eval-error-notify~. How will it interact with asynchronous evaluation? What if we have multiple simultaneously arriving error notifications? > > In the asynchronous case, I've decided to leave the overlay in place > in case of errors, with the error description. Clicking on that error > pops up the same kind of popups as in the synchronous case. Error buffer does not necessarily appear on failure. When the code leads to process writing to stderr, we also display error buffer. Even if the process exits with 0 code. Also, your code currently creates overlays unconditionally. However, when we have :results silent or :results none, Org babel must not modify buffer. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at