From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 cAYFESjTgmbwpgAA62LTzQ:P1 (envelope-from ) for ; Mon, 01 Jul 2024 16:02:48 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id cAYFESjTgmbwpgAA62LTzQ (envelope-from ) for ; Mon, 01 Jul 2024 18:02:48 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=SJA6z4ek; 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=1719849768; 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=1NKZzYkiRLNP6Ep+vFkSL5zTNCD3UU/vOT92sHQDFcQ=; b=kxVxGrM47+Bu7CeUzBQcM7WMQOCm316+3YpTpta5wXM+/kWx6CdjRLPnMT6fzRwuytXW7I ANc7qiUcuFoon2zE9poaTmzZ+j6SxxBOLRXZIgrunof73nWtc5quTHmuOVW6UguRBuWLHW /vv3psfoNKcO4PSYhvRSp1aQJqiZnnk2+wEAb4oQqxp7gpnL92LL4zyWasjUY96oKqfbbC rW9Y5YRDFE857QWlYX6dyYVHQUXyfPYIbHeUOn50D9MWidP/+dDkvDJcKjsqg6cv8I91Kf +imE6n+osARK1L/iy3ld/Y9R/7xoFKA0bvRHC3s/j+cfTVpAEozm78PMRQfLwA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1719849768; a=rsa-sha256; cv=none; b=CWY1mXs9/U+KMKfEEb7gPx/XKAUKNXzSZKaRkMAV76V1Br7X3ZGK0qm6gAmzF0a1Y/opGZ zlq0wxXWo0JMg53YIs0VP1s3HZ0Ik4A6NVsj40kkHA/pAO8Lbtdj/BIyd9mzfeJJcmRqN3 kWSuAAlPhaiXPMwpt1j2LocjNSRH7s6xwqm/D29svoNXzaAQHYEdfQx8e35vtFpFk4rcwQ 6sj1/W/HtpA/0/xJ5Fgt8aSVK3zcpu47/IU7FZpn2nFoMg6PX+KMSCZYhuZMY/b0PQCNcS fq4w8xyDMdIc2U/JxEzU8UKJylSCtsA0l8FsbihuL8VQ5hDMKpMTtjldoNHDmA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=SJA6z4ek; 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" 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 E11C815405 for ; Mon, 1 Jul 2024 18:02:47 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOJSM-0001NQ-A1; Mon, 01 Jul 2024 12:00:42 -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 1sOJS3-0000oZ-O2 for emacs-orgmode@gnu.org; Mon, 01 Jul 2024 12:00:27 -0400 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 1sOJRz-00034P-Nl for emacs-orgmode@gnu.org; Mon, 01 Jul 2024 12:00:23 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A9420240104 for ; Mon, 1 Jul 2024 18:00:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1719849611; bh=s+e4AnUpUSixX63JSa8hd5oIjLyVcwrIVHX9KuuBtiM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=SJA6z4ekMnko9kSm4/ogZ0OQ1N+oMUnvsjB6AQ56WR7mPEsecbwwHZCNWgQ9+Fn8u iBinsPXqHmqukql9+NB/jp70ZUZsfW064EHt+jM2nkScEl/R9NpiqFsY5xjEvYudZD AotlYAdgqRxSwnod4IMRf1FbQdu+Bbcxu6l0AHho9jcj6h/y0dtaBia51ZlhNfm7Bz 98B4yn1vE6sDOC55uOAtTdCtx4mg/IyzLxz0UuH4HFSosFZ2hrkC8+iC9J+hkhITAr 7RJKlhqlvwTKRoCyxL5nUHP/CZl7oUxj34yksodSn2keReXdA0U5T4EGc4JrioXGUZ CIr+2jjGvedLg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WCW2z0vSVz6tm8; Mon, 1 Jul 2024 18:00:11 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: bash source code block: problem after ssh commands In-Reply-To: References: <25912.63830.726070.953843@gargle.gargle.HOWL> <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> <18bdf538f2f.126bad4763316098.8581777358227217138@excalamus.com> <18be3214fb5.c07a71b73414174.856693588849825524@excalamus.com> <87frsu1yhc.fsf@localhost> <87y16m30xf.fsf@localhost> <877ce6l6uy.fsf@localhost> <87tth9ign4.fsf@localhost> Date: Mon, 01 Jul 2024 16:01:49 +0000 Message-ID: <87plrx85jm.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_H3=0.001, RCVD_IN_MSPIKE_WL=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 X-Migadu-Queue-Id: E11C815405 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.60 X-Spam-Score: -9.60 X-TUID: ZB4SCDIZJVeP Max Nikulin writes: >> I guess not on Windows (bug#71081). But otherwise I agree. > > It was for starting mailcap viewer and Windows was not an issue. bug#71081 is about shell-command-on-region, not about mailcap. (and pty may actually not matter there, because Windows' cmd.exe is not even POSIX-compient...) > Some commands try to read standard input if it is available. In > interactive sessions it may be hidden due to time interval between typed > commands. Be careful when they are used in Org source blocks. > [[https://mywiki.wooledge.org/BashFAQ/089][BASH FAQ #89]] > warns concerning =ssh= and =ffmpeg=. Either explicitly specify > = > #+begin_example > ssh example.org 'sed -i -e s/foo/bar/ file.txt' ssh example.org 'tee >>file.log' <<"EOF" > Added by org-babel > EOF > #+end_example > > (Quotes around "EOF" suppress variable expansion in the text.) Tools > may have dedicated options, for example =ssh -n= is a more concise way > to avoid the pitfall. May you submit a patch for the WORG docs that documents this caveat? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at