From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eLJyJtwxB2SdIgEASxT56A (envelope-from ) for ; Tue, 07 Mar 2023 13:45:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id EAVvJtwxB2R5EgAA9RJhRA (envelope-from ) for ; Tue, 07 Mar 2023 13:45:16 +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 559F83378F for ; Tue, 7 Mar 2023 13:45:16 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="Djt/5QlH"; 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=1678193116; 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=W/7rP0WdmSf+YhhrnlmQFL9Z0Pd1RxF4jscXlx/Aa6E=; b=rLoDGYQldmo5hfLHQ5LdgW7rs7xRFs+hFKQ2/PX172HbJem5Y054LNM6ZjkZ1XLh9VNUMb mQYf//Azb6H4iD3otSNY6+nfsBrXCCiZnjJVe+ZEjYk/HjHw+dsQLsXKiiHTz4g7HhCLjq YWTsoD8QJohyDpjRTrbGaXcbapQ0Igefd0I5SLLRdLAf0+BO2AkEDCUpuM8IPrcLlYVT/7 Nx64WsO1/v0mhfdKQe3iOypPsGiTrkAhQsH4P40To6StEzQ+K+GU2PqjI4Gn1Yfvj5oI1a 4AdhkhD37bzXeTqw0erdBoSNaFPy7SYxUF8srBS98Jj58KYX3sv59rr4zzOgHA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678193116; a=rsa-sha256; cv=none; b=nSr0WpWmZKsw50DUkijZC3RE0Jc4hcHg6PCXwcZYLGn8HoRJgTtuE3JGDLng8SoWFg1Gms MWcoDO90s+xvEtsRXRcxVwt0ck9qETEuMNnBEPG/v7ZhTMs6xjhgDVkYA2E/6QfIeOzV8s Sd8CRer68R3un2xKM0Dc7xXtgyyTPo9MXxxX48+oFWFehgUijgs1sFUPUjmsYnLm0GPbD8 /+uJIhpgUYbuRbfr8cltjblLriFpWCeTJIZrWrtxk09lGFX0zfYWcNm5tHc705Wg0UgBEn L0+EBRcdpoy+0XnWrAa3tk+K/qX63fQ2Xl1NMwMhDNbkSlzyzJiK25YiL+tyOw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="Djt/5QlH"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZWft-000893-AY; Tue, 07 Mar 2023 07:44:13 -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 1pZWfr-00086n-Bc for emacs-orgmode@gnu.org; Tue, 07 Mar 2023 07:44:11 -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 1pZWfp-00032i-8j for emacs-orgmode@gnu.org; Tue, 07 Mar 2023 07:44:11 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1173F2404C7 for ; Tue, 7 Mar 2023 13:44:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1678193047; bh=QCIC4CLD3sAHDYqSOaDEFsYL+CDApgWoWMg5es3cnGQ=; h=From:To:Cc:Subject:Date:From; b=Djt/5QlHJUbq79TzNa1P23KAdYnOuRzrTPLVl0tGoP+0RHcwDfFVBhCyIjJwyOHFv vK6uyymyYS8hlpd2iODzBWvfpUgbxfFpKOaR36XixmcBl4KF8yVkc1Wq0/WnHaUPGF kng4tR5V9CQMwuEQduB4puGNtRbhjWTWkokDa2nSZHgiJFqStxy7bT1EvsZfKxv8sE CRsICgz7Z9fdqCZbtugejVjE+FYBgRUA1wAFvkSF6pGG4dZVES6mm5r/8zZeHYhRK7 8BRKhZ/zvxBxW87UVVm7+4htu5KNiyeo/P9qP6dwEc09MAqEaJurmZrcqpSnewcjCq fwD7DR91MKRhA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PWFWB2K3Tz6tn0; Tue, 7 Mar 2023 13:44:05 +0100 (CET) From: Ihor Radchenko To: Matt Cc: emacs-orgmode Subject: Re: [PATCH] Async evaluation in ob-shell In-Reply-To: <186b5aa9d56.1238923db2169250.3173443400140454866@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> <87ilffz95g.fsf@localhost> <186b5aa9d56.1238923db2169250.3173443400140454866@excalamus.com> Date: Tue, 07 Mar 2023 12:45:30 +0000 Message-ID: <87ttywg26t.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: X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: 559F83378F X-Spam-Score: -10.00 X-Migadu-Spam-Score: -10.00 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-TUID: DGS9YX4PPP6/ Matt writes: > > The actual prompt is "org_babel_sh_prompt> ". > > Agreed. > > > And we want to skip leading spaces in addition. > > What do you mean by this? I was following the pattern described in the docstring of `comint-prompt-regexp', where it is suggested that prompts should follow the pattern "^ *". In the case of ob-shell.el, `org-babel-sh-prompt' is a string to be used as a prompt and the corresponding regexp patter will be "^ *". Hence (concat "^" (regexp-quote org-babel-sh-prompt) " *") > > Adding " *" does not make the prompt match 2 spaces, but 1+. > > Agreed. > > It's not clear to me what pattern you're looking to match. I hope the above clarified 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. > > In the next revision (once we figure out the regex), I can create a separate commit moving `org-id-uuid' to org-macs.el and updating ob-R and ob-python from `md5' to `org-id-uuid' (assuming that's not an issue for the maintainers of those). If you think speed is a concern, however, I can switch ob-shell.el to use plain `md5'. I am in favour of using `org-id-uuid'. It might also be a useful generic function for other purposes. A slight concern is that some third-party code might depend on the current pattern used for UUID string in ob-python. But we made no promises here. To be a bit safer, we can also refactor `org-uuidgen-p' exposing the regexp used to match UUID. Also, it will make sense to move `org-uuidgen-p' to org-macs.el. > > > > > (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). > > When you say "imagine it is changed to non-space...", do you refer to `org-babel-sh-prompt'? Yes. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at