[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `tramp-**-handle-insert-directory` does not handle empty directories
From: |
Ruiyang Wu |
Subject: |
Re: `tramp-**-handle-insert-directory` does not handle empty directories well |
Date: |
Sun, 5 Mar 2023 10:06:06 -0500 |
Oh there is one important thing I forget to mention. To see this behavior, you
need to use "-lh" flags for “ls”. It shouldn’t include the “-a” flag. Once you
set that, you should be able to reproduce easily.
Best,
Ruiyang
> On Mar 5, 2023, at 3:35 AM, Michael Albinus <michael.albinus@gmx.de> wrote:
>
> Ruiyang Wu <ywwry66@gmail.com> writes:
>
>> Hi,
>
> Hi Ruiyang,
>
>> Thanks for maintaining this great software. Recently I started to use
>> Tramp and found that opening an empty directory in dired-mode from the
>> remote machine (ssh in my use case) displays a string
>> "//DIRED-OPTIONS// --quoting-style=literal” which is not intended for
>> human read. Opening an empty directory on my local machine does not
>> have this. It looks like the following code from files.el deals with
>> this scenario:
>>> ;; Take care of the case where the ls output contains a
>>> ;; "//DIRED-OPTIONS//"-line, but no "//DIRED//"-line
>>> ;; and we went one line too far back (see above).
>>> (forward-line 1))
>>> (if (looking-at "//DIRED-OPTIONS//")
>>> (delete-region (point) (progn (forward-line 1) (point))))))
>>
>> I use Emacs 28.2 with built in Tramp 2.5.3.28.2. I tried the latest Tramp
>> 2.6.0.2 and see the same behavior.
>
> Could you pls apply the following:
>
> --8<---------------cut here---------------start------------->8---
> ssh -Q -l tramp --eval '(setq tramp-verbose 6)' /ssh:user@host:/empty/dir
> --8<---------------cut here---------------end--------------->8---
>
> with proper values of /ssh:user@host:/empty/dir. The error shall happen,
> and there will be a buffer *debug tramp/ssh user@host*. Please send this
> buffer as attachment.
>
>> Best,
>> Ruiyang
>
> Best regards, Michael.