I have two copies of the same project, one local, one on a remote server, and I am editing a project's file locally, while running an inferior ESS process on the remote server. The remote files get synchronized outside Emacs, and I would like to avoid editing files remotely if I can help it.
When I try to load the file (ess-load-file), it obviously sends the command "source()" as expected. The problem is that I would like it to use the file name with the local directories stripped from it because they don't exist on the remote server, just the bare filename.
I know thatess-load-file
uses (buffer-file-name)
to find out the file name, but I think I just can't replace a buffer's file name with whatever I want. I've been using
(ess-load-file (file-name-nondirectory (buffer-file-name)))
and rebinding the keybinding for ess-load-file
to run this instead, but is there some nicer way of doing this?