Ok, to properly call slime-create-filename-translator , I need to know what cl:machine-instance returns on this local box (since I am not doing anything remotely, just trying to translate Unix-style pathnames in Cygwin Emacs to windows-style pathnames for SBCL lisp.)
But slime-machine-instance and cl:machine-instance are not found via apropos or function search.
Is there something wrong with directly setting slime-filename-translations in this case. And the docs dont specify if the :machine-instance and :remote-host options are strings or regexps. but it looks like they are strings
(setq slime-filename-translations '((".*" (lambda (emacs-filename) (let ((result (shell-command-to-string (concat "cygpath -w " emacs-filename)))) (progn (message (concat "TO-lisp: " result)) result))) (lambda (lisp-filename) (let ((result (shell-command-to-string (concat "cygpath " lisp-filename)))) (progn (message (concat "FROM-lisp: " result)) result))))))
(defadvice slime-init-command (around fix-slime-init activate) (let* ((filename (ad-get-arg 0)) ;; We can't use slime-to-lisp-filename here, as that uses ;; slime-machine-instance, which needs the connection to ;; already be set up. (filename (funcall (first (slime-find-filename-translators "")) (expand-file-name filename)))) (ad-set-arg 0 filename) ad-do-it))
On Dec 11, 2007 7:42 AM, Abhishek Reddy arbscht@gmail.com wrote:
Hi,
In subsection 8.1.3 of the manual, the example code for slime-create-filename-translator contains a misleading error. It uses :machine-instance "remote.example.com" and :remote-host "remote", whereas the those values should be swapped.
There's also a typo ("transaltions") in the relevant text before the example code.
Diff:
Index: slime.texi
RCS file: /project/slime/cvsroot/slime/doc/slime.texi,v retrieving revision 1.61 diff -u -r1.61 slime.texi --- slime.texi 27 Nov 2007 13:16:52 -0000 1.61 +++ slime.texi 11 Dec 2007 12:22:51 -0000 @@ -2137,11 +2137,11 @@ (and vice-versa). Assuming the remote machine's host name is @code{remote.example.com}, @code{cl:machine-instance} returns ``remote'' and we login as the user ``user'' we can use @SLIME{}'s -built-in mechanism to setup the proper transaltions by simply doing: +built-in mechanism to setup the proper translations by simply doing:
@example -(push (slime-create-filename-translator :machine-instance "remote.example.com"
:remote-host "remote"
+(push (slime-create-filename-translator :remote-host "remote.example.com"
:machine-instance "remote" :username "user") slime-filename-translations)
@end example
Cheers, Abhishek _______________________________________________ slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel