From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kObfNcL+XGX2NwEAauVa8A:P1 (envelope-from ) for ; Tue, 21 Nov 2023 20:02:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kObfNcL+XGX2NwEAauVa8A (envelope-from ) for ; Tue, 21 Nov 2023 20:02:26 +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 7F0BA14035 for ; Tue, 21 Nov 2023 20:02:26 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Gc11JrNP; dmarc=pass (policy=none) header.from=gmail.com; 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=1700593346; a=rsa-sha256; cv=none; b=OylJ7SIKO6amQWj5HBxD32EQJ3AKfGTkJMwiqqm4hY5Kf8ZiTPLoFhZswAy/Huo5ST2RYb QZBNrTFse+379jYzyjjQHGBaFU3XMp0/69ReeMkTLd3LppI+ngTK3OTNn4tVIZfKA3CFIe k1JnAUm1u3z9QW4Tgw4a57qKrOkfzN5mGZSCf1V7lvCdIDbqJya2Ml9BlRA4kXZX5OeIFJ fDLoIhUnMiPJ1KirdYyn+0b8gDOP638wuxp2QcEIWO1Ie4OaVJyhXrK5Vg9u9AajCrXNHr RSaZ7q1l0t/6fhQZGh5I1xm9XPAGNA6LNxRh7q9jnEIReXzbB6gnRwf+URQx2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700593346; 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=9Olsg+yJm6eFOD3AkOv3j7yDr/vM9/8Qrkr6XonIMyo=; b=mqSB0Fr9l007/0WFILK4OTIW8Cjaq/YCVtEl2RFRo92d6WXWHcwj6tE+YvkTmXDrivaldS nSXOQJBPYN4WoYVCZ1QbnWY7QOy80uox4yl0dfbw/7Y0skCZ5JSbLIl56+HcwEenedejIv XQEmjS80vPWIsL0ua9nAdpa4g0FaIyEjRp+ZcHkpZyvRC8LBafLZqnlr35M9o/pa62kYb5 gTCnoIrslM+qPY+ciVAlKhatciJDFDt5nkfAmGUTpIaxLne27p+tyUFKOmp/CX+38YmC4t h/A6GZU7V94g0zsS/PMG0v9zB8lLghFKo7UUJMHhLF9y9BCRpncCfPTJfYh3xg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Gc11JrNP; dmarc=pass (policy=none) header.from=gmail.com; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5W04-00064u-PX; Tue, 21 Nov 2023 14:01:33 -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 1r5Vzz-00064b-Ec for emacs-orgmode@gnu.org; Tue, 21 Nov 2023 14:01:28 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5Vzw-0001S7-BT for emacs-orgmode@gnu.org; Tue, 21 Nov 2023 14:01:25 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4084de32db5so32247425e9.0 for ; Tue, 21 Nov 2023 11:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700593282; x=1701198082; darn=gnu.org; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=9Olsg+yJm6eFOD3AkOv3j7yDr/vM9/8Qrkr6XonIMyo=; b=Gc11JrNPCt/rcWnAAE3OXRdckLw4CuU8VF55Nu4V0f1YI2j5cYfKEkHVXjpCPQdqlI wTyRtrvDyotVuW87blo11KGzfI8R6xKwdLFcz6ky/e9JRmXDKwe47BNmfTQWS0/TJSuf xmqplGT2FrREoWyd1UmPtKtAn9q9yF3Zh+5vZccZIHxQEqAl7TBiWuWDdDHqvByI6zvl JYyqAlLyORvVrkkPwyzu2CBDfW5c/C9NWu5no/7B9gNUOTudRt7K6mPZDsS/TlYLPZ0E m8g6UpkPZWGaRmFHeqaYvaLhUszzbtjLTtbsRCDLZBNms5nRnAEIk+LVMugKfJgQImE6 KeOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700593282; x=1701198082; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9Olsg+yJm6eFOD3AkOv3j7yDr/vM9/8Qrkr6XonIMyo=; b=VjAkTJUEpmdcw6g/EJGKEtByu1SYj/oHYFL611YKprujaLpEVBvKNlOKcTzbqBoulP FNqrA5xoHqK3qOcP1tju3TPT9L7tkM5CRcWntmPRIt7u+jrGMkD9fwYLFjrlBFY3O5C6 zcs9PnqwAap8hmXpshgdJy/KJVL503cVBycgp5d9QxNmvB+rVnMHjdw+KOMyw2bGclnU 8Q6rV9FIYFCUvE0tjyuaycGG1OpH7zKzw7zukDiE6FJmwy5awz1YGq9D3RHVA2YPYjGd qMiYU/pxMomJC6VC6SccWOBfe2ypZpT6zW9BUhMUl0s7ySxYmoLYV98j+bGEwShej75o bgqA== X-Gm-Message-State: AOJu0YyM16iBuW4LQ28vESKzGkKdlYWitO4LjUnfFSIyP8QepfILlHcs BGz9c528Dik9wgEjlCH6t3A= X-Google-Smtp-Source: AGHT+IGVDMmRNJkMTednMxQNMSn6uE/XZaLNn3vYRCzZf1PxIC4Pw4GCOaZ7WDv4Hk06GufwuppVhA== X-Received: by 2002:a05:600c:1553:b0:40b:2abc:7839 with SMTP id f19-20020a05600c155300b0040b2abc7839mr177912wmg.31.1700593281756; Tue, 21 Nov 2023 11:01:21 -0800 (PST) Received: from keynux ([2a01:e0a:505:3460:1c18:688d:ece4:372e]) by smtp.gmail.com with ESMTPSA id f6-20020a7bc8c6000000b004030e8ff964sm21792691wml.34.2023.11.21.11.01.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 11:01:21 -0800 (PST) Message-ID: <655cfe81.7b0a0220.e2ac8.d1fc@mx.google.com> Received: by keynux (sSMTP sendmail emulation); Tue, 21 Nov 2023 20:01:19 +0100 From: Bruno Barbier To: Ihor Radchenko Cc: Alain.Cochard@unistra.fr, Matt , "emacs-orgmode@gnu.org" Subject: Re: bash source code block: problem after ssh commands In-Reply-To: <87zfzb1h5q.fsf@localhost> References: <25912.63830.726070.953843@gargle.gargle.HOWL> <25914.26693.101108.954656@gargle.gargle.HOWL> <87fs1xbis1.fsf@localhost> <25916.238.191509.652552@gargle.gargle.HOWL> <653f8a93.050a0220.f2202.5816@mx.google.com> <87zfzr2ejj.fsf@localhost> <18ba5e231e3.f989cde147196.3154436412643995109@excalamus.com> <875y2e2b9y.fsf@localhost> <18bb07473e2.1007b1565819307.6938164403009000496@excalamus.com> <877cmr2ke4.fsf@localhost> <18bb5337346.dfcd5ebb1139895.801408740607633332@excalamus.com> <18bd3d38ff3.115b786cb2560022.7704006411630399228@excalamus.com> <87fs169h7f.fsf@localhost> <18bd984270d.1048050a22954105.2819987720224062869@excalamus.com> <25942.29051.701153.391260@gargle.gargle.HOWL> <18bd9ea2f7b.b77346232985684.5614027527324280790@excalamus.com> <871qcod9ad.fsf@localhost> <25943.14504.245343.443507@gargle.gargle.HOWL> <87sf54bs61.fsf@localhost> <65578b29.050a0220.8941c.b420@mx.google.com> <87zfzb1h5q.fsf@localhost> Date: Tue, 21 Nov 2023 20:01:19 +0100 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=brubar.cs@gmail.com; helo=mail-wm1-x335.google.com 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, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -9.10 X-Migadu-Queue-Id: 7F0BA14035 X-Migadu-Spam-Score: -9.10 X-TUID: pEDuq31VoKQv Ihor Radchenko writes: > Bruno Barbier writes: > >> FWIW, M-x shell differs from what a plain terminal is doing (xterm, in >> my case), but, I do prefer 'M-x shell' behavior: it allows me to copy >> multiple lines, getting the same results as when I type them manually, >> or copy them line by line. My xterm doesn't seem to allow me to do that. > > The behavior of M-x shell can indeed be made use of. > However, this particular difference with xterm, AFAIU, is not > documented - unaware users may be surprised. > The situation is worse with Org shell blocks - users naturally expect > script-like behavior (even for :session), but run into edge cases like > this and get confused. > > We should either document the caveats, or, preferably, make the behavior > more consistent with expectations. At least, by default. > That's why I think that filing a bug report makes sense from Org mode > project point of view. Thanks for the explanation. I see you got my point. We'll see what Emacs maintainers will say about the current behavior of M-x shell; filling the bug report was definitely a good idea anyway. Ihor Radchenko writes: > __By default__, Org should produce more expected behavior - what users > would get from running a script file rather than from redirecting stdin. > We can optionally leave the stdin redirection as an option to be used by > the users who understand the peculiarities. I agree that it would be simpler to switch to the script-like behavior by default on org side. About the interactive-like behavior, that would be nice to keep it, if some people rely on it in their existing documents (I personally don't). Bruno