Connect to shared drive from Emacs on Windows 7

1

I am using emacs-w32.exe, invoked from Cygwin, on a Windows 7 machine. I'm trying to connect to a shared drive that I can otherwise access and write to (e.g., by using the Windows explorer), but I am unable to deduce the proper TRAMP (?) setup and invocation for the drive.

I've tried C-x C-f and then some variation of one of the following:

 \\REMOTE-HOST\<path>
 /plink:\\REMOTE-HOST:<path>
 /plink:USER@REMOTE-HOST:<path>
 /ssh:USER@REMOTE-HOST:<path>

... along with some other variations, mostly involving forward vs. back slashes.

I haven't yet installed a samba client, because I am on a Windows machine which natively connects to such a drive and it doesn't seem like it should be necessary, but if that's the answer, I don't know how to either (a) install a samba client from Cygwin, or (b) direct emacs-w32.exe to the proper path. But I'd hope that, between plink/PuTTY and the Windows native capacity, I shouldn't need to take such steps.

Any advice?

(EDIT: Steven's advice worked when I invoke emacs, but not emacs-w32, so I'll set that as the answer, but the mystery remains why the one works and not the other. But, pragmatically speaking, avoiding emacs-w32 will work for me.)

amp108

Posted 2015-05-14T17:31:54.097

Reputation: 133

Answers

1

Try forward slashes: //REMOTE-HOST/<path>

Steven

Posted 2015-05-14T17:31:54.097

Reputation: 24 804

Tried that, and it thinks I'm trying to create //path/to/file on the local machine because I get the message: "Use M-x make-directory RET RET to create the directory and its parents." – amp108 – 2015-05-14T17:41:34.947

C-f C-x //serverName/shareName/file works for me to open a remote file. Tab completion even works. This works in both emacs and emacs-w32. – Steven – 2015-05-14T17:50:22.850

Strange. Works for me with emacs, but not emacs-w32. Don't know why, but I'll avoid running the latter. – amp108 – 2015-05-14T18:14:36.710