Is there a way to use the emacs installed my local computer to access remote files I have in a remote server? I have googled and found out that I should use TrampMode however it is necessary for me to know the exact file path. Isn't there a way for me to open an ssh connection to the remote server and from there open the files with the local emacs in my computer?
|
There are various ways to do this, but in generally you are going about this problem backwards. Copy your emacs configs to the remote machine and use emacs local to the files you are editing. The "various ways to do this" would fall into two categories. First would be ways of mounting a remote drive locally through something like sshfs, some fuse file system, samba, nfs, or any number of other mounting systems to bring file level access to your machine. Second would be various programs that allow you to login and browse a remote system, then operate on files by transferring a copy of them to a local temp file, editing it, then transferring it back. Several programs make that process look pretty seamless, but it's a hack. |
|||||||||||||||
|
|
Or you can open emacs, run eshell, then cd to the remote machine, like:
Now, run shell commands, navigate to the file you want and open it:
|
|||
|
|
|
I do think that Tramp is what you are looking for. You can use Dired mode to browse the remote directories and look for the file you want. For example, if I'm looking for some file in
You'll get an output like this:
Then you can use e.g. the arrow keys to find the file you wanted to edit. Hit enter when the cursor is on the file to edit it. |
|||
|
|