From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 +GgRM2U1XmUVewAA9RJhRA:P1 (envelope-from ) for ; Wed, 22 Nov 2023 18:07:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +GgRM2U1XmUVewAA9RJhRA (envelope-from ) for ; Wed, 22 Nov 2023 18:07:49 +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 94195393F2 for ; Wed, 22 Nov 2023 18:07:49 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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=1700672869; a=rsa-sha256; cv=none; b=C44mDLLagEK1lttnfVSwv90L3pn0yoEM6Ax3U9OQBBj8xDIdFr4kzH7FdMfNK6pJF1kqRB GtGmh1kPcJLEVTHEbicH2U5UaM3Xt4vvVcg3PPpOy9OdjhfgCVEcQaS9K1Vx4rb6AyJCcs R6HxvyccdWefU049RZ/1eyMrle3+yzPz9ASGNYniiCwkWFBNwh2LnIaCMYmekz/S2ESDII XboN3jxKiAEflGzLzjzY+ByJQYR3p6UPDChwjoGZooRYATtRzGx1wy4noVpz0pXNRChVjC OKen8f1DvaTgyVNBD9f0FkJfEfjX4a/ivf21SMVvsfUtp84fBUxLjlXzYcop2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700672869; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=2RMLwYVuJenuG1HcHMO/jmasBMWXb7H2xl4EvdPGSeE=; b=hjeXGtn4YHSK1I4dSj2iIm+7+BXsxtmUtyZP4IgzUN5qPeQh8waj5Ml/wQHT7nIyRLNYRr 3bStNN+j79vF8FbS9IUAqVim4hV77Ph2ZmtapgY6NkrXjpQiLhjy7lPNdNkztPQ8O5kN4z erqKg4MU6/OawtwVR1D2Cj1zIYfDOabMnukTqXMpM7ewf74i76U3h37e+TbNFtGop3x7lr cbe08nOX+1YAL+nK3Qwzp4wu97KC1JEVU8bc03QQwocrnvm31y9VDFrhHf4xQvSKgYsOdj yPYC8r7hCmkmOf63hLMTUzJvP4xEP13k3cWnw/5Xw0i4LPnHC4VsOCGPaJWo6Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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 1r5qgu-00064J-7A; Wed, 22 Nov 2023 12:07:08 -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 1r5qgr-00063x-Lt for emacs-orgmode@gnu.org; Wed, 22 Nov 2023 12:07:07 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5qgp-0004U4-Vo for emacs-orgmode@gnu.org; Wed, 22 Nov 2023 12:07:05 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1r5qgn-0005t5-WB for emacs-orgmode@gnu.org; Wed, 22 Nov 2023 18:07:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: bash source code block: problem after ssh commands Date: Thu, 23 Nov 2023 00:06:55 +0700 Message-ID: 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> <655cfe81.7b0a0220.e2ac8.d1fc@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla Thunderbird Content-Language: en-US, ru-RU In-Reply-To: <655cfe81.7b0a0220.e2ac8.d1fc@mx.google.com> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: 1.63 X-Migadu-Queue-Id: 94195393F2 X-Migadu-Spam-Score: 1.63 X-TUID: ilVsmNq3SCBn On 22/11/2023 02:01, Bruno Barbier wrote: > 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). I do not like recommendations curl https://... | sudo bash but I regularly see them. So some users might expect behavior like namely stdin, not like interactive prompt commands. Perhaps even sessions may be switched to creation of a temporary file and executing "source tmpfile.sh". However it may be shell-specific (posh?). Likely it is possible to implement a header argument to explicitly control whether `process-file' should be used or the block should be executed as a temporary script file. Currently it is implicitly determined from other header arguments. P.S. https://mywiki.wooledge.org/BashFAQ/089 "I'm reading a file line by line and running ssh or ffmpeg, only the first line gets processed!" A similar case, but only data is read from stdin, script is a regular file, no difference bash vs. dash.