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: Mon, 22 May 2023 13:30:42 -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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25560"; 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 Mon May 22 19:31:11 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 1q19NH-0006UK-53 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 May 2023 19:31:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q19NA-0000HA-Cf; Mon, 22 May 2023 13:31: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 1q19N8-0000H0-MM for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 13:31:02 -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 1q19N8-00026g-ED for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 13:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q19N8-0002bt-9q for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 13:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 May 2023 17:31:02 +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.168477665010009 (code B ref 63539); Mon, 22 May 2023 17:31:02 +0000 Original-Received: (at 63539) by debbugs.gnu.org; 22 May 2023 17:30:50 +0000 Original-Received: from localhost ([127.0.0.1]:36198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q19Mw-0002bN-0z for submit@debbugs.gnu.org; Mon, 22 May 2023 13:30:50 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:45475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q19Mu-0002b4-1Q for 63539@debbugs.gnu.org; Mon, 22 May 2023 13:30:49 -0400 In-Reply-To: <877ct3tife.fsf@gmx.de> (Michael Albinus's message of "Sat, 20 May 2023 12:18:29 +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:262176 Archived-At: Michael Albinus writes: > Michael Albinus writes: > > Hi Spencer, > >> Well, some of the regression tests fail. I'm analyzing what's up, >> likely I'll try it with another approach. >> >> I'll let you know when there is something to test. > > This time the regression tests have (almost) succeeded. Remaining fails > are not related to this change. > > I've pushed everything to master, could you pls test? The change is a > variation of your proposal to extend shell prompt regexps with the > comtro=C3=B6 sequences. However, I haven't done this as part of the regex= ps > themselves. Rather, I've appended the control sequences regexp on the > fly, where needed. This minimizes the hassle for people who want to > customize the user options. > > Best regards, Michael. Hmm, this change doesn't seem to fix my issue. In fact, this change introduces a regression for me: I'm no longer able to use TRAMP ssh on my other machines which have color codes at the end of their prompt, which did work out of the box on Emacs 29! I'm guessing the reason is because this version of the regexp doesn't support multiple escape codes, or blanks in between/at the end of the escape codes? The following patch on top both fixes the regression and also fixes my issue: diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index f986d65d944..1a067c8f9d9 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5711,10 +5711,10 @@ tramp-process-one-action (let ((case-fold-search t) (shell-prompt-pattern (rx (regexp shell-prompt-pattern) - (? (regexp ansi-color-control-seq-regexp)))) + (* (seq (regexp ansi-color-control-seq-regexp) (* blank))))) (tramp-shell-prompt-pattern (rx (regexp tramp-shell-prompt-pattern) - (? (regexp ansi-color-control-seq-regexp)))) + (* (seq (regexp ansi-color-control-seq-regexp) (* blank))))) tramp-process-action-regexp found todo item pattern action) (while (not found)