From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kKNTKMuHBGQtOQAAbAwnHQ (envelope-from ) for ; Sun, 05 Mar 2023 13:15:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0NlqJ8uHBGQfMgEAG6o9tA (envelope-from ) for ; Sun, 05 Mar 2023 13:15:07 +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 4842B16D5B for ; Sun, 5 Mar 2023 13:15:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYnFx-00024F-EG; Sun, 05 Mar 2023 07:14:25 -0500 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 1pYnFv-00023u-VY for emacs-orgmode@gnu.org; Sun, 05 Mar 2023 07:14:24 -0500 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 1pYnFt-0000vm-KZ for emacs-orgmode@gnu.org; Sun, 05 Mar 2023 07:14:23 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9A442240131 for ; Sun, 5 Mar 2023 13:14:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1678018459; bh=jQffQN48nikSzddJt6bMkyKw5hvTWgL7kL1CbEptt1c=; h=From:To:Cc:Subject:Date:From; b=ANzF/M3uJKMJu37o6/AJyOlo/1dniP2Lqkwz+1pB95Ibvc3eDm6QzEVK1stQDzNUB 3NMqDB/MhRMR+h9wCDjSszAJB1HVB0e3qv3WHn7GjT6P8nKVaJ20SgQrLXyOx0CiaB tIkLzTbELSTnGVyHQLNofIWk1Oo5KQLgFO3CxiS9VGwTqA+uc4FMQNFpP/zRWkthrO 0dyJ5R9JNOpldthLi0OUmswxJQVUXC3atjeZEqtZSGNjKvQv7owQoqP4gGeAx/4RJA B+qAIlbvyuGtPrExxfaf0WjNuORNSJCFGHW+ZA7otJGJIo3c6aF8ks6w58C2SGl8x1 7buw20TWHsFBA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PV0xd6XnTz9rxF; Sun, 5 Mar 2023 13:14:13 +0100 (CET) From: Ihor Radchenko To: Matt Cc: emacs-orgmode Subject: Re: [PATCH] Async evaluation in ob-shell In-Reply-To: <186a89b5a24.cc4913fe1885630.21323979015166045@excalamus.com> References: <186283d230a.129f5feb61660123.3289004102603503414@excalamus.com> <87v8kd8zzw.fsf@localhost> <1863472efe9.10fdd5ba4258906.5972264927968042941@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> Date: Sun, 05 Mar 2023 12:15:39 +0000 Message-ID: <87ilffz95g.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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_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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678018507; 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=fQK8R8ngN0zboNLL2Gf2lE/0dHgLiKg9a8bUtr1zh7U=; b=pDyh0NwjNP87yQAeofZD6k5un2W1jiHI2AL/XkGe+iqKrJYRhTfT9j0OH1eLYrFNXpGir/ 9oDu73UJ3P5qEg0MdyukRlV7zf1rYqYlb//cv0g4WRKO8KMmkQ4yuHuBCqejsLzJM2+VbI 2S504IRNgr4jMOWswKaPOSfSDovG2kg49LaxpnX4js6e+dbdoqc1RR4XoPDbehxkmn0iPH uJ4wTrOpviE1YNricK6DiMo05bC4N0L5ksNJA8C7g11aKAJH/CQF0yTvxmxg2vWFlCBeYo oK/9eS3Dp7fXECxumiZQ9tzI9boYboWfey1ahwa5tLwbgxqLT9JEwcSq2xvY/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="ANzF/M3u"; 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=1678018507; a=rsa-sha256; cv=none; b=UDOFOyhDioHeZuaEwLYeUFih/+Z1kG6O+12DPjYAer2Z6dEOt71OaQ8dl4f77U2HvOl7ZV ls6DiRj5qlqpiXqFuj2vlov/kvzSdardvHVubGmuMgRZiNCR8xNk26n9k90qy7nDwYjNZl CDP5KLQjbhaDcXlRfeoTc5rT7WIDJ1AefhrhvcRDD4Ngjn8UuajS4eHQ3S9KPTy+gG9aIi g72H8x1GD53a8mf/fyfU8AwO+af/TaiGeQgsblYNWH91doCBqKf7Jc9RKURQlLZ9rBOv9U dRY2e0tmmIw8cmeYb2bjehvFsoAy/hr+RJopjSJl+OY1KTRS8nXmlSNJjXUp7Q== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.70 X-Spam-Score: -4.70 X-Migadu-Queue-Id: 4842B16D5B Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="ANzF/M3u"; 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-TUID: UwK/eq3a8rJZ Matt writes: > ---- On Fri, 03 Mar 2023 09:52:09 -0500 Ihor Radchenko wrote --- > > I tried the patch, and I am getting failed tests: > > > > 1 unexpected results: > > Sorry for missing that. The issue is that when I replaced > `org-babel-sh-prompt' with `comint-prompt-regexp', the regexp no > longer matches the output and grabs the next prompt. It looks like > the reason is `comint-prompt-regexp' is set to "^org_babel_sh_prompt> > *" (with two spaces between the '>' and '*'). Attached is a revised > patch which removes one of the spaces by changing how > `org-babel-sh-initiate-session' sets the `comint-prompt-regexp'. > Another place this could be done is in the defvar for > `org-babel-sh-prompt' itself (which ends with a space). However, I > think it's customary to leave a trailing space for prompts? The actual prompt is "org_babel_sh_prompt> ". And we want to skip leading spaces in addition. Adding " *" does not make the prompt match 2 spaces, but 1+. Prompts with no single space are not prompts. > > > > + (let ((uuid (org-id-uuid))) > > > > Do you need to use `org-id-uuid' here? ob-python directly uses `md5'. > > If you still prefer org-id-uuid, we probably need to move it to > > org-macs.el > > I just need a random string. `md5' would work for that. However, > might it be better to update ob-R and ob-python to use `org-id-uuid'? > Both of those manually declare the randomness. It's conceivable that > someone may delete or mistype the number (100000000), resulting in a > lower entropy. An md5 is also not a uuid, strictly speaking. Of > course, the chance of collision is still basically zero and the cost > of collision about the same. Using `org-id-uuid' would only provide a > consistent way to do things. `md5' will be slightly faster compared to `org-id-uuid'. But it should not matter. If we want use `org-id-uuid', lets move it to org-macs.el. Requiring the whole org-id.el must not be done. It has side effects of defining id: links. > (concat "^" (regexp-quote org-babel-sh-prompt) > - " *")) > + "*")) This is wrong. It unconditionally makes the last char in `org-babel-sh-prompt' 0+. (Imagine it is changed to non-space in future). -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at