From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 MIHxFkZrcGP4bAEAbAwnHQ (envelope-from ) for ; Sun, 13 Nov 2022 04:57:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cNi+FkZrcGPz+wAAauVa8A (envelope-from ) for ; Sun, 13 Nov 2022 04:57:58 +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 C3FDD37A9C for ; Sun, 13 Nov 2022 04:57:57 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ou47K-0007Wh-3m; Sat, 12 Nov 2022 22:57:10 -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 1ou47H-0007WX-Sj for emacs-orgmode@gnu.org; Sat, 12 Nov 2022 22:57:08 -0500 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 1ou47G-00020x-3k for emacs-orgmode@gnu.org; Sat, 12 Nov 2022 22:57:07 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 365CB240103 for ; Sun, 13 Nov 2022 04:57:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668311824; bh=jaa531xVqkwS+ESQFaw6/GnAlgEM1qAkVEyD+xb3iuo=; h=From:To:Cc:Subject:Date:From; b=Sr6/WxiCC1/lqUWEj9+I32l9jEbKBEKjvZt4VPEkUMqQ3b/sLy9XjtRBzxst1CuJp Pi2sHPuE7wMxhlpwxjT65e3oU5zD5SQpuKk1LongEZHsOYoNhjk8SQ7bn2N7yRzGq+ V+KqeTenBEBVrkPJAodPpBo2prLob3sqz5ABiz/96XNxV5v01pjToJUTyiMteJftIt RikKiLhWkgQKVXav3lK3KQSRaMMVkOy5zViDYyd20gCNCCuAhLIgSHXjAqETmOpffE 7jk1+lECKOz3kI6bF6mYuMjgoF3CDxEyMqf2AhuQ43GzRg6NI7Tjhr4YVIOcmuWL+b w03eWbc2CSmHA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N8zCY75c5z9rxG; Sun, 13 Nov 2022 04:56:57 +0100 (CET) From: Ihor Radchenko To: Bruno Barbier Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-babel-comint-with-output: incorrect prompt detection [9.6-pre] In-Reply-To: References: <87sfiq9r75.fsf@localhost> Date: Sun, 13 Nov 2022 03:57:39 +0000 Message-ID: <87tu338q18.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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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=1668311878; 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=RQKaqqB7kpYv7GI9nsj7NJIbBKnCOThBlMZ2pBnU4qM=; b=kRO1yVXUqsfOQteqAAXzyvo4lxZ5RMBVlT54V8i7wap4S9uxk00XEZczC+FZA9826Ifv4d oMv803TYqEjYUfNHIO2kChh6tbWeGABCtFlTpHanE0fifUJFWuFxxrR0TfZdBF0ycSR2fj HHqBFpn9oCXwsS8xO1uVeTxuJb8Iqz9ftfF3iPVovIIeLAgJw+dq6gmh1ZnGXymNbY5rTc Y/erFN0Uq/HK8MeWms2DwoR9q8X6w8pEmuYqdijPdheUTh5C62SnH2/wLX21GzKso+tKou f7R1ADIucynaI3b6gr6iLqlCRShmKWGlUIj8u3vWItKq0MSynfxDCk2NzGzr4g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668311878; a=rsa-sha256; cv=none; b=gUs4MESEmRzctBkdXjoe2FuV9wT+GsqTL6/V0uRm4z6S4gaS48QyAG7mSCoDWbCtAX0cL8 KWVSlZgRgczNqfshYDREp7hgrjoKM2CnRzAi/xA0P/m767Ez/ODsqF8XnsYvq+mIkImxXf VdE+iYPkgdWUhNV8QJprZRS7d5pZv64QBzw0tI1YAncre4xU5cB0WQyN1mSBBWXQb2V/zf DEHhv/aGldgYo0OKXEfaITKkt4eja7TYYfIQSqNHt5yUK1R+e+N3r1Ue2Z8SxaW2O9EeIN 7lqKYW1QLSGV6InkfDb8s9+j+U0oFg98avUfj8sAbcm24ERvcwtMwiOS8w4S5A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="Sr6/WxiC"; 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" X-Migadu-Spam-Score: -2.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="Sr6/WxiC"; 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" X-Migadu-Queue-Id: C3FDD37A9C X-Spam-Score: -2.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: MpN1uvjiAP6n Bruno Barbier writes: >> We must also make `comint-prompt-regexp' more precise to avoid "lude> " >> being detected as a prompt. > If we need to do that for ob-haskell (when relying on the interpreter), > the cleanest way might be to redefine the set of possible prompts. ghci > is quite flexible: > GHCi, version 8.10.7 > > :set prompt set the prompt used in GHCi > :set prompt-cont set the continuation prompt used in GHCi > :set prompt-function set the function to handle the prompt > :set prompt-cont-function > set the function to handle the continuation prompt This is the approach I used in ob-shell. See `org-babel-shell-set-prompt-commands' and its usage in the code. > Do we have common design principles and/or generic tests that all > languages based on org-babel/ob-comint must pass ? No tests. (I am not sure what can be tested generically). The common design is ob-comint.el API and ob-core.el API. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at