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 sKAABAhtOmWVRAEAG6o9tA:P1 (envelope-from ) for ; Thu, 26 Oct 2023 15:43:36 +0200 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 sKAABAhtOmWVRAEAG6o9tA (envelope-from ) for ; Thu, 26 Oct 2023 15:43:36 +0200 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 B790B42221 for ; Thu, 26 Oct 2023 15:43:35 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Qr4qWItD; 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=1698327815; 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=yjznSyn2QL3PXdkJk3T7jSdsh7qyPtRwxWEgTpalPZI=; b=hghzpnbBZLnsWA5fiR+BTEdYSKZvO7ecHpMrZkK9AS3qQSGyGFAfS+HKw12EQ9qF53o5xq YuuOwQ2J6zQxToUt4VJTbL6FYONCpnFqdK3QFU1qGrUbS17ApoLzsycSedOoGyA/YKQNwB s6CxXkx3HhqVHrv1xWkanuHx1+n4Sfejd0RWesNcdmNOGpfU5CQ9ZwJvT+gLDcqCCWbxO7 4rywhQF4dstT672QaZSDMbp/dne04YJgM4GcXV3i6f1G7vU75P3J1hBYF6NSgWS4tNvGe/ NFFke9tDL1ceGlDHtzVYUf7YSt2un0StGWlD4LmXXXvacj1nUhdv/hqMF0gLeg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Qr4qWItD; 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=1698327815; a=rsa-sha256; cv=none; b=X2zAJKKG7cXVQ8YcB6i6vz0ZQ5UBJ/nP989kJxQGedlark8HNSIH5EVuYoly+UoLDO4AZu 7RC0VucdZmBvQUhcT/W21G+OLS2KttwNwP1YrgBI8cNRhJreD7hYH9pwVanJLEYkr2zT5G dPpH9d/i2nkcOmo2jjz4hv0v5yMkU81PgJyGOTypC63cx8rJ0HKhEJde2c+i+U41iBI05i kcR9yfgJatvlDj0dSntkX+PUim7nr8VcVeO0D5VbRBztInyQSj/QYjgG/xfjPsWOBg/PeY HlxOS0uZK2qvTKmaFU+icm3KS6IRkV2yQ1pWMVBOFL6kDKtkVysXrdQA1sCNEA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qw0dG-00080f-7I; Thu, 26 Oct 2023 09:42: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 1qw0dE-00080D-2x for emacs-orgmode@gnu.org; Thu, 26 Oct 2023 09:42:40 -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 1qw0dB-00062E-6r for emacs-orgmode@gnu.org; Thu, 26 Oct 2023 09:42:39 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7EBCF240027 for ; Thu, 26 Oct 2023 15:42:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1698327754; bh=g7QMMoyASQCgC7WHeLnyN/ttcV/mFt45UJld8BT31VY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=Qr4qWItDXGoCx8B8KIy1wRnWEVdB8Arj9C2kIBb1PMDCDPpaTwmCryPn5lFJtT4sE uu/A4RKxoBwpzKkoGLoZEYrt4be3C84yvptKJLH1GdaYcJpW8U6qJwuWnEDjycSGxu rkdEisS0OBCCO15V9buoWcaj/8IYPkW93NX+UMLUgUTcN5UXdOMRpIN46u7/7+x1j2 LoebSFHHGyjW4hwU3C8iCBBahN6JMSu2kzzfyRTC7vxGLstLKVVOPqK94qZs1IZrS9 NlR3L4sZVfnHzAsofvzbBk/BloqvWtOn4qS9uQds3bJgsu5N7Q5dIdIVzN7Q5Yjpw6 rWdb4KdgV8/xg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SGRn52tTNz6tvx; Thu, 26 Oct 2023 15:42:33 +0200 (CEST) From: Ihor Radchenko To: alain.cochard@unistra.fr Cc: Leo Butler , "emacs-orgmode@gnu.org" Subject: Re: bash source code block: problem after ssh commands In-Reply-To: <25914.26693.101108.954656@gargle.gargle.HOWL> References: <25912.63830.726070.953843@gargle.gargle.HOWL> <87bkcmlor9.fsf@t14.reltub.ca> <87o7gldb78.fsf@localhost> <25914.26693.101108.954656@gargle.gargle.HOWL> Date: Thu, 26 Oct 2023 13:44:14 +0000 Message-ID: <87fs1xbis1.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_H5=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-Spam-Score: -9.29 X-Spam-Score: -9.29 X-Migadu-Queue-Id: B790B42221 X-Migadu-Scanner: mx13.migadu.com X-TUID: 5JoUZL91LaJM Alain.Cochard@unistra.fr writes: > Ihor Radchenko writes on Thu 26 Oct 2023 08:44: > > > I currently do not have a setup to test ssh commands, > > Sorry if that's irrelevant: I realized that one can ssh to the *same* > machine. You are indeed right. I can now reproduce the problem locally. It boils down to (setq exit-status (process-file shell-file-name input-file (if error-file (list t error-file) t) nil shell-command-switch command)) that is an equivalent of bash -c bash /path/to/file-containing-the-source-code.sh ----- file-containing-the-source-code.sh ---- ssh localhost 'echo foo>/tmp/foo_file' echo $(uname -a) |tee /tmp/uname1.txt --------------------------------------------- If one tries to evaluate the above, the second line is not produced. It has nothing to do with Emacs itself. However, if I try (process-file "bash" "/tmp/test.sh"), the /tmp/uname1.txt is not produced. This time, it is Emacs problem. The problem is caused by interactive password prompt displayed by ssh. I guess we may try to report this upstream, though I am not sure if this is something that is supported to start with. >From Org perspective, it is not the first time when interactive shell programs are causing problems. I'd say that we have no technical ability to support them reliably and one has to use ob-screen or similar libraries to properly interact with such code blocks. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at