From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.devel Subject: [PATCH] eshell-exec-visual: Don't drop existing escape char Date: Mon, 20 Jun 2022 17:35:49 -0700 Message-ID: <20220621003549.1092032-1-spwhitton@spwhitton.name> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18648"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Sean Whitton To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 21 02:39:07 2022 Return-path: Envelope-to: ged-emacs-devel@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 1o3Rv5-0004bz-Ni for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Jun 2022 02:39:04 +0200 Original-Received: from localhost ([::1]:48030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3Rv4-0001df-5l for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Jun 2022 20:39:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3RsB-0000o0-0K for emacs-devel@gnu.org; Mon, 20 Jun 2022 20:36:03 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:35537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3Rs9-0000SQ-KS for emacs-devel@gnu.org; Mon, 20 Jun 2022 20:36:02 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E208D5C00FD; Mon, 20 Jun 2022 20:35:58 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 20 Jun 2022 20:35:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm1; t=1655771758; x=1655858158; bh=Ov35HWjVDf uJBk6qHmfFneqvfNnMoRG0Jl66BOHkoLs=; b=GTdtd54GN6PnkZa9A7zwcoTPy1 ffpK93041Fwkxf4i3oVCdvde2czqXyzRMF2Aln6R/447ylJcoeujL9SP7mljK8vG biSItdFHkm16qZl/gPPB0AsFWforLSZtB3npdHerMiigXeiMfTFFHT8zuAFoIgGV Ob7yizEWwJAIKKwrR7ePiX7XFpJuJGNiX6MyLf86CJO6AKQu9q3DlRQ+ROEaVznu z8sc4qMzwuhqcGS957gQXnvwJb0RuAKAMZa/rc24Sm025/FF44JS72b3rL4Nf6PP 3XAbqMuMkhcubAoaK2wuyWT89Rix4w8vmajbbOuOpbs5hv6ffIHzjqi3CflQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1655771758; x=1655858158; bh=Ov35HWjVDfuJBk6qHmfFneqvfNnMoRG0Jl6 6BOHkoLs=; b=geAsB0kzAuSWCGvUIlzgU62IUAiHo4AMFFRl4aR7nB562WSP7kj IJ5iv2WxInu8ycTAqwC0VUaT/vt7ExIe3IMj1VPr3KqsONvtIsEkeH8tz0SGkzjs ABo6B6kVIBLykirFpg6uRS/kS5ght1tm+Lk4fEEiJUTV0YcyO8cMsb3SexzR2kIr F0Wm/k8CQ9o2XT8OFSzQZO/9xwmSoBKMAd6+6tQaI8Kh7LF04c06kB5vha9K1K3T DEijQiEDvbJ4XjWCZJbRZeZ9edtpe9v4APlL2E+jRS11fGG7u1JzyDkTAQCZFw4E Hi+dtdcdKle9clBlnYfmaD2YSrua9I127YQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefvddgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpefuvggrnhcuhghhihhtthhonhcuoehsphifhhhithhtohhnsehs phifhhhithhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepveffudduiedtjeevie dvgffhheehiefhjedvhfdtvdfhieefkedvueeuudduveffnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhih htthhonhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Jun 2022 20:35:58 -0400 (EDT) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id 1EA047E066B; Mon, 20 Jun 2022 17:35:57 -0700 (MST) X-Mailer: git-send-email 2.30.2 Received-SPF: pass client-ip=66.111.4.27; envelope-from=spwhitton@spwhitton.name; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_HELO_PASS=-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-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291474 Archived-At: Since this code was written, `term-set-escape-char' has begun undoing previous calls to itself. Additionally, there is nothing in the documentation for `eshell-escape-control-x' suggesting it is meant to replace the existing escape char as opposed to adding a second. See also comments in `ansi-term'. * lisp/eshell/em-term.el (eshell-exec-visual): Don't drop existing escape char. --- lisp/eshell/em-term.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el index d150c07b03..6aefb8b599 100644 --- a/lisp/eshell/em-term.el +++ b/lisp/eshell/em-term.el @@ -187,7 +187,8 @@ eshell-exec-visual (error "Failed to invoke visual command"))) (term-char-mode) (if eshell-escape-control-x - (term-set-escape-char ?\C-x)))) + ;; Don't drop existing escape char. + (let (term-escape-char) (term-set-escape-char ?\C-x))))) nil) ;; Process sentinels receive two arguments. -- 2.30.2