Is there a way to give the ‘find-file’ function a hint?
I’m working with files in the same directory on a remote server, and I’m getting tired of typing in the machine name, and directory structure all the time. It would sure be great if I could write a function that would bring up the find-file prompt with the machine name and directory already filled in.
(Note: I use Emacs 23.1)
Thanks for your help in advance.
If you’re starting the
'find-filecommand from buffers associated with files on the remote server, the staring point should already include the directory/remote server filled in.One way to skin this cat is to do
note: I use tramp, and that’s how find-file starts. I’d not noticed the
/ssh:before today, but I don’t use tramp very much any longer.To answer your question directly, this command calls find-file with the “hint”:
Obviously customize the starting point.
One last way I can think of solving this is to do
M-x diredon the remote server, and do your file finding from that point.