From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 sLTqFKuxuGKUagAAbAwnHQ (envelope-from ) for ; Sun, 26 Jun 2022 21:21:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EBD0E6uxuGLupQAAG6o9tA (envelope-from ) for ; Sun, 26 Jun 2022 21:21:15 +0200 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 EA2F724447 for ; Sun, 26 Jun 2022 21:21:14 +0200 (CEST) Received: from localhost ([::1]:49134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5Xon-00070V-Oh for larch@yhetil.org; Sun, 26 Jun 2022 15:21:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5Xo8-00070N-Gk for emacs-orgmode@gnu.org; Sun, 26 Jun 2022 15:20:32 -0400 Received: from mail-40141.protonmail.ch ([185.70.40.141]:53922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5Xo6-0004HQ-Ka for emacs-orgmode@gnu.org; Sun, 26 Jun 2022 15:20:32 -0400 Date: Sun, 26 Jun 2022 19:20:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1656271228; x=1656530428; bh=rg7efgc/z/Tf7nttHi+gqGPjH5TkQDwA+v6/CXlDsuA=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=Lu6+iSocN4LtwpMlYHjCKOWdJIl67S0KjdGGGbOzx1wcFfyxfoOg9YxYsYMYGqF08 l++XbscJefrZymbQBXCDctRIbJpT2i5gKiYSX4kDX5xMypu7CTfJwVA9EqFdXCEYmk 7p4RnAGWrqNAwcsmYHr4BN9OCnEIKOLUAQv0HYsrAEI+TSJjXM7U4R0MDU7Bb85gFD AMuy8FvwuAsd53b/OzHXL0L9FjgFIKtBaIwIV33WVnN6k+j7w4dCq2vrt6g4KQrjRv JFljCgzapEST1PW6K+A7ZX42Di4Wa+Xxm3ZoDeLC3ZyrELgcQAzCZEb5PhYXeUAujc LxCEQVPPg4M0Q== To: Ihor Radchenko From: Ivar Fredholm Cc: "emacs-orgmode@gnu.org" , "bzg@bzg.fr" Subject: Re: We have asynchronous sessions, why have anything else? Message-ID: In-Reply-To: <87fsjs3xws.fsf@localhost> References: <87fsjs3xws.fsf@localhost> Feedback-ID: 16540637:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.141; envelope-from=freddyholms@protonmail.com; helo=mail-40141.protonmail.ch 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, SPF_HELO_PASS=-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: , Reply-To: Ivar Fredholm Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656271275; h=from:from:sender:sender:reply-to: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=rg7efgc/z/Tf7nttHi+gqGPjH5TkQDwA+v6/CXlDsuA=; b=uEC7vPtG0+/5sCE5v8550cVJLTNtgZzPnBGsXchCLYKNyXkhgDcyhmEGe0yEKOVR7t7Rp3 qmCPEx50lRttE7RtM8xCNEtrRXvjNu2EL+rpIFViqSp0qN7QOw01/rCoC/HA5jA8ROqvaf RmaUJpg4Su/VJMcs7kQBkDznFaR4EiNnCUWxN2P5L2spVWhNvs5DnoxHYXod2sWgpleZMd gmpYPiido46RseTqGJZNcwG9H0oPTCddwBBHPxXJSTHyqWHe7fi26nihOsLluKx8cjNPPx t4z2kScrFG7WhaP5bUglAFMvmmsr71vSjgvW3flvE65/czd5snItNLF/9R+mxQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656271275; a=rsa-sha256; cv=none; b=EuDWxQ/xr68UYe4nozz6iAZvKdyQ73v7YD85EwS4sGcL1EEL/nzbJnweulnEJqSg1qV0u9 anxkOQfShUUSjj2lFuHLt7BI4ZsN6fvvvEPdhLzjyyB+DMBs5ZuKsUTHC2jTVLQDgBZpRF ooscwAVdFjATRfMOpv2i6Vytf7zAMAYOrvo5rGGIlCX/5JT/i70co83RmHWtCoQV9SEsqy b2ocB7qTwKQNsUHhYUEw5Bh5G9A49mYDpDdcRJAchIXq6+61lexZQnhmUUOsJ1QormF+mT FELRS4OFZQC6wSoVBVSv+XKYnUi+1PlVswqrKJYejIFTUx20Fww9PPRy4LK4Gg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b=Lu6+iSoc; dmarc=pass (policy=quarantine) header.from=protonmail.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" X-Migadu-Spam-Score: -6.26 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b=Lu6+iSoc; dmarc=pass (policy=quarantine) header.from=protonmail.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" X-Migadu-Queue-Id: EA2F724447 X-Spam-Score: -6.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: /ss5xmwdYqpY Hi, Ihor, I believe the two could be unified if we expand the functionality of the as= ync filter to look for 'exception' tags. Then each language implementation = must only put the org-babel src block in a try-except type construction and= put the error message into the except block. The async filter will then fi= nd the error information and report it back to the org-buffer. We could the= n emulate the synchronous session functionality by adding a filter to the a= sync-filter which blocks until an 'end' or 'exception' tag is detected. Thi= s way, all four combinations of session/session-less and synchronous/asynch= ronous header arguments could be handled by the asynchronous code alone. Best, Guacho Sent with Proton Mail secure email. ------- Original Message ------- On Saturday, June 25th, 2022 at 10:28 PM, Ihor Radchenko wrote: > Ivar Fredholm freddyholms@protonmail.com writes: > > > A session-less block can be executed by starting a session with a speci= al name (say "*none") which always gets killed after block execution is com= pleted. For interpreter-less languages, we could use the shell as an interp= reter (for instance, if we wanted to execute C, we could just start a shell= , and send it the gcc command to compile and execute). Would this not cut d= own the amount of code that needs to be maintained and uniformize the exist= ing code? > > > Feel free to compare ob-eval.el and ob-comint.el. Their functionality is > not equivalent. In particular ob-eval.el has a better handling of > errors. > > If you find a way to unify the two without loosing the functionality, it > will be welcome. > > Best, > Ihor