From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 aOHaNWQwV2XVDQAA9RJhRA:P1 (envelope-from ) for ; Fri, 17 Nov 2023 10:20:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aOHaNWQwV2XVDQAA9RJhRA (envelope-from ) for ; Fri, 17 Nov 2023 10:20:37 +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 6024C6708B for ; Fri, 17 Nov 2023 10:20:36 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CWKMuUOU; 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=1700212836; 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=Z4qgsGtw5y3TCRpfXVFqczeKTmz3Mu+IhsVEZTZxUY4=; b=UdRjNx6Sg1ORwLhRnJ10Iebg1z6YlQbXFZifq9ww+jJVurGyZO5t5I72dsRE9w3S9bxqab 6o/tKR/L5IiemEubZHeoYXT4L7q2mog9FFa0+ZHh9Al3dxJoUm0rXwjdxVKtcpQUC1+otP Jk5eqd4esJcFciGyEPZAPMVekvLoeN5fUfYxk6nAfSFAWsH91F41NjFU+x2rhx7/oiNIyC MeHsjsz/6mbEfvi3Vy0H9LWgNF9kcyLqydF5/cNtSt3N6VP69pWF8G4y3SoOUmg2ThROuI iEJbgB0S5njGBRl72Jc4KK/e9biJABR2y364o2L8bUFc2++JZRpMp18bJIt2tA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CWKMuUOU; 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=1700212836; a=rsa-sha256; cv=none; b=M6MNuOJEYhYlQS9RuqCQyPzouYHs27nfV/YKIp0q9GBJLGmGHzQwZk7a+dSh2gZO1xWYQ7 k7SrB2e/5b4Xresx4FpJPIRPNE3BH2PC4ht+AyC3LdlQ1GSz0t4c4N9aISDhIwJf/XEwSw R/4wD4ojFvSvnWPw7WBf3jTHsV/AUxiB6hJiIeO2+XHL2ydnYquwWsWiPJzcgfB4qX0LWA 4yX9DA7BFQ98dMK9b/jhHO0WKQWkw5FwAJmgl0yrp7QpXNYE58D1P2hK18r1mhPRDPYZvt rY1JH081tGYzLbFc74veMLdiRy7dRl4M5atIavJQGgpa+Qa35OJWng9r8ozFFw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3v0n-0003Oa-Vk; Fri, 17 Nov 2023 04:19:42 -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 1r3v0l-0003OO-Mi for emacs-orgmode@gnu.org; Fri, 17 Nov 2023 04:19:39 -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 1r3v0j-0004wy-Bk for emacs-orgmode@gnu.org; Fri, 17 Nov 2023 04:19:39 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D2A79240103 for ; Fri, 17 Nov 2023 10:19:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1700212774; bh=kytcNqWIGgLo8VDt1HF52tzscI1D8MtV4olwE1f4st8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=CWKMuUOU9Kk/wS1TXhG0Yt/CPp4tT9Bec4ikzsJtiRuCPRJfw5p5G1iZRqzNqmj5Y PUIUfYnSdpTHZLsupX7dYSo1kpULc9sCF7vtzK9fkObrXmwpQBIPLC1sfGNsZXIvEh Y+carsnmuLyXOp7xew/V1ubtb92gfy+hk2amPb6nTQKC2af7UdN7ytUnS5o7bWvpEl Yx0H2WcMTgC6pU5lDbxxK8jS+9ZWhqNtOu6yRMs9gQTrrIsdYc1Rwc+FZhsl81FmLP w2rZ3MHvW5NdhChFD/gyleadFvfFZ/k43eL76lGYiI+KSrrjgAWyPe6Uv5oIZedjtA z4mBXu85xCK1g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SWrvT6YXnz6txL; Fri, 17 Nov 2023 10:19:33 +0100 (CET) From: Ihor Radchenko To: Matt Cc: alaincochard , "emacs-orgmode@gnu.org" Subject: Re: bash source code block: problem after ssh commands In-Reply-To: <18bd9ea2f7b.b77346232985684.5614027527324280790@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> <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> Date: Fri, 17 Nov 2023 09:22:02 +0000 Message-ID: <871qcod9ad.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: -9.29 X-Spam-Score: -9.29 X-Migadu-Queue-Id: 6024C6708B X-Migadu-Scanner: mx13.migadu.com X-TUID: fm1NaWWQfrRJ Matt writes: > Thank you for clarifying. > > > Anyway, this gives me the opportunity to come back to the question of > > whether or not there is a problem with emacs itself (like some people > > here thought), and if some message should be sent to some emacs list. > > Again my argument was that the 2 commands copy/yank'ed in an emacs > > terminal don't work as expected, while they do if the same is done in > > an X terminal. > > Okay, I follow you now. > > Yes, I agree with what others have said, it's related to Emacs (probably comint-mode). It happens with M-x shell and *not* with M-x eshell. It's hard to reproduce with M-x term because term-char-mode doesn't allow copy-paste. M-x with term-line-mode doesn' t print "bar". I think that I need to clarify here. We are talking about two different things: 1. Bash src block without session 2. Bash src block with session The original report used bash src blocks _without_ session. In such scenario, comint (and M-x shell) is not relevant. Org simply uses `process-file' with INFILE argument. This is equivalent of someone opening __X shell__, and literally typing ssh cochard@fruc.u-strasbg.fr "echo foo>foo_file" echo "bar" In the scenario described in the report, when ssh asks for password, it is equivalent to $ ssh cochard@fruc.u-strasbg.fr "echo foo>foo_file" Password: This has nothing to do with Emacs comint and this is also not a bug in Emacs - we use INFILE argument, that is equivalent to the above as _per docstring_. So, Org mode is simply not using `process-file' function as users expect - instead of executing a bash script, we emulate interactive user input to bash. (Side note: for someone aware about these details, it is possible to do something like #+begin_src bash ssh remote-server; <> #+end_src or, as a demo #+begin_src bash read x; value2 echo "We just read \"$x\""; #+end_src #+RESULTS: : We just read "value2" ) Another case is (2), when we do use comint is session is what we discussed in https://list.orgmode.org/orgmode/CAL1eYuJntGbXY6A794qM7PTbXH3DiU1aF6OayS7CLf3kOBsbig@mail.gmail.com/ I guess we can try to report this as a bug, especially since it also manifests itself when comint is used interactively. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at