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 aNjJBP+ubWPWFQAAbAwnHQ (envelope-from ) for ; Fri, 11 Nov 2022 03:10: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 mp12.migadu.com with LMTPS id OCfTBP+ubWMbqgAAauVa8A (envelope-from ) for ; Fri, 11 Nov 2022 03:10: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 BE3DB16017 for ; Fri, 11 Nov 2022 03:10:06 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otJUI-0006Oh-Ao; Thu, 10 Nov 2022 21:09:46 -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 1otJUH-0006OX-9c for emacs-orgmode@gnu.org; Thu, 10 Nov 2022 21:09:45 -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 1otJUF-0004sC-GQ for emacs-orgmode@gnu.org; Thu, 10 Nov 2022 21:09:45 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2FD1D240101 for ; Fri, 11 Nov 2022 03:09:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668132581; bh=Sjeyy9aI9CQKpSdNOgGNNaJHVYVcRc/Gi96RubuRT34=; h=From:To:Cc:Subject:Date:From; b=LzqgfpzOG1VSmn8CbOxI8E1yT0xoVpeXgJcjKmF0JpuT47b4Sw+bCIH8SaxTCKWRJ b5+If8NfH63eL05BkjNllGt8UHD/bmtFZZKixvgY1Boq4GG7aqkcgT+1kB5wtav9bX gdhjJ+F9xv76r32aCjpe32BhLYmXOgGacQk1ELZA4p6PQYkN+aFexU761mUOW+k03M QcVKEPSIMmQmGiPlI9aRBdfXXtCsxJxIbbQr91K0L8HJm38+kVzFpXkIXJiq43V860 xpNpzwfddJFtQRBE7JEU1NPXy3kJgp5BSRcy5MbaF+AoTbVEJq2adHF/xvJen8DbLE 4H3B6GTqsUadA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N7hwg6SGLz6tnC; Fri, 11 Nov 2022 03:09:39 +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: Date: Fri, 11 Nov 2022 02:10:22 +0000 Message-ID: <87sfiq9r75.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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668132606; 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=5wNLHRZVczioDKsRjdBap7pqsAwCKkvWqBP9+vK6JgA=; b=UcsAvgvE+ZBp8udjHdsjJa8FHowd/PYvblFsxaEhKvReQkaELaqxPmnHc+L3tqgCFrAcjp BMsmxL6M/QZfIF74sqkMpXa17JGMhAGkaHofAyG9zqYWh30OgLFGVA3LwSC/w5Of6QoceS e1LJ9EdC9OpCgp8GYCPggpvJWOrehSC++Z1E5F2w+OAT05XTu8tdaGAiAaLuYxve8R2FJT laObS9MJzByVpp2bnclTioibJT+DMExkXKgWqsRk/XvewmFqvaijdGFWAOSvvhuVwnMWH5 wMbOWPsJP1Q2tpzXs5vmkCHCzNLNbcS9rjWcHiWAm+QKrie15wLN5pHZKh0x6A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668132606; a=rsa-sha256; cv=none; b=sSQ37LMMKcOlAJh9w9d/z68IBKVPyATnvdC+92mphi24Vu5K2tFJnkEGLKNV10sxguHGh8 MSSkNrPH5zu+Cq5VHUjJ/ngcasAe5Cir9JTU7pSZa5hSmWAxVqxjrrbzCa0nDxSq+5Q/jL SwOCCLbCQT6ZxO6cP8QaF93tQzBB9l3Qd2PM31PZIE2PzY6ECvwwttXzEPQmbw1xPLZ/73 fpiag00Hku4HRWENbWti+woTaQNHf4IiWyy6gl1yZXiIk2X3bK0G01AHmughk0CpPUtYSQ iNch2R9aEtQY2+iL8TeII/80y+vxNyObcW2mby99RevfynwZJ+liO3nQDdWlSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=LzqgfpzO; 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: -8.82 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=LzqgfpzO; 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: BE3DB16017 X-Spam-Score: -8.82 X-Migadu-Scanner: scn0.migadu.com X-TUID: LLNRLKj74lT6 Bruno Barbier writes: > For example, using a haskell prompt, let say the prompt is "Prelude> ", > the first incoming text is "Pre", the second incoming text is > "lude> ", o-b-c-w-o will wrongly infer that "lude> " is the prompt, > and that "Pre" was part of the previous value/output. The problem is that Bash can send incoming text like "prompt> " "prompt> " "prompt> output\n". "prompt> prompt> prompt> output\n". So, we cannot reliably distinguish your case from other possibly comint quirks based on newline. One possible fix could be replacing `comint-prompt-regexp' one more time at the very end in addition to `org-babel-comint-prompt-separator'. We must also make `comint-prompt-regexp' more precise to avoid "lude> " being detected as a prompt. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at