tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp (2.7.0-pre nil/nil); Can't connect to server anymore


From: Kirill A. Korinsky
Subject: Re: tramp (2.7.0-pre nil/nil); Can't connect to server anymore
Date: Mon, 8 Jan 2024 14:22:06 +0100

Hi Michael,

> On 8. Jan 2024, at 14:11, Michael Albinus <michael.albinus@gmx.de> wrote:
> 
>>> I don't understand. Does this happen when remote /tmp is not writable?
>>> Tramp shall show you the error message, and cease to work - at least
>>> that's the intention of the patch.
>> 
>> After your patch it works without any error in Message buffer.
>> 
>> Works mean that I can open files via tramp.
> 
> I'm confused ...
> 
> Could you please start as before
> 
> --8<---------------cut here---------------start------------->8---
> # emacs -l tramp --eval '(setq tramp-verbose 10)' 
> /ssh:playground.island.local:
> --8<---------------cut here---------------end--------------->8---
> 
> and show the debug buffer? I *want* to expose the error to the user :-)


I've used the wrong host for my test, sorry for confusion.

When I run:

> emacs -Q -l tramp --eval '(load-file 
> "~/Downloads/patched-tramp-bundle-read-file-names.el")' 
> /ssh:playground.island.local:


with content of patched-tramp-bundle-read-file-names.el as:

> (defun tramp-bundle-read-file-names (vec files)
>   "Read file attributes of FILES and with one command fill the cache.
> FILES must be the local names only.  The cache attributes to be
> filled are described in `tramp-bundle-read-file-names'."
>   (when files
>     (tramp-maybe-send-script
>      vec
>      (format tramp-bundle-read-file-names
>            (tramp-get-file-exists-command vec)
>            (format "%s -r" (tramp-get-test-command vec))
>            (format "%s -d" (tramp-get-test-command vec)))
>      "tramp_bundle_read_file_names")
> 
>     (dolist
>       (elt
>        (with-current-buffer (tramp-get-connection-buffer vec)
>          ;; We cannot use `tramp-send-command-and-read', because
>          ;; this does not cooperate well with heredoc documents.
>          (unless (tramp-send-command-and-check
>                   vec
>                   (format
>                    "tramp_bundle_read_file_names <<'%s'\n%s\n%s\n"
>                    tramp-end-of-heredoc
>                    (mapconcat #'tramp-shell-quote-argument files "\n")
>                    tramp-end-of-heredoc))
>            (tramp-error vec 'file-error "%s" (tramp-get-buffer-string)))
>          ;; Read the expression.
>          (goto-char (point-min))
>          (read (current-buffer))))
> 
>       (tramp-set-file-property vec (car elt) "file-exists-p" (nth 1 elt))
>       (tramp-set-file-property vec (car elt) "file-readable-p" (nth 2 elt))
>       (tramp-set-file-property vec (car elt) "file-directory-p" (nth 3 
> elt)))))


the *Messages* buffer still has wrong error:

> For information about GNU Emacs and the GNU system, type C-h C-a.
> Loading /Users/catap/Downloads/patched-tramp-bundle-read-file-names.el 
> (source)...done
> Tramp: Opening connection nil for playground.island.local using ssh...failed
> Wrong type argument: "Wrong type argument", "listp /bin/sh:"
> signal: Wrong type argument: "listp /bin/sh:"
> 


--
wbr, Kirill

Attachment: signature.asc
Description: Message signed with OpenPGP


reply via email to

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