From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id z4c9BZcIE2FRfAEAgWs5BA (envelope-from ) for ; Wed, 11 Aug 2021 01:15:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oCGPO5YIE2GkYQAAB5/wlQ (envelope-from ) for ; Tue, 10 Aug 2021 23:15:34 +0000 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 4C8DE1AB61 for ; Wed, 11 Aug 2021 01:15:34 +0200 (CEST) Received: from localhost ([::1]:45342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDay4-0006S5-F3 for larch@yhetil.org; Tue, 10 Aug 2021 19:15:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDaxg-0006Rw-CE for emacs-orgmode@gnu.org; Tue, 10 Aug 2021 19:15:08 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:36407) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDaxe-0004VC-S1 for emacs-orgmode@gnu.org; Tue, 10 Aug 2021 19:15:08 -0400 Received: by mail-wr1-x42b.google.com with SMTP id b13so287804wrs.3 for ; Tue, 10 Aug 2021 16:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=txpxxcU4QziVfwV6nbIu0rZodvlJ/pitgCSWPncaP7o=; b=Ne0z1xbIIku1rfJQP982o4wxKRkaS8vR2wEp2H9uI/ZzQlqtJlKCW6Su/mFUbTSf/6 zH9PREokqu2g2UauWSaWoFSK5RmT0GNi6G1HjYqKO/3xBToaSXJS60+MBLid3QJxoCG/ Eo060LhPohn075t8DuE7tA4zorKWziGHZh4DoRL+yrVNxaWHxHkKl0Jt5A8xJtluRdPA lCDW27X7kgkj98yDqK44IYvNO+cIN3UQ+UNFBf8RWa0ddb+xZ4RVFGUvIkvy9Ofu7j3R tYkQGXwBVsjfeS1rxDslenZLzjhHkVdAcdwYPz9ClEYXmzQiQA3f62U1zaM8280z/V0f tlAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=txpxxcU4QziVfwV6nbIu0rZodvlJ/pitgCSWPncaP7o=; b=fHPR/G/iGuvQqNJkCzbaA9MRMEftYTl7Y9sorTxJabuH5myYC9Rc7bBlOpRIxAIuNE IDdKTXyfryKASSzziqEDIAf7n6pSmjRiVMnNAJf0J8fgzqop4A1zmfz9RSO59+EJmbHk JReFRtjSdGF4wpJNfBktYT1FmFMfenKVNoLNbhLPQfEsB46TKpTTxX1B14Uw2LfDVNoC goXDJETIOkfqTClFGupPZcmBD7nmSeU4EYGbSQS3WWmFQWMe2KbtHuKBHiPja8o5zkPu lPUDfDOkGVaLkF3TukHBkvSeoj9AN9ucToT15VpSrGIpJcriJ1zOr033UMeMaxpbJyWw 5qaQ== X-Gm-Message-State: AOAM530sipmsdssUGSWNHg9P2igTGrh5H1gjq0BzD9u6NkoblHZ+zC0m dJzWXFUN3d6cQpDVis+BqlsALH2VTNWx69HL2oc= X-Google-Smtp-Source: ABdhPJyNf2qY0JANZ5h/ZenW/TDdU9AQKXSny9ecbFkUrJvNcdHViInYTmJkQZTDXd9y2hje9gkSe1hLx1lVTMWbLqk= X-Received: by 2002:adf:e804:: with SMTP id o4mr32817419wrm.55.1628637304769; Tue, 10 Aug 2021 16:15:04 -0700 (PDT) MIME-Version: 1.0 References: <3ac06f2a-c14b-593f-a6e2-8e1c85c19436@pdx.edu> <87czqlf0gg.fsf@gmail.com> In-Reply-To: <87czqlf0gg.fsf@gmail.com> From: Tom Gillespie Date: Tue, 10 Aug 2021 16:14:53 -0700 Message-ID: Subject: Re: bug: Error handling in source blocks. To: Tim Cross Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x42b.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628637334; 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=txpxxcU4QziVfwV6nbIu0rZodvlJ/pitgCSWPncaP7o=; b=YAS9SuedMF9O/4cHyevv6OBERCdMf7F5UYAXMrSipTsh/vXcA0vAqcus3iTqyAjtALLxnD Wg2h1Rj1OJxFtSnfmeew3ApXQF8KYV4oGXbWKUtHBzpPIBSLAjlsDEBuJxRor4VEwnBcgV hmBpYku3/pnYLY1e38m3lVjLc0y1k6TMkdKzldjFVySTa5prPi7Pe5oflYJGoH3IBlJ7X4 6f88YsQYd5tivnlCRflZc9JWrN2YhyZbPgdF2JgRUUJbAoLhYn9pQCsoGJq3X0iOITr4tt TjEj0DRR1mo/jp/2AiCczgnKIHHR5PAigY3Pk8ewPVmsZEGuvDaNT2XK8QA/Og== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628637334; a=rsa-sha256; cv=none; b=HL43TmA0aHiW62WghLyB7CfLeTWUEFpzri0kgIOTqk4HAoJgjTLd750lwlwy4JFHDiJ+4L 8K8wViNAqYMsBvmsqe27rOVIv1k3Y1NK8BSZexcLhkhzgl5Km1T/GuqzuPAIhHYTa52h4s Imp/sbFz+kE2h9jt32EClSxp0W/wSlFw68JXLrTr+gfndbzxckgRIf6E+GYACJyE581mku l5/piZZkh14tyYP28DYbRWVul2UGoRFcHjQwibe4oIhO1Te9lRd7G0ccWu6iKYPlRyA6DR ubxjtF7IeKUXSWNGyt38JjiC7r2RJ2v0+bUuNqSDct+hd+EcKCfKk+e2GqZwVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Ne0z1xbI; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Ne0z1xbI; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 4C8DE1AB61 X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: IhCC0yTGSLLR I will also chime in here to say that managing output streams and errors for babel is a major new feature that I am interested in. The issue, as Tim points out, is that there is a lot of complexity lurking here due to the fact that certain languages have fundamentally different capabilities and ways of handling or not handling errors, and of running code (on arbitrary hosts) in the first place. What works for one will almost certainly not work for another. Take for example ob-lisp where there is already built in error handling in emacs itself. Compare that with python where someone would likely need to implement a special PYTHONBREAKPOINT entrypoint or something like that, if it were possible at all. I have had a draft of a document on what I called "babel regularization" for well over a year now, but it is not in a state that would be productive to share due to the sheer number of ob-langs and systems affected and the need to be able to clearly catalog and articulate the diversity of existing behaviors. If you dig through old conversations on this list you will find a discussion of the default behavior for ob-shell :returns values vs output as the default, we were barely able to agree on which principles should be followed to make the decision. In that case we were lucky that there was already a way for users to set their desired behavior in their init file or in a setup file or in the file itself. How to handle errors will be much more complex, in part because it will touch on what ob-lang implementations are able to overwrite and/or must provide in order to actually function. At the moment there are practically no constraints. Lots of work to do here, so grateful for a report on the variability in the behavior of the existing system. Best! Tom