Helmut Eller wrote:
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.
One of our application coordinates different stocks of a company. It is a nearly 1 G Image and we have to change things remote. Slime works like a charm!!! Requests from users can be solved within Minutes.
Put the source files under something like CVS and use that for synchronization.
and Michael Weber wrote:
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
Thanks, I haven't known that.
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)
Thanks, that's :-) nearly :-) what I want.
(slime-compile-and-load-file) calls (swank:compile-file-for-emacs.. and then (compile-file ... on the swank side.
The HSpec says that the input-file parameter of the 'compile-file' - function is a 'pathname designator' and this can be "a stream associated with a file.." Can I, within swank, fetch the file from the emacs side, e.g. with scp and give that stream as the input-file parameter to compile-file...
Do you think it's work a try, or is it more 'not worth a straw',
(...then lisp doesn't know the source place of the function, does it?)
Helmut.
ditto.