From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qGOfHVx6cGZIhQEAe85BDQ:P1 (envelope-from ) for ; Mon, 17 Jun 2024 18:03:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id qGOfHVx6cGZIhQEAe85BDQ (envelope-from ) for ; Mon, 17 Jun 2024 20:03:08 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ClWCuz+U; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718647388; 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=jsx3mVcuW5kN7xqDjvap0Uy1h5N+BjABHbk17yrXork=; b=Cs+yDy+Ha/OxtEv7YIsWJUkdx4SrOn8o38OmzB0dntJwz823OVky9nheJvT25BhpZtPAI6 LA5FWDY+9AqUUBArs4tBDAwUQqn63RSiehlgQbtJui9YOv1y3wjp0DGnj/j7HDtfZ2SQ8u QaOAbcpLBZ5NnN2bdJhexFGQ4GCvs33EYrsaECAJgj9gP/SYnhmevKv1Y9Kt7P4ntEyhYg TOBoBLjUA7jjPGkxl+JaAMvCuXOiQ0YSawhdYYmYzjOd4prTq1cOoGhH9hpO50XdfPMf3K sqOKOUGxBrdkiwWXENuQVpEC+2QqcGsFYi5xpY2mv9KYELjcfRt5zdazX2ib+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718647388; a=rsa-sha256; cv=none; b=YjwsnbGHNFDDvztFYFNh56D4sbMrLZ+q8bLXyarKaVsTU+ViMr+TTbwXy9Bu0xw+5TvUIG 0XW/ddnZFJV13ivxKEg+WvZUUFonwwAchwQlkLKrEhifkSi8p0xL0+heb9e1iNr8X+kYOc PYDOq5L7IE3wypqEU+mwFwaSSCj1RuMO/zvfaf6DxbIDZvQUFsXfIU0jbDx+O3oG0GHQCP jCtOhqq3kjzMNvKYtMBcm0V3jeT4axnIUU+YR7eT4rPmN7sTwim76P+QfOP+XH5P/foiX0 Yt6wAi3WuItPd9qZUGAC9dkBGgZoVhtIQPD6aWSzvVLOAEToQY0gof22arMTfw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ClWCuz+U; dmarc=pass (policy=none) header.from=posteo.net; 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" 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 3B8C378401 for ; Mon, 17 Jun 2024 20:03:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJGgG-0002u6-Rx; Mon, 17 Jun 2024 14:02:13 -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 1sJGgD-0002tt-VG for emacs-orgmode@gnu.org; Mon, 17 Jun 2024 14:02:10 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJGgB-0004O9-Q5 for emacs-orgmode@gnu.org; Mon, 17 Jun 2024 14:02:09 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 29070240101 for ; Mon, 17 Jun 2024 20:02:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1718647325; bh=vAu8AW506XuvjYt7nH5+Qodbo6X2Y8UXRKn8Ff4+u0U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=ClWCuz+UQcxaHrxN3ri5RAAMG/jhZHjmk4RghEJx2oivICCzNwwOcQph46fNmldDm 8BsXBBFMa3kWEHRUw7eHtUW4aCN1DWNBdEG2h5Ya0Qr47M34VawQoUx68QaUMzYteW 5yXECTK9P/8YxBpbIiexVVO1plZB75U9D3Y/zshbGUmo+qXEc/yW799MlYGpzt/ByC HzsypuT5r6sPs3j9UuLI4lYoD81FewGmTPNFANVTloVk98DPQz0bJn6+YqNoHjPdyZ IohAmLJb78e8Y/2Jt8UMz0kWjLYavDm45IO4aBF9DJ/12sRYL+eVtU2bLb/4OxC+iZ k/fBeoErQKKQw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W2yQ44PBZz9rxL; Mon, 17 Jun 2024 20:02:04 +0200 (CEST) From: Ihor Radchenko To: "Cook, Malcolm" Cc: Matthew Trzcinski , Org-mode Subject: RE: org-babel-execute-src-block filters characters from :session *shell* output In-Reply-To: References: <87ikybk44c.fsf@localhost> <87o782gx7o.fsf@localhost> Date: Mon, 17 Jun 2024 18:03:49 +0000 Message-ID: <87ed8va1kq.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.66; envelope-from=yantar92@posteo.net; helo=mout02.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-Spam-Score: -6.57 X-Spam-Score: -6.57 X-Migadu-Queue-Id: 3B8C378401 X-Migadu-Scanner: mx11.migadu.com X-TUID: yJSaXtilb0fq "Cook, Malcolm" writes: >>TL;DR: It is complicated. When we pull one string out, several more >>get entangled. > > Might there be a solution wherein both the interactive shell buffer and O= rg are talking to a common underlying process? I would expect such to be s= ignificantly more complicated, but perhaps better factored? Not that I'm o= ffering or capable of such a re-write =F0=9F=98=89 comint buffer is doing exactly this - it is sending input (user comments) to the underlying shell process and receiving the output from that process, putting it back into the comit buffer. Unfortunately, there is no simple way to distinguish real output, shell echoing the submitted command, and shell prompt - shells do not provide any such information. The best they can provide is splitting between stdout and stderr. Alas. >>As a practical workaround, just do not use *shell* session names and >>session names that are the same as shell buffers you create manually. > > Is there perhaps another practical workaround you might suggest to me inv= olving a more intentional setting of the prompt and/or informing Org of my = choice of prompt (e.g. perhaps via setting a regexp to detect exactly my pr= ompt, and only when it is anchored to beginning of line)? That's also an option. What you need to fiddle with is `comint-prompt-regexp'. > Thanks so much for your careful explanation and pointers, and of course a= ll the work you do for Org ecosystem. Perhaps time for my 1st trip to libe= rapay... =F0=9F=98=89 Thanks for the kind words. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at