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 cMy0GHpdE2eVeAAAe85BDQ:P1 (envelope-from ) for ; Sat, 19 Oct 2024 07:19:22 +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 cMy0GHpdE2eVeAAAe85BDQ (envelope-from ) for ; Sat, 19 Oct 2024 09:19:22 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=RR6ayK4q; 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=1729322362; 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=073VTyut7uaJsA3R+wUl7yw2qpZYbNCKggnr+/XzLHs=; b=SMpecDK04EkjGcX6WuEkq2G35vASwW7YJg1Qd+yJc8QJnGqs8/Sq1biaGuchgHNQKbL8IO bC2j5fOIPXhPFMcEakJ9MFfAN/PvU2uFFCKVV4puIr0EMuCEH2g3IGbiYnmG2KWO1U0YHU 9DIGijP9qgFNXcaeTdflDrvbh6E7bhodHBIn3V6HL5NSm7Y2xOEHOoCOh9sLXYISeFpba9 sz0eE8+YLcvOhiFPYqaB6RFxvGtArkP6QZPrKt+/gQvf5ZVshWJZptFiL7doyKRCHqCo/W 065LHbzDraNgtd7daaFXK63Jkhm7xCXduPzEisCgkqnmM/6F2UV2BnFKccF3Pw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=RR6ayK4q; 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=1729322362; a=rsa-sha256; cv=none; b=Pk2ZDxUD2yKi/2XP5JIw10BzKpbtT5SwEQmfmp0yU+c0plTkwjzPoq60c+fKkg4UjVGPL7 39iigBeJTha4B98by2z8igxgn2S9szsHDzZmCYlhyvx8seAxhOtH6LPatq7dgdusM513Wi B0ho1+5qIY/3ylCnbWLX4qKS+eYJ09BwW07ZewKlhKVEpKvofqJg2S1tEIexQamSiHSgQy 34EOPexghoOQqYSaGaZVIdg/z88ohhUL3WYy/T37yHpn9/N44EaNi4tdCEDDnL3x5ANmAB k+RM0d3/PcIpU9lKgD//HZG7i4FUeZpNQbWMeErmvyWnUougdj2ajSEWv8Yt3Q== 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 A96C58D37B for ; Sat, 19 Oct 2024 09:19:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t23jK-0004zJ-DQ; Sat, 19 Oct 2024 03:18:30 -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 1t23jI-0004z5-AJ for emacs-orgmode@gnu.org; Sat, 19 Oct 2024 03:18:28 -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 1t23jG-0002rk-0C for emacs-orgmode@gnu.org; Sat, 19 Oct 2024 03:18:28 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E7DB4240101 for ; Sat, 19 Oct 2024 09:18:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1729322302; bh=j92XCJ5C0qGrs8zldmFH68QktTmLra4GEFvMJNws5cI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=RR6ayK4qmXnKE15Cu1HjP989ogMyUSPq4Ci1SNSB+SfCJMdGOgA+FCIj4yim4Z950 +swcsju4J4tczkZLPngOE4c1KI9mEnyadcUx/cYOcYYeuY9A4b/ptkHg9M6tmeuSUW q69k2CSKDZwwy5eugisHreSdD74DNi8fi4o38HwirmuzzbaWXqW7bCWIJ4EAUYOcQz e+52Ra9uAMPeZ2bLK5ltO2dLmkp7/5UHZRft3tRY9GxZj1v4rldgRSVSYrpdjR9L4y 0OwCiu0GDYGtwCsh6PRhxUbVp6ER5TFfGLQocZBvW46+ODh/94o/N6odlGQPGXHDa6 TQQfxPG3BMNlw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XVtG61y9Mz6twG; Sat, 19 Oct 2024 09:18:22 +0200 (CEST) From: Ihor Radchenko To: Jack Kamm Cc: emacs-orgmode@gnu.org, jeremiejuste@gmail.com Subject: Re: [PATCH] ob-comint,R,python: Options for more robust non-async session output In-Reply-To: <87h6993y6q.fsf@gmail.com> References: <87h6993y6q.fsf@gmail.com> Date: Sat, 19 Oct 2024 07:20:10 +0000 Message-ID: <87v7xowod1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -1.18 X-Spam-Score: -1.18 X-Migadu-Queue-Id: A96C58D37B X-TUID: VjS8fGyMHMOE Jack Kamm writes: > This is related to my recent thread, > > https://list.orgmode.org/87wmi9etku.fsf@gmail.com/T/#m93bd964243638ee358d4375c9ed4f40e066238d4 > > which addresses problems with prompt filtering of R and python async evaluation in Org 9.7. > > Here, I address the non-async case. > > First, I introduce options to `org-babel-comint-with-output' to skip the > cleanup of prompts and dangling text. This allows individual Babel > languages to handle these tasks in a more robust, language-specific > manner, e.g. by sourcing temp files or relying on functionality from > external libraries like python.el or ESS. I have no objections to the idea. Just one comment on the patch. > - ;; got located, and save dangling text > - (goto-char (process-mark (get-buffer-process (current-buffer)))) > - (let ((start (point)) > - (end (point-max))) > - (setq dangling-text (buffer-substring start end)) > - (delete-region start end)) > + (unless ,no-save-dangle > + ;; got located, and save dangling text > + (goto-char (process-mark (get-buffer-process (current-buffer)))) > + (let ((start (point)) > + (end (point-max))) > + (setq dangling-text (buffer-substring start end)) > + (delete-region start end))) > ;; pass FULL-BODY to process > ,@body Previously, the point was always at process-mark when BODY is called. Now, it may not be the case. It may cause problems. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at