Hi,
I'm using slime to connect to sbcl on a remote server. It works faultless and I'm very happy with it.
My only problem is that I also have to keep the source files on the remote server. With trampoline this is no problem, too.
I'm looking for a solution, to keep the source files locally, on my laptop (near my emacs).
I tried sshfs, and nfs, scp etc., but this is very clumsy, if you use a laptop and access the server from different locations. (Different versions locally and on the server, etc.)
Do you see a chance that after ^c-^k th remote lisp requests the source file via the slime protocol from my local laptop.
So I would have all the sources of my projects, which run on different remote servers, locally on my laptop, save, always uptodate, easy for version management etc.
Helmut
* Dr. Helmut G. Enders [2008-07-26 10:12+0200] writes:
I'm looking for a solution, to keep the source files locally, on my laptop (near my emacs).
If you just need a webserver on the remote machine, I would recommend to install a webserver on the laptop and to develop most of the time on the laptop only. Put the source files under something like CVS and use that for synchronization.
Do you see a chance that after ^c-^k th remote lisp requests the source file via the slime protocol from my local laptop.
Not without changing/extending SLIME.
Instead of slime-compile-file you could use slime-compile-region (on the entire buffer). This doesn't copy the file to the remote machine but M-. etc. should work as long as the buffer exists.
If you don't mind to change SLIME, you could create a command which copies the file, either with scp or via SLIME's connection, before calling slime-compile-file. Additionally you can set slime-from-lisp-filename-function and slime-to-lisp-filename-function so that the Lisp side loads the remote copy but reports compiler messages etc. on the local file.
If the filename translation functions are setup properly, the following should work:
(defun my-compile-file () (interactive) (slime-eval `(swank:overwrite-file ,(slime-to-lisp-filename (buffer-file-name)) ,(buffer-substring-no-properties (point-min) (point-max)))) (slime-compile-and-load-file))
(swank::defslimefun swank::overwrite-file (filename string) (with-open-file (stream filename :direction :output :if-exists :supersede :if-does-not-exist :create) (write-sequence string stream) (finish-output stream)) t)
Helmut.
On Jul 29, 2008, at 12:30 , Helmut Eller wrote:
Do you see a chance that after ^c-^k th remote lisp requests the source file via the slime protocol from my local laptop.
GNU Emacs also has something called "File Shadowing" which could be used: http://www.gnu.org/software/emacs/manual/html_node/emacs/File-Shadowing.html
Then again, I am doing the synchronization to the remote side with git or darcs.
Cheers, Michael