From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71050: Tramp's direct-async-process makes remote IRB be missing prompt and duplicate input Date: Sun, 19 May 2024 03:46:30 +0300 Message-ID: <12e59b45-c338-485a-afc8-04210d67a569@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15970"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 71050@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 19 02:47:30 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s8Ui1-00040D-Do for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 May 2024 02:47:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8Uhc-0002Bl-Qy; Sat, 18 May 2024 20:47:04 -0400 Original-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 1s8UhX-00028I-Jh for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 20:47:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s8UhX-0002cN-BO for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 20:46:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8Uha-0005ON-NN for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 20:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 May 2024 00:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71050 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171607960920717 (code B ref -1); Sun, 19 May 2024 00:47:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 May 2024 00:46:49 +0000 Original-Received: from localhost ([127.0.0.1]:35657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8UhM-0005O5-PU for submit@debbugs.gnu.org; Sat, 18 May 2024 20:46:49 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:36260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8UhL-0005Nz-4s for submit@debbugs.gnu.org; Sat, 18 May 2024 20:46:47 -0400 Original-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 1s8UhD-00026l-VV for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 20:46:41 -0400 Original-Received: from fhigh2-smtp.messagingengine.com ([103.168.172.153]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8Uh8-0002RA-Lk for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 20:46:39 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 4ED7711400AC for ; Sat, 18 May 2024 20:46:33 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 18 May 2024 20:46:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1716079593; x=1716165993; bh=8HonnPwcZQ cC6pLHH/PkKVqvMbl4lXkpBzV2IW2hRDg=; b=Gz6ynDOixORM+R4Do1Q2fNwmfn vOpeajbuHj41cGs47fwn3pJIRVQ8pGvQErTGjzDniwJJ3NPLbyRaJM+MNukCvhND GWFWbXJ5lMg5e2qk4LvGQL76n0KlSb99uzfTO/GO4FwVgzqJfygyASANpzgr12Jf TrPTlASgV74ZNxzwB7hm1cNwna8Yz5rEjG56Im2m9MtamoQG+0J3kt+rFZQVHDi5 rGBURhmfQW3KeWl44lgNGrL/Fo24LlMvq7ljJzBpxsgYwhuQH1z9S3dXn31WV1kM ZwdJW21FLUpOY7vDCI2LeOs34NTUeqodu38QIbUxA7He6AkkEz/ZDlxplsdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1716079593; x=1716165993; bh=8HonnPwcZQcC6pLHH/PkKVqvMbl4 lXkpBzV2IW2hRDg=; b=gULQduooW3aTAygw3M2cD9bjVJ0ArSfyHUy8xjPl3AXf 8YX+W5TroKE12GV+hm99U56o5LJ4FzTR1FTneewQCNFuBpIlRp60ZgfD2MROtB0Z rPm7mXy25fRVQ4D3qwr9nl8LpCuxkIkvv7roJIK/4XyVMssUA3RSxud84xGFS5Cg yOrFPf1FtoIku+QXcr3Zvz9bVd3LR87gEx8EqRBpxwY4lYSPbqbq4mU8ESCUPE4C Fkk3o/F25w3MtxwIxZ3tY4jB0Ef3Anlj9AkNsY5QVlFbGkprHWTLGQR5yeaxHOa2 hjsl6sByETE3z6ZpxIwLAbcoSWiazTqIY0VDZhcMYw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdehjedgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfvhffutgfgsehtjeertd dtvdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthho vhdruggvvheqnecuggftrfgrthhtvghrnhepfeekfeeghfejveehkedtgefhffejgefgud etgfeguefhteekudeivefghfekgfevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 18 May 2024 20:46:32 -0400 (EDT) Content-Language: en-US Received-SPF: pass client-ip=103.168.172.153; envelope-from=dmitry@gutov.dev; helo=fhigh2-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 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_LOW=-0.7, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01, URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285395 Archived-At: It's not 100% clear to me that the bug is in Tramp and not IRB (run-python doesn't seem to exhibit the same problems), but it's easy enough to reproduce, so maybe the cause can be identified and fixed without too much trouble. It's probably something like the TERM variable or "is a tty" detection. Steps: 1. Install inf-ruby from somewhere (e.g. NonGNU ELPA). 2. Connect to a server that has "direct-async-process" configured and which also has Ruby installed. fencepost has Ruby installed, FWIW. 3. Evaluate this: (run-ruby "irb"). 4. The REPL buffer will be created called *ruby* where you can send input and receive output, but there is no prompt there, and whatever input you send is first duplicated in the output. Also, the buffer starts with "Switch to inspect mode", which seems to be related to the latter (input duplication) but not the former. If the connection is not "direct-async-process", the REPL functions normally (prompt visible, no input duplication). There is also an intermediate situation (with "direct-async-process" enabled) that happens if you simply run 'M-x inf-ruby' - that calls 'irb' with a certain set of arguments for maximum compatibility. The result is that the prompt *is* visible, but the input duplication still happens. It would be great to fix the bare (run-ruby "irb"), though - because there are contexts where passing the aforementioned extra arguments is more difficult. But I'll take any improvements as a win.