From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#63539: 29.0.90; TRAMP fails to detect shell prompts containing ] Date: Tue, 23 May 2023 10:34:47 -0400 Message-ID: References: <877ct8w4bs.fsf@gmx.de> <87sfbvuk4r.fsf@gmx.de> <87h6sbufv3.fsf@gmx.de> <87bkiivqvu.fsf@gmx.de> <877ct6vpdd.fsf@gmx.de> <871qjevlzc.fsf@gmx.de> <87r0rdtzax.fsf@gmx.de> <877ct3tife.fsf@gmx.de> <87mt1wdvlk.fsf@gmx.de> <87zg5vw430.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38208"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 63539@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 23 16:35:16 2023 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 1q1T6Z-0009il-Uw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 May 2023 16:35:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1T6Q-0006cW-FF; Tue, 23 May 2023 10:35:06 -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 1q1T6M-0006ZO-7G for bug-gnu-emacs@gnu.org; Tue, 23 May 2023 10:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1T6L-0005jd-U6 for bug-gnu-emacs@gnu.org; Tue, 23 May 2023 10:35:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q1T6L-0005ok-OD for bug-gnu-emacs@gnu.org; Tue, 23 May 2023 10:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 May 2023 14:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63539 X-GNU-PR-Package: emacs Original-Received: via spool by 63539-submit@debbugs.gnu.org id=B63539.168485249622349 (code B ref 63539); Tue, 23 May 2023 14:35:01 +0000 Original-Received: (at 63539) by debbugs.gnu.org; 23 May 2023 14:34:56 +0000 Original-Received: from localhost ([127.0.0.1]:40102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1T6G-0005oM-3f for submit@debbugs.gnu.org; Tue, 23 May 2023 10:34:56 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:40623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1T6D-0005ns-NI for 63539@debbugs.gnu.org; Tue, 23 May 2023 10:34:54 -0400 In-Reply-To: <87zg5vw430.fsf@gmx.de> (Michael Albinus's message of "Tue, 23 May 2023 15:49:07 +0200") 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:262238 Archived-At: Michael Albinus writes: >>> Multiple escape codes are not regarded indeed, my patch did expect that >>> there is not more as one escape code at the end of the shell prompt. >>> >>> Your example is an indication of escape codes, mixed inside the shell >>> prompt. My first attempt (removing all escape codes from the buffer >>> region) did handle that. But as said, there were other regressions with >>> that attemot. >> >> What's wrong with my diff, though? It produces behavior which is much >> closer to how TRAMP behaved before your change, while still fixing my >> issue. > > I've pushed another change to master which goes back to my first > approach: Remove escape sequences in the buffer, before you look for the > prompt. > > The difference is now, that this happens *only* in the initial > connection phase with a remote host, and not later. After that phase we > have a PS1 setting applied by Tramp, which is escape sequences free. > > This approach should avoid the problems I've seen when I've applied a > similar change some days ago. I still need to run all regression test > cases, but a check for crucial tests tell me that we could be optimistic > now :-) > > Could you pls check this change? Thanks, this works with both my prompts. (Fixing both the regression and the original bug)