tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (HEAD/b20b7910b413c13352213d37cac8e948ad554dc3); CR-LF woes ag


From: Michael Albinus
Subject: Re: tramp (HEAD/b20b7910b413c13352213d37cac8e948ad554dc3); CR-LF woes again — PATCH ATTACHED
Date: Wed, 22 Nov 2023 12:41:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Dominique Quatravaux <dominique@quatravaux.org> writes:

Hi Dominique,

> When accessing some file over the /kubernetes: Tramp connection type,
> browsing goes sideways the instant I am done typing in the “hostname”
> (i.e. in this case, the pod name). It appears that for some reason or
> other, the CR/LF situation is being handled poorly.

Yes. This happens, because Tramp tries do read something early (during
completion), when the CRLF handling hasn't been established yet. I believe.

> diff --git a/lisp/tramp-sh.el b/lisp/tramp-sh.el
> index 186ef127..769138dc 100644
> --- a/lisp/tramp-sh.el
> +++ b/lisp/tramp-sh.el
> @@ -5540,7 +5540,7 @@ raises an error."
>                    (unless noerror signal-hook-function)))
>               (read (current-buffer)))
>           ;; Error handling.
> -         (when (search-forward-regexp (rx (not blank)) (line-end-position) t)
> +         (when (search-forward-regexp (rx (not (or "\r" blank))) 
> (line-end-position) t)
>             (error nil)))
>       (error (unless noerror
>                (tramp-error

Thanks for the patch, it looks fine. However, perhaps it is more simple
to use 'space' instead of 'blank', this includes also characters like
CR, LF, FF, you name it. For all characters with whitespace syntax, see
<https://en.wikipedia.org/wiki/Whitespace_character>.
            
--8<---------------cut here---------------start------------->8---
            (when (search-forward-regexp (rx (not space)) (line-end-position) t)
--8<---------------cut here---------------end--------------->8---

Could you, please, test in your environment?

>  Dominique Quatravaux

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]