2

Maybe I am missing something rather simple but I completely fail to use dired on a remote machine. I can connect via ssh directly without emacs and I can edited a file using Tramp on the remote machine from within Emacs, as it should be. But when I want to use dired to show the home directory on the remote machine I just get an buffer with just one line but not the files in this directory.

I did

C-x C-f /ssh:[email protected]:/Users/Martin/

and was expecting that the whole directory is shown as it is on my local machine.

During completion, i.e. before I press Enter above, I see the files and directories on my remote machine.

Any hint is gratefully acknowledge.

EDIT

Just to document my findings: I disabled dired-quicksort and switched back to macOS' ls and it works fine now. I do not have the time to investigate this further but maybe this will help others in the future.

8
  • 2
    Failing anything else, what happens if you edit a file in the directory of interest, and then use M-x dired and accept the default directory at the prompt?
    – phils
    Oct 19, 2019 at 10:35
  • 1
    I just checked using emacs -Qand it works as expected. There must be something in my config breaking dired. I will document my findings here. Oct 19, 2019 at 12:03
  • 1
    I am not completely sure but it looks like some issue with using dired-quicksort and/or gnu ls on macOS. I switched back to the original ls for insert-directory-program and deactivating dired-quicksort and it works fine. Oct 19, 2019 at 13:02
  • 1
    OP: Thanks for following up your investigation. Maybe include such information in the question (if you don't find the answer by investigating) or in an answer that you provide. That will likely help others.
    – Drew
    Oct 19, 2019 at 16:40
  • 1
    Hi Martin, the latest version of dired-quick-sort should have resolved BSD ls issue (it will disable itself if ls is non-GNU). I'm still working on Tramp support, so hopefully this issue would be gone soon: gitlab.com/xuhdev/dired-quick-sort/-/issues/9
    – xuhdev
    Oct 6, 2020 at 22:12

2 Answers 2

3

I had the same problem and it was caused by the fact that one of the ls switches I use normally in dired was not working on the server shell. Removing all the switches except -l with C-u s solved the problem.

1

If you use dired instead of find-file, this command should invoke tramp to use dired

C-x C-d /ssh:[email protected]:/Users/Martin/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.