From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aJshOuN4cGaNKQAAqHPOHw:P1 (envelope-from ) for ; Mon, 17 Jun 2024 17:56:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aJshOuN4cGaNKQAAqHPOHw (envelope-from ) for ; Mon, 17 Jun 2024 19:56:52 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Sy5U3iZp; 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=1718647011; 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=8trpuphAneT61mgm44L2E8FBAtZy8Zz1myTOaJ4UeFM=; b=f3jC7l33w1GRKhzxtO/q5Mfr3l8HYh12r0O0ORABpGTwBfY9nGRjqs/RAEcpSBA01FD2Gn Q2KxSFg1f/wsH4gx5IhSb5c+DXAGwu5aEaOH21aHpDVaZH2+NRTli3lX0pF16Yo9wIVQ+S RJ0Dl52HfATyYmu88HScW5c9lbnXhwMmLtUWU1M0WL9bXrMApW0d+UHAxDo8mNtwgzvfYp AI+qCU1KvbWPrSnQtmxqtiWNNsPihG5lQkGnBhJjba8PpYgpf4F9WxNNmrBI6b+Dgp/wv7 LvlrVNos/8ZEXeLb4dGeYL07hqI5doPx5aNHX9qilxKLlysyss5iK/mvS0Cgbg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Sy5U3iZp; 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=1718647011; a=rsa-sha256; cv=none; b=t3ueK7pzB5X2eaTwiQA7GKWyaFwez8sYp6V21DEu5Stf8t7ATcVuOn3kTmh6juLAgU7heZ PF3QVkM4XrXEbV10m7VQGKFdDLeX0nBqjjImt6+vMfBgshZ1i1FBiQaj2S7DJXHRAwsADH whfOuuFAfiCFQcDCpo2ajwOp3lbxVqWwezM7Tu73OorQ/pFPkFLvsbcnoMS8k+nmE/ZFe8 oD0TR+7rk+yvmYEoFSV7EsmIROKMcv/YjHYykJB5gBsau2cUcbQ7aR8ieXJNYM6lvShco3 3F28+gbIY0gwc7DDxoRFtT5kGJ3Nk+NY4Hyohh6tSrQsd5ys5bI0QEti81XOWw== 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 BF586A54F for ; Mon, 17 Jun 2024 19:56:51 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJGaP-00083Y-KE; Mon, 17 Jun 2024 13:56:09 -0400 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 1sJGaN-000835-NY for emacs-orgmode@gnu.org; Mon, 17 Jun 2024 13:56:07 -0400 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 1sJGaL-00037r-Gy for emacs-orgmode@gnu.org; Mon, 17 Jun 2024 13:56:07 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id BB78E240028 for ; Mon, 17 Jun 2024 19:56:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1718646962; bh=qKswI6EmcwcolyFVHJ823Bge1gm0iAdKQrhN5BkCn9k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=Sy5U3iZpA0vn8p6URzR5cPyQy9H3JP170GYhUVe4IuLYDVmEUhsVojAJP3or1yINj 2m3YeybjvpaQzX5aRabKzo/orNNIPgeCphm0Dk2s/p6Wgr7LOohTuEOcNZhk7WNoRm V5rn9LwlHdTH2k6Wv4a2SoHEwAUOxZbly5UatArhny+sTVcW89GOj2ocEmuFGKMkWl yNQvEoiOX+Ak5yEAJ5juUbUnAAUYD13L+sve4oxUlln9SOgO+2fbpxX9xEFHn+dOHO 1QOJCMKCCNH5DmGsJ3ONSz2d6NFYTeShYnzSqqqtbmc/+xMmailak4OCX1hAu21GHK acWv3z3wzHJrQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W2yH56Rp1z9rxM; Mon, 17 Jun 2024 19:56:01 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: org-babel-execute-src-block filters characters from :session *shell* output In-Reply-To: References: <87ikybk44c.fsf@localhost> <87o782gx7o.fsf@localhost> Date: Mon, 17 Jun 2024 17:57:46 +0000 Message-ID: <87h6dra1ut.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.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Spam-Score: -8.99 X-Migadu-Queue-Id: BF586A54F X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.99 X-TUID: u3zFFeBvx66L Max Nikulin writes: > Some shells support "semantic shell" that allows terminal applications > e.g. to copy whole command output. It is based on escape sequences. > > - > https://docs.kde.org/stable5/en/konsole/konsole/semantic-shell-integration.html > - > https://gitlab.freedesktop.org/Per_Bothner/specifications/blob/master/proposals/semantic-prompts.md I am looking at this gitlab link, and they way it is implemented is simply setting PROMPT in a way that adds these escape sequences to the original PROMPT value. In other words, it is a bit more advanced version of our approach with setting prompt to a unique string - they surround the prompt with unique chars instead. In theory, we can do the same thing, adding some kind of invisible unicode character around the prompt. We may even do it in the existing prompts. Although one downside will be that the unicode character we add may be carried along if the user copies the comint buffer contents. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at