all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Spencer Baugh <sbaugh@janestreet.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 63539@debbugs.gnu.org
Subject: bug#63539: 29.0.90; TRAMP fails to detect shell prompts containing ]
Date: Mon, 22 May 2023 13:30:42 -0400	[thread overview]
Message-ID: <ierr0r86zp9.fsf@janestreet.com> (raw)
In-Reply-To: <877ct3tife.fsf@gmx.de> (Michael Albinus's message of "Sat, 20 May 2023 12:18:29 +0200")

Michael Albinus <michael.albinus@gmx.de> writes:
> Michael Albinus <michael.albinus@gmx.de> 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ö sequences. However, I haven't done this as part of the regexps
> 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)





  reply	other threads:[~2023-05-22 17:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 16:40 bug#63539: 29.0.90; TRAMP fails to detect shell prompts containing ] Spencer Baugh
2023-05-16 17:53 ` Michael Albinus
2023-05-16 19:28   ` Spencer Baugh
2023-05-16 20:06     ` Spencer Baugh
2023-05-17 14:07       ` Michael Albinus
2023-05-17 14:59         ` Spencer Baugh
2023-05-17 15:39           ` Michael Albinus
2023-05-17 16:56             ` Michael Albinus
2023-05-17 17:28               ` Michael Albinus
2023-05-17 18:08                 ` Spencer Baugh
2023-05-17 18:41                   ` Michael Albinus
2023-05-18 15:49                     ` Michael Albinus
2023-05-20 10:18                       ` Michael Albinus
2023-05-22 17:30                         ` Spencer Baugh [this message]
2023-05-22 19:17                           ` Michael Albinus
2023-05-22 19:45                             ` Spencer Baugh
2023-05-23 13:49                               ` Michael Albinus
2023-05-23 14:34                                 ` Spencer Baugh
2023-05-23 16:31                                   ` Michael Albinus
2023-05-25  7:36                                     ` Michael Albinus
2023-05-17 13:53     ` Michael Albinus
2023-05-17 14:04       ` Spencer Baugh
2023-05-17 14:12         ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ierr0r86zp9.fsf@janestreet.com \
    --to=sbaugh@janestreet.com \
    --cc=63539@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.