Hello, I want to run a swank server on a remote machine and on my local machine.
I configured slime according to http://paste.lisp.org/display/17592 and it works fine to edit remote files via tramp and compile them with swank. But I can't edit or compile local files anymore. I always get the following error message "Not a tramp file name: ..."
How can I configure slime so that I can run local as well as on a remote machine and edit local and remote files?
Thank you.
Regards, Rüdiger Sonderfeld
* Rüdiger Sonderfeld [2006-07-26 19:27+0200] writes:
How can I configure slime so that I can run local as well as on a remote machine and edit local and remote files?
This isn't well supported.
It's important to understand that SLIME doesn't copy files around. All it does is to rewrite filenames so that the Lisp system (or tramp) can find the file. This usually means that the file must be readable by the CL process (possibly via NFS or Samba or something like that).
Instead of the file based commands slime-compile-file/load-file, you could use the buffer based pendants: compile-region/eval-region. Then you don't need to make the file available to the Lisp process, but that's probably only useful for small modifications.
It might also useful to call
(remove-hook 'slime-mode-hook 'slime-setup-first-change-hook)
so that SLIME doesn't try to translate filenames if you open a local file.
Instead of fiddling around with tramp and remote editing, I'd recommend to always run Emacs and Lisp on the same machine.
Helmut.
Helmut Eller wrote:
- Rüdiger Sonderfeld [2006-07-26 19:27+0200] writes:
How can I configure slime so that I can run local as well as on a remote machine and edit local and remote files?
This isn't well supported.
It works fairly well for my use case of it at least. I know there are at least a few others that successfully use this functionality as well.
It's important to understand that SLIME doesn't copy files around. All it does is to rewrite filenames so that the Lisp system (or tramp) can find the file. This usually means that the file must be readable by the CL process (possibly via NFS or Samba or something like that).
[...] Instead of fiddling around with tramp and remote editing, I'd recommend to always run Emacs and Lisp on the same machine.
Most of my lisp experience has actually been developing on separate machines, operating over tramp or a a mounted fileshare from the server.
I've encountered the "Not a tramp file name: ..." error on a few occasions, generally when slime tries to use the wrong set of filename translation functions.
slime-filename-translations holds a list of translation sets each of which is keyed by a regular expression that is matched against the current result of #'CL:machine-instance (via calling the elisp function slime-machine-instance). I have had a few problems as a result of this when editing local lisp files in lisp-mode without being connected to a running swank. Perhaps follow Helmut's advice about disabling it?
By default there is always a translator set '("" identity identity) I.E. for any hostname that hasn't matched something earlier in the list, use the identity function to translate to and from lisp. This should be the one that is used for work on localhost. Check that you didn't remove this while setting up for work on the remote host.
You can find out what is actually being used by evaling in emacs: (slime-find-filename-translators (slime-machine-instance))
If you want to poke around with it the two key functions that slime uses to do the translation are slime-to-lisp-filename and slime-from-lisp-filename. They are currently around line 1300 in latest cvs slime.el.
For reference, I'm currently using XEmacs on windows connecting to either Allegro locally, or SBCL on a remote debian server (both through a samba fileshare and tramp over ssh).
Hope this helps a bit, Nathan Bird