From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id yHBsD4LwGmTnbwEASxT56A (envelope-from ) for ; Wed, 22 Mar 2023 13:11:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eKt0D4LwGmTsygAA9RJhRA (envelope-from ) for ; Wed, 22 Mar 2023 13:11:46 +0100 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 DF46114C7E for ; Wed, 22 Mar 2023 13:11:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pexIs-0004Q7-RU; Wed, 22 Mar 2023 08:10:54 -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 1pexIr-0004Pv-Nu for emacs-orgmode@gnu.org; Wed, 22 Mar 2023 08:10:53 -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 1pexIp-0000im-H5 for emacs-orgmode@gnu.org; Wed, 22 Mar 2023 08:10:53 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6FF802407AF for ; Wed, 22 Mar 2023 13:10:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1679487049; bh=B0fvVzrxILHkAbO7cpndiubC/FOKJuouNInFuAiYGF8=; h=From:To:Cc:Subject:Date:From; b=SQF+HrLI1uuF8+rRuly2QZR/eZU8vr+k9P+x517cFPzAEVcih5Gc1SQgLLtdzg0Op SAmKQuOlQuP+fkIYwhJwhuOYC/gk7sLP2LjeMLslc+o1OcpAuyhuYIgJnCP+5nUx3l Iawr9evTA0QaCt22nQrndYziHcdST9+GMTw6cAvVIHZ9ET7ZnI5qYx4anWqdr2ETrm 5S9bmkdwzECkI9Gp12vfcEhEXhBbQ8d/WkwPi6Rz3lMeByYTV9VjKmar3swBGsgIm5 QNEQdKw/FSPLEyLVdG7HvS/vh3q+lH46xBUQJmhYNqkV8PTRitTKXz1xi4Lq/lLpBQ Uq4lB7pK+GGew== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PhS3p1wyRz9rxD; Wed, 22 Mar 2023 13:10:46 +0100 (CET) From: Ihor Radchenko To: Matt Cc: emacs-orgmode Subject: Re: [PATCH] Async evaluation in ob-shell In-Reply-To: <18705dca9b8.f4f7e70c165671.6021704484862511260@excalamus.com> References: <186283d230a.129f5feb61660123.3289004102603503414@excalamus.com> <87y1p7axpe.fsf@localhost> <1863d69188f.11e078bd1228881.451172865246440158@excalamus.com> <87fsbcbf47.fsf@localhost> <186471d8980.c36aecd0374444.2548279362371712281@excalamus.com> <87sff73r0g.fsf@localhost> <18658639a30.dec640641420614.2364646537016397698@excalamus.com> <87lekwd10z.fsf@localhost> <1866bf50874.bc4ef1a92164564.1238825567948423531@excalamus.com> <87r0ukefzv.fsf@localhost> <1866fda933d.cf33745c2396994.7118762013608820270@excalamus.com> <87sfeyc7qr.fsf@localhost> <1869ff63e3e.f8c4ed671354538.4585567073216319262@excalamus.com> <87bkl96g6e.fsf@localhost> <186a89b5a24.cc4913fe1885630.21323979015166045@excalamus.com> <87ilffz95g.fsf@localhost> <186b5aa9d56.1238923db2169250.3173443400140454866@excalamus.com> <87ttywg26t.fsf@localhost> <186c771ebdb.fadb25d63466542.8590370552765842508@excalamus.com> <873562z66c.fsf@localhost> <18705dca9b8.f4f7e70c165671.6021704484862511260@excalamus.com> Date: Wed, 22 Mar 2023 12:12:48 +0000 Message-ID: <87jzz9nfwf.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_H2=-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-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679487105; a=rsa-sha256; cv=none; b=iFGn7JDVpTwgHNbaI1YEM56SMSuKB6OcH3/0A8gu2/nmJTq6t+hXiUp01+ocjC9PZEPGTy pqbP1kg/pjAMSWBL0xnH50x/YD7VZj8BVicFopbPdtacTp7uiGcI4PzzqFvDA2sdSMGMpR pSs4ULz74fGiSAdwLmlPLAmN4Jv0P0VUu1jJ/xVoa7yjHWUmCB7rXBdVmjFxgLWcC9ZpuH ye2n6Sx/+meB072vZy647FyMV1bT8lvf4O4I+NChbgalcGUMHLY3LiA24+oIW/ws+9MLJ1 U7dwfYLNZ4DO9F9eNnTKKkwm5rMQqALjWx2y7drRn+nLdFNRHok7PYrY9h7LtQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=SQF+HrLI; 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=1679487105; 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=AbyHGHzi2jf0nwxQ55vQawtoJ91SgTUQ92Qh6mN2YsE=; b=qfGuaqAv0kDPMyalQmdaloW8mH1jwKLgSEuWbqpboSrJhVunz9SfoaQLv8BGZCOFz4gYET CZ0tbAag9DRwen8cHKUB37rkT+qxqODAbIanngH/HaYMhRCEdcLreM2zDLgIa2oUK2r+Zg zXgYcjPuJyRCO7cCFlZfN9rrpPOOCabEVCcnFsDGT8Hbky3RVlNLhUVb5JbIgX7hdoA2j/ PJVRi4eRcoU4caVbiSu/GKrfAYJQc0iALBQuqAyD0ybPRc/GNgIsTp6SgIO64auts6IzNM f+/JFhf2trkn0OO4Ldln02puYDm61dwJR/bb/8LQtbzUlketV1L9UvMsfaQM2A== X-Migadu-Spam-Score: -4.77 X-Spam-Score: -4.77 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=SQF+HrLI; 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 X-Migadu-Queue-Id: DF46114C7E X-Migadu-Scanner: scn1.migadu.com X-TUID: 83jt3nRhPIEW Matt writes: > Unfortunately, I was mistaken and the second option (removing the space from `org-babel-sh-prompt') doesn't fix the issue. The TLDR is that the code in `org-babel-comint-async-filter' which grabs the region between the indicators (incorrectly) fails to include the prompt's trailing space. > --- a/lisp/ob-comint.el > +++ b/lisp/ob-comint.el > @@ -273,7 +273,7 @@ STRING contains the output originally inserted into the comint buffer." > (res-str-raw > (buffer-substring > ;; move point to beginning of indicator > - (- (match-beginning 0) 1) > + (match-beginning 0) > ;; find the matching start indicator > (cl-loop > do (re-search-backward indicator) This change looks reasonable. If it does not break tests, I see not problem with pushing it as a separate commit (to make things easier in case if that -1 did matter at the end). -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at