X-Loop: help-debbugs@HIDDEN Subject: bug#67259: 29.1; shell/term behavior different from other terminal emulators Resent-From: Matt <matt@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 18 Nov 2023 10:50:02 +0000 Resent-Message-ID: <handler.67259.B.17003045555323 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 67259 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 67259 <at> debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs" <bug-gnu-emacs@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.17003045555323 (code B ref -1); Sat, 18 Nov 2023 10:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Nov 2023 10:49:15 +0000 Received: from localhost ([127.0.0.1]:47886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r4Isy-0001Nh-QG for submit <at> debbugs.gnu.org; Sat, 18 Nov 2023 05:49:14 -0500 Received: from lists.gnu.org ([2001:470:142::17]:36582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <matt@HIDDEN>) id 1r4I3g-0008Rz-Ae for submit <at> debbugs.gnu.org; Sat, 18 Nov 2023 04:56:14 -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 <matt@HIDDEN>) id 1r4I3Z-0002U5-Sq for bug-gnu-emacs@HIDDEN; Sat, 18 Nov 2023 04:56:05 -0500 Received: from sender4-op-o15.zoho.com ([136.143.188.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <matt@HIDDEN>) id 1r4I3U-0002Oh-0I for bug-gnu-emacs@HIDDEN; Sat, 18 Nov 2023 04:56:05 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1700301356; cv=none; d=zohomail.com; s=zohoarc; b=NROTjQJMSP3lxc8vFq7ufBCVpkHWA1oeENjk2cSFg7xSh8LXTaMYtFdmn6BzB3yTObMCSnFwymGVwSRU0B27KbsUCxsSPLXUfTQJ21bLTiup8EWIZgvkdgxJyNcnvJKaIjm1Pu/SCCGR+ircz/tOGBTinYTVabNt+TxyEv6Z6CE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700301356; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=det3Z+nNrHzs/OefohQ8ACHLDiC19RJ0Hrw3PXMXPb0=; b=OZNiwVhkJqKWAG7rToVSNRfcGFfM0y01pZPK72Zn6OEzoQDa7kh8na6g7yKZB6Jc4bkLM5ud3vFnVWhVbR7Vh/gBUlOeweu5rLMm6XVmO13bbLAIgX1Ce2DqoX15TSFm0/gv1ztnv/EqAZ5M9ummvPBCX49fmTQcUoU0jc9dLeM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=excalamus.com; spf=pass smtp.mailfrom=matt@HIDDEN; dmarc=pass header.from=<matt@HIDDEN> DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1700301356; s=zmail; d=excalamus.com; i=matt@HIDDEN; h=Date:Date:From:From:To:To:Message-ID:In-Reply-To:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=det3Z+nNrHzs/OefohQ8ACHLDiC19RJ0Hrw3PXMXPb0=; b=Ca7E0/TwPjVGk7fopkXKGHGDSUK9HS9UODMOFIHkaw/DOcCU+tQ7YywtNj9jaNeE kRQ2KlNVe7P7kp6hEo8caSBln68eeWYt0fBZIyl6ifpAlwsQGQ3oiNxckWnV1eV4qhm YAvl5WAkXYoKyYlmby0SsrDUx5tAGUNkDKEvTRas= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1700301353994929.5163403507694; Sat, 18 Nov 2023 01:55:53 -0800 (PST) Date: Sat, 18 Nov 2023 10:55:53 +0100 From: Matt <matt@HIDDEN> Message-ID: <18be1dbb3c7.10690fc703382635.7777970297366947027@HIDDEN> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.15; envelope-from=matt@HIDDEN; helo=sender4-op-o15.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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-Spam-Score: 1.0 (+) X-Mailman-Approved-At: Sat, 18 Nov 2023 05:49:06 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) I'm helping to maintain Org mode's shell interaction. The following was reported to the Org list. Emacs M-x shell and M-x term executing in term-line-mode both produce a different result than expected as compared to terminal emulators like xterm or xfce4-terminal running Bash. For non-Emacs terminal emulators, "bar" is echoed. M-x shell and M-x term executing in term-line-mode do *not* echo "bar". To reproduce with M-x shell: 1. emacs -Q 2. M-x shell 3. Copy the following two lines: ssh localhost "echo foo>foo_file" echo "bar" 4. Paste them into a non-Emacs terminal emulator (tested with xterm or xfce4-terminal) and press return 5. After entering the correct password, "bar" is echoed 6. Paste them into the buffer associated with M-x shell 7. After entering the correct password, "bar" is NOT echoed To reproduce with M-x term: 1. emacs -Q 2. M-x term 3. C-c C-j to switch to term-line-mode 4. Copy the following two lines: ssh localhost "echo foo>foo_file" echo "bar" 5. Paste them into the buffer associated with M-x term 6. After entering the correct password, "bar" is NOT echoed In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Guix System Configured using: 'configure CONFIG_SHELL=/gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16/bin/bash SHELL=/gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16/bin/bash --prefix=/gnu/store/xjrhyapm3zwgpmq5baz6m9kavz287jjj-emacs-29.1 --enable-fast-install --with-cairo --with-modules --with-native-compilation=aot --disable-build-details' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $EMACSLOADPATH: /home/ahab/.guix-profile/share/emacs/site-lisp:/gnu/store/xjrhyapm3zwgpmq5baz6m9kavz287jjj-emacs-29.1/share/emacs/29.1/lisp value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs comp comp-cstr warnings icons subr-x rx cl-seq cl-macs gv cl-extra help-mode bytecomp byte-compile cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 79918 9356) (symbols 48 7446 0) (strings 32 20277 1733) (string-bytes 1 627375) (vectors 16 16608) (vector-slots 8 334511 19434) (floats 8 27 46) (intervals 56 235 0) (buffers 984 11))
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Matt <matt@HIDDEN> Subject: bug#67259: Acknowledgement (29.1; shell/term behavior different from other terminal emulators) Message-ID: <handler.67259.B.17003045555323.ack <at> debbugs.gnu.org> References: <18be1dbb3c7.10690fc703382635.7777970297366947027@HIDDEN> X-Gnu-PR-Message: ack 67259 X-Gnu-PR-Package: emacs Reply-To: 67259 <at> debbugs.gnu.org Date: Sat, 18 Nov 2023 10:50:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 67259 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 67259: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67259 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#67259: 29.1; shell/term behavior different from other terminal emulators Resent-From: Ihor Radchenko <yantar92@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 18 Jan 2024 18:19:01 +0000 Resent-Message-ID: <handler.67259.B67259.170560189713814 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67259 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 67259 <at> debbugs.gnu.org Received: via spool by 67259-submit <at> debbugs.gnu.org id=B67259.170560189713814 (code B ref 67259); Thu, 18 Jan 2024 18:19:01 +0000 Received: (at 67259) by debbugs.gnu.org; 18 Jan 2024 18:18:17 +0000 Received: from localhost ([127.0.0.1]:56625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rQWy0-0003aj-JE for submit <at> debbugs.gnu.org; Thu, 18 Jan 2024 13:18:16 -0500 Received: from mout02.posteo.de ([185.67.36.66]:57531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>) id 1rQWxy-0003aT-Bi for 67259 <at> debbugs.gnu.org; Thu, 18 Jan 2024 13:18:15 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C24F2240101 for <67259 <at> debbugs.gnu.org>; Thu, 18 Jan 2024 19:18:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705601886; bh=uavzauNpZxQAV1HCX/nlQosCMQnWV2DNOZYkDyddLho=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=GDTG2NEFzSHn6oBEuWuaVQa9mP49dq2iYafUf7e4KanPdAb2fjSf/kEgiPASVEOXC E/anUuCPqTZi7XHISGik1kEkUt/TzMsTQmn6oi9oCYGh7ZVslIT/iK3eZY3lBSNTUL 5AMYVO+XUUQQSyAVBlA9wRwjrqqbzngsBHkpNqombWQjUwCuVKD6z+zvtOBb+s9t0p 4Z65o52QBb4h53qagfc/RS+CtaLUcicqe0PyPOEKa519+2CWyKPp1P43AeZ30kulaO e0XX2BqH+EyyrrmmO4pgCx9qTIb+oFct0x6W+neqrjv9DaK8zvSqK5XCwxMz8CGMkS HHtktIgAuTReQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TG9wG2cppz6tvr for <67259 <at> debbugs.gnu.org>; Thu, 18 Jan 2024 19:18:06 +0100 (CET) From: Ihor Radchenko <yantar92@HIDDEN> In-Reply-To: <18be1dbb3c7.10690fc703382635.7777970297366947027@HIDDEN> References: <18be1dbb3c7.10690fc703382635.7777970297366947027@HIDDEN> Date: Thu, 18 Jan 2024 18:21:22 +0000 Message-ID: <87cytypknx.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Matt <matt@HIDDEN> writes: > To reproduce with M-x shell: > > 1. emacs -Q > 2. M-x shell > 3. Copy the following two lines: > > ssh localhost "echo foo>foo_file" > echo "bar" > > 4. Paste them into a non-Emacs terminal emulator (tested with xterm or xfce4-terminal) and press return > 5. After entering the correct password, "bar" is echoed > 6. Paste them into the buffer associated with M-x shell > 7. After entering the correct password, "bar" is NOT echoed Bump! -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
X-Loop: help-debbugs@HIDDEN Subject: bug#67259: 29.1; shell/term behavior different from other terminal emulators Resent-From: Ihor Radchenko <yantar92@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 18 Apr 2024 05:56:03 +0000 Resent-Message-ID: <handler.67259.B67259.171341971411900 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67259 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 67259 <at> debbugs.gnu.org Received: via spool by 67259-submit <at> debbugs.gnu.org id=B67259.171341971411900 (code B ref 67259); Thu, 18 Apr 2024 05:56:03 +0000 Received: (at 67259) by debbugs.gnu.org; 18 Apr 2024 05:55:14 +0000 Received: from localhost ([127.0.0.1]:50364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rxKjo-00035q-W2 for submit <at> debbugs.gnu.org; Thu, 18 Apr 2024 01:55:14 -0400 Received: from mout01.posteo.de ([185.67.36.65]:53605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>) id 1rxKjl-000341-GI for 67259 <at> debbugs.gnu.org; Thu, 18 Apr 2024 01:55:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id AFD79240027 for <67259 <at> debbugs.gnu.org>; Thu, 18 Apr 2024 07:54:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1713419689; bh=SYikUOfAzKed72+qeLaDqm6jFFnaSeQdWvBre7EyddY=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=hvUYH1O1PkDxX3xvEQLU9iCwl/JbJLeo5C9VPRhsDXI3zeLLJ6zAbq/m2uSgbOv5N LWo73SJJIYWYUPtw/D7KA3zczz7FRNob2fY26CzVWmoWWlgsEOKyaylaL3dh0SoDE5 AT6np9euVBZ1ZC/GyY+WG6XGnNzNGPU9LieE8t59jthPB/E2n37+JVNdM5Vu3PRbNj /fZhRrrOFAh4tcU0l74BayOMsBvViH9/0sY6uNnni2ecdR9qGzKjm64Z1kbLIOqlca qi95xaShbEWS/VhE2K/ctk3/cb/MuJCIfA5YqdgUaw/T7EAQBTo84/GinSuX6mh7/C dnm93QK2+IgqQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VKn6c2tcpz9rxB for <67259 <at> debbugs.gnu.org>; Thu, 18 Apr 2024 07:54:48 +0200 (CEST) From: Ihor Radchenko <yantar92@HIDDEN> In-Reply-To: <87cytypknx.fsf@localhost> References: <18be1dbb3c7.10690fc703382635.7777970297366947027@HIDDEN> <87cytypknx.fsf@localhost> Date: Thu, 18 Apr 2024 05:55:23 +0000 Message-ID: <875xwfjjuc.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Ihor Radchenko <yantar92@HIDDEN> writes: >> To reproduce with M-x shell: >> >> 1. emacs -Q >> 2. M-x shell >> 3. Copy the following two lines: >> >> ssh localhost "echo foo>foo_file" >> echo "bar" >> >> 4. Paste them into a non-Emacs terminal emulator (tested with xterm or xfce4-terminal) and press return >> 5. After entering the correct password, "bar" is echoed >> 6. Paste them into the buffer associated with M-x shell >> 7. After entering the correct password, "bar" is NOT echoed > > Bump! And another bump. It has been over 3 months... -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
X-Loop: help-debbugs@HIDDEN Subject: bug#67259: 29.1; shell/term behavior different from other terminal emulators Resent-From: Max Nikulin <manikulin@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 30 Jun 2024 09:53:01 +0000 Resent-Message-ID: <handler.67259.B.171974114222946 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67259 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: matt@HIDDEN, 67259 <at> debbugs.gnu.org Cc: Ihor Radchenko <yantar92@HIDDEN> X-Debbugs-Original-To: Matt <matt@HIDDEN>, bug-gnu-emacs <bug-gnu-emacs@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.171974114222946 (code B ref -1); Sun, 30 Jun 2024 09:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jun 2024 09:52:22 +0000 Received: from localhost ([127.0.0.1]:55150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sNrEM-0005y2-8H for submit <at> debbugs.gnu.org; Sun, 30 Jun 2024 05:52:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:44314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <manikulin@HIDDEN>) id 1sNrEJ-0005xu-Sc for submit <at> debbugs.gnu.org; Sun, 30 Jun 2024 05:52:20 -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 <manikulin@HIDDEN>) id 1sNrEJ-0000aP-Qt for bug-gnu-emacs@HIDDEN; Sun, 30 Jun 2024 05:52:19 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <manikulin@HIDDEN>) id 1sNrEI-0001K4-1m for bug-gnu-emacs@HIDDEN; Sun, 30 Jun 2024 05:52:19 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-52ce9ba0cedso3329138e87.2 for <bug-gnu-emacs@HIDDEN>; Sun, 30 Jun 2024 02:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719741136; x=1720345936; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:cc:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=AW9RTHxdIqO8W67OPIEQ8bxLc1mDtpxThXyh3vqguGQ=; b=KKUuyw4sXjY6eRIZxwL/7vNgzT4mYVE+dSmU7gEdKumvHg0SQl2RWlDunkv1Eu7rNZ Dm9CHXcpQ84zKqyaMqVbHLcsTTRWHXv++yeGdg7av6P95D7DyDAa2W57eN8izWILz+SA xyjcaLKlXDqGkB3ULviko7V/s9sAqA7LIqw5i+WtIObTMpB81Cbu7KF/PBM9jnYvW7Eh Sm0vkU6zrGD0F04A0WhGznnadRKf8WFJQmEm1yn1Ku52uacVYL0MVxkm2HQFZMZ6p9lg LQ0wjBLVQMPF7zDulKXCiJ1ts0A9Yv4ftv1Jkvx1IJf285d/8LJrQNwov7wq6k1XSIWH Swsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719741136; x=1720345936; h=content-transfer-encoding:in-reply-to:from:cc:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AW9RTHxdIqO8W67OPIEQ8bxLc1mDtpxThXyh3vqguGQ=; b=CozxICL5+ESXdZl9FOdDMPR+6tGKTEV7pMz9/a1x63WUR4di8z88lGxMEqW8BxR5Dk 0Wgiu3VyEspF6QB1QMO2zc8PefFy8YislETZsDo0+PmnEXzdsWm1X1kZ7HtEFOYl0FJx /Rh47LPRLQTYtMpQesr8zSvg0ktLZs0qFYMKydiZHsSx4WVkb5hDWt57nUK8LGVIAiqp juIhIPxZ2UUiYQLTl2Y4jJXjdMf0LQEK6oO6MCVOKIF0QxAS0QcJhmxTkPOVn+/RyNKd KQMP6OG/SlkgPG8XHpmiSAdSu8uXDC1UIvW8MI8oNUuDgfoxAT20xbGb18eZZE5lYItV cujQ== X-Forwarded-Encrypted: i=1; AJvYcCXjIe91GlKmJjGEHaceayx+G8JPKuaYk3XnW4Cz1hmymGfJlucGJQrTfKJI18yNmn+HTpDURIIzQiZUys3R0F9fYKKsrdU= X-Gm-Message-State: AOJu0Yzx/oEQFQtXTS4ITU8WVrRdsuU3Qx8Nl9ilz+fVUE7Xkv0rGZ3p wU43gLnwf9aZmlIugzTk8LzFP0Bn8tTdOpcFR71SdG+HXLZrgwPr X-Google-Smtp-Source: AGHT+IG3zShjm82PV1RFZ3NWPl7s4L5zwg+KVev+7bUbv/fgGY2AnMhOS0wNSSy0dqcqaD72fvA4GA== X-Received: by 2002:ac2:4c41:0:b0:52c:df8e:a367 with SMTP id 2adb3069b0e04-52e82705afemr2321640e87.53.1719741135826; Sun, 30 Jun 2024 02:52:15 -0700 (PDT) Received: from [192.168.0.102] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id 2adb3069b0e04-52e7ab1025esm888303e87.88.2024.06.30.02.52.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Jun 2024 02:52:15 -0700 (PDT) Message-ID: <81d5867b-a9fd-4cef-9f0f-e0a42cd5e309@HIDDEN> Date: Sun, 30 Jun 2024 16:52:14 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <18be1dbb3c7.10690fc703382635.7777970297366947027@HIDDEN> Content-Language: en-US, ru-RU From: Max Nikulin <manikulin@HIDDEN> In-Reply-To: <18be1dbb3c7.10690fc703382635.7777970297366947027@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=manikulin@HIDDEN; helo=mail-lf1-x12f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) On 18/11/2023 16:55, Matt wrote: > I'm helping to maintain Org mode's shell interaction. The following > was reported to the Org list. When I noticed a discussion of dash bug causing difference in comparison to bash for the provided input, I have realized that Org babel shell issue and this emacs bugs are unrelated. This one is specific to interactive sessions. > Emacs M-x shell and M-x term executing in term-line-mode both produce > a different result Likely `shell' and `term' issues should be treated separately and this bug should be cloned. > than expected as compared to terminal emulators > like xterm or xfce4-terminal running Bash. For non-Emacs terminal > emulators, "bar" is echoed. M-x shell and M-x term executing in > term-line-mode do *not* echo "bar". > > To reproduce with M-x shell: > > 1. emacs -Q > 2. M-x shell > 3. Copy the following two lines: > > ssh localhost "echo foo>foo_file" > echo "bar" I think the following allows to eliminate ssh and to demonstrate the issue with purely local commands. (BASH on macOS might be too old) fakessh() { bash -c 'read -t 0.2 -r; printf "fakessh read: %s\n" "$REPLY"'; } fakessh echo next result: fakessh read: echo next instead of fakessh read: next likely expected by users because it is behavior of xterm&Co. since `shell' relies on specific terminal type, to get the same result on pasting whole snippet at once, do in xterm or a similar application TERM=dumb bash With default TERM modern terminal applications and shells have bracketed paste enabled. It is a security measure that allows users to review pasted commands before executing them <https://security.stackexchange.com/questions/39118/how-can-i-protect-myself-from-this-kind-of-clipboard-abuse> When bash is running outside of Emacs, it is possible to paste multiple commands into an editor, try C-x C-e in bash prompt. In my opinion, `shell' either should be documented as unsafe with warnings in docstring and manual or some workaround should be implemented, e.g. saving paste text into a temporary file and executing them. > To reproduce with M-x term: > > 1. emacs -Q > 2. M-x term > 3. C-c C-j to switch to term-line-mode Notice that `term' is not affected if `term-line-mode' is not activated. > 4. Copy the following two lines: > > ssh localhost "echo foo>foo_file" > echo "bar" Another option to break xterm that might be closer to `term-line-mode': Create a custom inputrc file, e.g./tmp/disable-paste.inputrc $include /etc/inputrc set enable-bracketed-paste off and run e.g. in xterm INPUTRC=/tmp/disable-paste.inputrc bash The result pasting the bunch of commands at once is fakessh read: echo next I think, input from `term-line-mode' should be treated more closely to bracketed paste. As a final remark, be careful with scripts running commands like ssh or ffmpeg that optionally read stdin. Be explicit with your intentions and either do fakessh </dev/null echo next or fakessh <<"EOF" echo next EOF depending on desired result. <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!"
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.