2

You can open SSH resources in Emacs. Unfortunately, the pathspec used for SSH resources conflicts with possible paths in the virtual file system.

If I run

sudo mkdir "/ssh:example.com"
sudo touch "/ssh:example.com/file"

, I cannot figure out a way to edit the file I just created via Emacs except moving it or creating another hard link. Is there a way to edit this file in Emacs if you can't do that, for example because you don't have write privileges in the directory where the file is?

2

Try C-x C-f /:/ssh:example.com/file RET

The /: prefix is a magic thingy which prevents other magic thingies from interfering.

  • Thank you. This technically answers the question which is why I already accepted the answer. But can I also open that folder in dired? – UTF-8 May 17 '18 at 16:13
  • @UTF-8: Of course: C-x C-f /:/ssh:example.com/ RET – Stefan May 18 '18 at 2:33
  • This causes this error message to appear in the mini buffer: Host name must not match method "ssh" No dired buffer is opened. The *Messages* buffer says: tramp-file-name-handler: Host name must not match method "ssh" – UTF-8 May 18 '18 at 11:07
  • I already wrote a bug report and wanted to make sure the problem occurs in the latest development version of Emacs before sending the email to the mailing list. Turns out it doesn't. But if you add a colon to the end, it does again. So in the latest version, you can't access the directory /ssh:exaple.com: – UTF-8 May 18 '18 at 11:35
  • Should anyone come across this question because they actually suffer from this bug and want a link to the discussion of the bug on the mailing list: debbugs.gnu.org/cgi/bugreport.cgi?bug=31489 – UTF-8 May 18 '18 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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