From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GLG0GPvMTGVYgwAAG6o9tA:P1 (envelope-from ) for ; Thu, 09 Nov 2023 13:13:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GLG0GPvMTGVYgwAAG6o9tA (envelope-from ) for ; Thu, 09 Nov 2023 13:13:47 +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 290BB13330 for ; Thu, 9 Nov 2023 13:13:47 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Mh0KCSSf; 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=1699532027; 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=61Pbh/n4I9D+y6f8hCJ5JSNgmnIYUL/7CndTaz9pxFg=; b=EGMLa1DF+FAMIEgMxvo025VxaFzv793gRJB1o15UNmc1sEklgIjk4p68jsn2sT9mg66yyQ GojFjzUgNkWw2gqchzKuikHSpBxvyBsxBox21bpOQcCtvH3e6F9b2vhKBFpDKMeo0H4D6w skZzKiNhlMm2xIemdhPVZ4y+ocClKOrYy4NP67HhQWPhNHWb0RVph9YRJnKhpn1hKQu4oC 1uMyAVHDzasNJ5n7k3tMAhUGcFYTGO9dfCnQyq7+xsDEp7ndyJQI/vuK26IRGvaEKNAULG HfIRZjyRUzMlTNDkdB6nMzzCxjt+vHlU8VGyq6KruizE3/i8LHWm4c8+BQn/Xg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Mh0KCSSf; 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=1699532027; a=rsa-sha256; cv=none; b=CKnKJ01XnX1csTwT3kwea0l30d3tapxYOeUZmxGbrIbpGunmwP9d+hoZ0SSUBGjDcdslkM f83tQNaS5QqjCCXBlQdd0IfJ2j3SJFom4ZDEF5RsBZ5Cc3JBt+hal963VsF8DDmfnOpUGb edHXh7g+VUrxSZ4DYf9pGCgYWsClGETrdQw3ISG7sP+OqrigVOlrPBrJGhAX4XtSm6A/rH /OYmhf9tQS+S/I2iBcqHtw9zOu0szf3FsnUz/SyLXU3UZV6TVj1pe605M5pQ1vxXLz8JJO CLH8y/LUkMa9gU7FwqxHQBL++d6W8pZpkMPo6Cw7Lj39jvh3wrkm8uYLd0OI1A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r13uD-0003Dr-2o; Thu, 09 Nov 2023 07:13:05 -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 1r13u9-0003DF-Iv for emacs-orgmode@gnu.org; Thu, 09 Nov 2023 07:13:01 -0500 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 1r13u7-0004kh-7m for emacs-orgmode@gnu.org; Thu, 09 Nov 2023 07:13:01 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8D5BB240101 for ; Thu, 9 Nov 2023 13:12:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1699531973; bh=I3KNE1Lxirt1tF3uQ4aKBFYNxBsMcQUJFW9hsj05pio=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=Mh0KCSSfjyWoc3O8AR3oSmJzb8l3HaVS1cv2g0f+P28ZHZUuQ60psl4mgGM4fB8Yf 8Xd8Y5M9Fnqo135pKa5Lgfpa3M5cGvEWWqGVlirVw8Q3BtGtP4yMj+z13/CvWYWQmU p4T5lQT4NZHp5dcFJyblQC8w5njOUrZzEkc8tfKwqX6Wdm9mTEDdrCvYvTM9frHpG3 QWVJs5PzOY1B2Q2n0s18Wl0Z9r8TRE/VZt8YC785WYyqFInitmozqAhs+vbZ6gz4xd +b9Uq0u5Hr2Sdj3tck1BQ8tw/Lfh1N+0U1JHrggtz8sHrPB9DD+ez4YuWJ8Yqpqwys xMZ6c4YImfprg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SR17868G8z9rxG; Thu, 9 Nov 2023 13:12:52 +0100 (CET) From: Ihor Radchenko To: Matt Cc: "emacs-orgmode@gnu.org" Subject: Re: bash source code block: problem after ssh commands In-Reply-To: <18bb07473e2.1007b1565819307.6938164403009000496@excalamus.com> References: <25912.63830.726070.953843@gargle.gargle.HOWL> <87bkcmlor9.fsf@t14.reltub.ca> <87o7gldb78.fsf@localhost> <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> Date: Thu, 09 Nov 2023 12:14:59 +0000 Message-ID: <877cmr2ke4.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_H5=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.62 X-Spam-Score: -7.62 X-Migadu-Queue-Id: 290BB13330 X-Migadu-Scanner: mx13.migadu.com X-TUID: fDmL0ftqgedN Matt writes: > ... Aside from permission, any code we > insert needs to be correct. For example, a shebang would need to point > to the correct application and any arguments would need to correspond > to the implementation being called. I doubt we'd need anything beyond > /bin/. FWIW, it looks like there's been at least one instance > where :shebang's formatting was questioned > (https://yhetil.org/orgmode/CA+A2iZZ1vMmKiUf4Fem1AU7CA1m9GQap+BkvrOsz+0BxRt6rRA@mail.gmail.com/). It is a problem, but I am not sure how useful it is to solve the line numbering there. A bigger problem is that errors *Org Babel Error Output* are not clickable: Try #+begin_src bash cdf #+end_src and you will get ------ *Org Babel Error Output* --------- bash: line 1: cdf: command not found [ Babel evaluation exited with code 127 ] ----------------------------------------- Clicking on "line 1" will yield file opening dialogue. However, there is yet another problem revealed when we try #+begin_src bash :cmdline bash cdf #+end_src #+RESULTS: : /tmp/babel-47DarV/sh-script-vkbRfJ: line 2: cdf: command not found There is no *Org Babel Error Output* buffer at all. So, it looks like we may need an alternative `org-babel-eval' function that works with script files rather than input and arranges stdout/stderr separation. > We'd also need to control for what environment the script runs in. > That was another issue I saw raised in the list > (https://yhetil.org/orgmode/87609ug5ae.fsf@luisa.c0t0d0s0.de/). Of > course, we'd need to read the stdout and stderr. This is handled by > =process-file=. Any step I missed or some kind of failure I didn't > consider? Valid concern. We should reuse `process-file' in this scenario as well, but utilizing its ARGS argument + arrange to generate the temporary script file in the appropriate context - see `make-nearby-temp-file'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at