From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id +EkJD+nlXme+1gAAe85BDQ:P1 (envelope-from ) for ; Sun, 15 Dec 2024 14:21:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id +EkJD+nlXme+1gAAe85BDQ (envelope-from ) for ; Sun, 15 Dec 2024 15:21:29 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="Tthp0b/S"; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734272488; a=rsa-sha256; cv=none; b=JoSYvQaa+kVWVnycqheAUnawlFF273DUFs3lj7f8gI6mlGiLi1jz5HK/0BwaQSuX47zHwP OP7yr8+AL6Zu7iQeDuGLLB1ceaYFZK0UMqRs8BxFKV39hPwZ9LShrcpDaDavxsKZgyViqR zxAA45i6OavoxiLgOQKdzCgsghLkCTwY6AlcBU8lxhda1NcMLhFARPdMHeuTb3YREsGpbO sTwh3VJxvVnp9iHZlvXSIOGXavpu8bEZbZviAr8HZ0aIaAWhnW/kHyzl3RUY1Ts6R2k07g mmsTaYh/mS7evFGwkPSblzV3Kh5lxwvrdB4BC4wxck8q3Xu8u1r3nWgUOVWang== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="Tthp0b/S"; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734272488; 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=jPhZBKIqyHbQoM5WBEHQXiR3+E5TemiaJy5K6acCsUc=; b=IfU3NiaADOOXHQ1S102d/5nPz1GbkNxFCUnxpDoSRRskn8BUbkvYjYfn+Jp1HRkMydKz0t WcdiTfNyYxjbEcEoDAErDGpo+TrXZUo/aRGAezyU/h2C9gJjAWRqt2j0SMGHUgpbJYomzo FQHOsp8H+p6AIHU42lVB7Y7TprdoSY6fwX1dz6cZsoFPLjY7Nh7RqTW1Pkiyv6MO5zMb5V Ug8VMGAAADhB9mWs/jvzCZ4FzPLDwa2P7jgDfTH7wxaG/0YoAVyuHxGyLmMSVuk5HRLD1b KIVzqRakp7q3Rtf1GKor68LI5D1D7I4AiWXwp1TdflVxvzq4lby+AZ1piwcznw== 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 1373C6332F for ; Sun, 15 Dec 2024 15:21:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMpU8-0002dk-27; Sun, 15 Dec 2024 09:20:41 -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 1tMpU3-0002Ze-QR for emacs-orgmode@gnu.org; Sun, 15 Dec 2024 09:20:35 -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 1tMpU1-0005HI-PK for emacs-orgmode@gnu.org; Sun, 15 Dec 2024 09:20:35 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 62CA6240027 for ; Sun, 15 Dec 2024 15:20:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1734272428; bh=j5RhIJAUjevvGjLBq4byMiACvVxeY2VZQf2fBG149sE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=Tthp0b/SDO/z09v2eOrgeot9g/CJfvA1vCeYHG6wJoNAx/6bEx57CUaN8GRDSzgkr OyxcdAJgNVn2k0mfrU6bigP+yRkZ6myVoiKkKnXuYVLxedPUTNk4rJ31C0hufwM7lc xj1y6xhFqoL0UExPJTx8VfsokwObbOF+PnUGepF43N99WOp5B52M+BhYPe2uylMgjl lUKSc7ekloUraM9VpPf9d5boeeKC7LamF0MZ4lct5baTkjUDtawbVrKCGZYFRnuMtl SfopMirRVjgPqOOCz5f62GlJpE96MXAnNca4pGJmhK1L9OPlMOJlReTSrouXx1xO/k EnDllJc1sVucw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YB4wq3fsTz9rxF; Sun, 15 Dec 2024 15:20:27 +0100 (CET) From: Ihor Radchenko To: "Cook, Malcolm" Cc: "matt@excalamus.com" , "emacs-orgmode@gnu.org" , "jackkamm@tatersworld.org" Subject: Re: [BUG] conda doesn't work in ob-shell sessions AND org-babel-execute-src-block filters characters from :session *shell* output In-Reply-To: References: Date: Sun, 15 Dec 2024 14:21:56 +0000 Message-ID: <871py99gcb.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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -9.13 X-Spam-Score: -9.13 X-Migadu-Queue-Id: 1373C6332F X-Migadu-Scanner: mx12.migadu.com X-TUID: QeLegyAZ6GON "Cook, Malcolm" writes: > #+begin_src shell :session *shell* :results output > conda create --yes --name myenv python=3.9 > #+end_src > ... > #+begin_src shell :session *shell* :results output > conda activate myenv > #+end_src > > #+RESULTS: > > #+begin_src shell :session *shell* :results output > which python > #+end_src > > #+RESULTS: > : /n/projects/mec/SRSCHPC2/local/inst/Mambaforge/24.3.0-0/envs/myenv/bin/python > > #+caption: alas, the output of test_filter is changed. Some lines are gone missing and some are changed. > #+call: test_filter() > ... This is likely because conda changes the prompt, which Org mode does not expect. I am afraid that there is no general magic solution to detecting prompts. We either try heuristics and hit false-positives (that's what we did in the past) or set very specific prompt and try to search it (now). In the latter case, any changes to the prompt will break things. What can be done is force-setting the prompt every single time babel sends output to the comint buffer, but it feels wrong. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at