From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id eDZ0N2ZdhGaQcQEAqHPOHw:P1 (envelope-from ) for ; Tue, 02 Jul 2024 20:04:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id eDZ0N2ZdhGaQcQEAqHPOHw (envelope-from ) for ; Tue, 02 Jul 2024 22:04:54 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bXi4tqTb; 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=1719950694; 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=3mzLqyt/+PjaieFQh0QrsqCNjphJbk7CCp1eQ3l/eYQ=; b=BoQUaRUM6635n3cuF3mfBldnkRWsUGYDO8V7JAevf+OKwGuLaLtNEQzQw4B08hiD9xN+YT 7arIW+51lylXqirWTPMFsba9RzZBP9gflHZCmAy/9J8pBpoU6xTEyAs6TAFHhp8ZBFogN7 s3Ffa7r/n7iN7N9KiTBSdWmv8BrODDP7rizn4xaCoYUWOnxFWc9kulH8nmLLgVJPpbsCHG +fHSbEhY2B3nDqnnfPjY/EXf/UHkgr9mUIdIuMaURDvTInffV9TJoDpnstWnhL8GT///qg wgBhy0Rg4NviBsrps8bvQn5xuZL9XHyrynZYDKqE5hD/jx2KVlFzqs5SOjU9ww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bXi4tqTb; 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=1719950694; a=rsa-sha256; cv=none; b=uWNa0SquyT5Cx+I3RGlX4IOyU8oROk/F2VIRcrEGHyEL8fL/9zy0Ac9wxo2SPhphg2gS2E kNYu13sEm3UPOjkPQ0dpmI7Avy93J2UBcrYVxthVOGZCBGLhcnI10QXifGWVtAIGHY/2vq MwcCupX8H7VTPER7jTXE6QuN7a5mszYOexWa5PU9KNRKcvZAKFpXGv27LfrN463VHbr/eu 1tGCW1cnVrmE9GQpGtKBpVkY3SzVbW9BwPLBreqQLur0e6b8Bcnxelqe9LYqPDmdRxIz7D WVMGz83eynuzPbwt+SbPfQwj4k2zOvyvI0B1Lyegf21Hh23f/gNnY27YNgVclA== 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 B76016D408 for ; Tue, 2 Jul 2024 22:04:54 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOjjQ-0004PC-IL; Tue, 02 Jul 2024 16:04:04 -0400 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 1sOjjO-0004Oj-RC for emacs-orgmode@gnu.org; Tue, 02 Jul 2024 16:04:03 -0400 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 1sOjjM-0005d1-CI for emacs-orgmode@gnu.org; Tue, 02 Jul 2024 16:04:02 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 771D4240028 for ; Tue, 2 Jul 2024 22:03:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1719950638; bh=aL8OcY4qhFjdCz4bEQ92j0Uv4StT1Ib+KKRmM/f5ZwE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=bXi4tqTbwx8bL/nj2UoiBk+a1ChbdRjWXEW0KpeNKq7OzKlWEEYxg/VXAhxPkCNmU zxr2Di0BhqdLcGo9bTEfb1v43DewyG8hyq4nmYZ2rCkszh0Lqs8QM2gfrVoxSJB7tM t74b/sibyNsGoLECj/JVGShd9dPx8UcHxuPXZQdhDFYv7+jxPRc/Z9gTdU/XUoUWKn Of6t/hugxQFtWrVx76+3syQoOh3lF5ZEg8S2+fe2+Wp0bvREMPGyEfrDx8EAu9PGC4 MWkilvlCiZj5ygZZin93Oam3hvMM7Lfko2abbEVngLrXAYOoWu6zHKE2Sgjylvbxfv U4bKB1CSl9WzA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WDDPn5c4Wz9rxB; Tue, 2 Jul 2024 22:03:57 +0200 (CEST) From: Ihor Radchenko To: Phil Cc: Max Nikulin , emacs-orgmode@gnu.org Subject: Re: org-babel-execute-src-block filters characters from :session *shell* output In-Reply-To: <5d3c8cce-b79d-43c2-baaa-459fea1ed3d9@7d.nz> References: <87ikybk44c.fsf@localhost> <87o782gx7o.fsf@localhost> <87h6dra1ut.fsf@localhost> <874j9al08g.fsf@localhost> <5d3c8cce-b79d-43c2-baaa-459fea1ed3d9@7d.nz> Date: Tue, 02 Jul 2024 20:05:34 +0000 Message-ID: <87bk3fa7ap.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: B76016D408 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -9.60 X-Spam-Score: -9.60 X-TUID: F5ebGDuoAACk Phil writes: > I'd like to add a few general remarks about *error status*. > I'm starting to notice there are not much subprocesses > that to do get called through =3Dcall-process=3D with > =E2=80=98(REAL-DESTINATION ERROR-DESTINATION)=E2=80=99 kept as > separate. You all know how useful stdin/out/err and > the return codes are, but they're absent from Babel. They are not. See `org-babel-eval-error-notify'. Not for sessions though. > That's why a failed command will still provide a result > =E2=80=94 an empty array for instance, something that looks > legit even when it's not. I had again this experience > with =3Dob-http :pretty=3D and =3Dob-mongo=3D lastly: errors are > silenced. The API is there, as long as individual backends can separate stderr from the rest. > Comint reads and write from/to terminals with all > three standard channels together. It's meant to > provide requirements to communicate with non-POSIX > terminals too. It's a great library but perhaps > there's a need to specialize things further when > dealing with one shell? > So In Emacs, those specs would land either in one precise > (possibly low-level) shell extension or a generic one that > would once more care for the many idiosyncracies every one > of them have. It would be nice indeed, but it will be a huge work. > Something I figured when dealing with ob-sql-session is > that if several commands are given in one batch (what a > babel source block is in many cases), they can either be > all run until the end or be stopped when an error is > met. In both cases, knowing the number of errors met is > possible in one shell that do agree with the convention > of returning a value for every command (or command line). May you elaborate? > Otherwise, a terminal "reader" has to reinterpret the > results. > > [[info:elisp#Synchronous > Processes][elisp#Synchronous Processes]] says : > > You can=E2=80=99t directly specify a buffer to put the > error output in; that is too difficult to > implement. > > Can someone explain why? No idea. You better ask on emacs-devel. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at