Hi,
I have xemacs and clisp that came with the cygwin distribution. I just downloaded slime-1.0 and put the following in my custom.el file:
(add-to-list 'load-path "C:\Linux\slime-1.0\") (add-hook 'lisp-mode-hook (lambda () (slime-mode t))) (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t))) (setq inferior-lisp-program "clisp -K full") (require 'slime) (slime-setup)
Now, when I load slime (via M-x slime) I got: [1]> *** - PARSE-NAMESTRING: syntax error in filename "c:\Linux\slime-1.0\swank-loader.lisp" at position 2 Break 1 [2]> *** - READ from #<IO TERMINAL-STREAM>: there is no package with name "SWANK" Break 2 [3]> "C:\DOCUME~1\stebakov\LOCALS~1\Temp\slime.2036" Break 2 [3]>
Could anyone give me some info what I can do to fix it?
Thanks, Andrei
Andrei Stebakov astebakov@yahoo.com writes:
Could anyone give me some info what I can do to fix it?
I don't use CLISP/cygwin/XEmacs, but I think the problem is that CLISP under cygwin only accepts filenames with Unixy syntax. Reini Urban describes a workaround here:
http://article.gmane.org/gmane.lisp.slime.devel/2427
Helmut.
Andrei Stebakov schrieb:
Hi,
I have xemacs and clisp that came with the cygwin distribution. I just downloaded slime-1.0 and put the following in my custom.el file:
(add-to-list 'load-path "C:\Linux\slime-1.0\") (add-hook 'lisp-mode-hook (lambda () (slime-mode t))) (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t))) (setq inferior-lisp-program "clisp -K full") (require 'slime) (slime-setup)
Now, when I load slime (via M-x slime) I got: [1]> *** - PARSE-NAMESTRING: syntax error in filename "c:\Linux\slime-1.0\swank-loader.lisp" at position 2 Break 1 [2]> *** - READ from #<IO TERMINAL-STREAM>: there is no package with name "SWANK" Break 2 [3]> "C:\DOCUME~1\stebakov\LOCALS~1\Temp\slime.2036" Break 2 [3]>
Could anyone give me some info what I can do to fix it?
You have to translate the filenames between windows xemacs and clisp if cygwin.
I tried to post my cygmount fixes here, but it didn't get through. So I post the url instead: http://xarch.tu-graz.ac.at/autocad/lsp_tools/ntemacs/cygwin32-mount.el
.emacs: ;; SLIME load-path (if (eq system-type 'windows-nt) (add-to-list 'load-path (concat invocation-directory "..\..\site-packages\lisp\slime")) (add-to-list 'load-path "/usr/share/xemacs/site-packages/lisp/slime")) (require 'easy-mmode) (defalias 'define-minor-mode 'easy-mmode-define-minor-mode) (if (require 'slime) (slime-setup)) (if (eq system-type 'windows-nt) (setq inferior-lisp-program "n:/bin/clisp.exe -K full -ansi -q -L ENGLISH -N locale -Efile UTF-8 -Eterminal UTF-8" ;swank-backend "/cygwin/w/XEmacs/site-packages/lisp/slime/swank-loader" ) ;; (setq inferior-lisp-program "R:\lisp\clisp\clisp-2.33-win\clisp.bat -ansi -q -L ENGLISH -Efile UTF-8 -Eterminal UTF-8") (setq inferior-lisp-program "/usr/local/bin/clisp-full" ;swank-backend "/cygdrive/w/XEmacs/site-packages/lisp/slime/swank-loader" )) (require 'cygwin32-mount) (require 'npak-cygwin) (defun myslime-cygwin-filename (filename) (if (eq system-type 'windows-nt) ; and lisp is cygwin (npak-cygwin-fix-file-name (replace-in-string filename "//c/" "" (replace-in-string filename "\\" "/"))) filename)) ;;(setq filename "w:\XEmacs\site-packages\lisp\slime\swank-loader") (defun myslime-translate-to-lisp-filename-function (fn) (let ((x (if (eq system-type 'windows-nt) ; and lisp is cygwin (cygwin32-mount-name-expand #'identity filename) ;(replace-in-string filename "//c/" "" ; (replace-in-string filename "\\" "/"));) filename))) (message x) x)) (defun myslime-translate-from-lisp-filename-function (filename) (let ((x (if (eq system-type 'windows-nt) ; and lisp is cygwin (cygwin32-mount-name-reverse #'identity filename) ;;(npak-cygwin-fix-file-name (replace-in-string filename "\\" "/")) filename))) (message x) x)) ;(setq inferior-lisp-program-type 'cygwin)
I finished now filename conversion from win32 <=> cygwin in slime.el, which is a major hackery. parsing the output of mount, table lookup. based on cygwin32-mount.el
The problem remains:
slime.el easily detects if emacs is win32 native or cygwin or unix. but how does it detect under which OS/Filesystem convention the inferior lisp will run? how to get the mounttable of the filesystem of the lisp?
should we add a inferior-lisp-ostype defcustom? should be parse the output of the startup banner to detect the filesystem convention? "loading /home/...."
for example w32 emacs calling a linux acl, w32 emacs calling cygwin clisp, w32 emacs calling w32 clisp, cygwin xemacs calling w32 clisp, ... you get the idea. I also want to switch between clisp cygwin and clisp native. (better GC)
If we add that feature, we can at least use automatic cygwin path translation. See the attachment: It is also a good example how to translate with a mount table alist.
The real pain was that latest clisp (CVS) doesn't understand these filenames anymore: (LOAD "w:/XEmacs/site-packages/lisp/slime/swank-loader") It has to be translated to (LOAD "/cygdrive/w/XEmacs/site-packages/lisp/slime/swank-loader")
Another problem on clisp with cygwin/w32 switching: the fas files are incompatible, but the temp path is the same. I'd like to add the ostype to the path on clisp. no patches yet.
Hi, Reini
I took the code from your previous posting at http://article.gmane.org/gmane.lisp.slime.devel/2427, the one that Helmut suggested. It seems to work for me. Do you think that's enough for the future or I still need a fancier stuff that you posted in your post? BTW, I don't have access to http://xarch.tu-graz.ac.at/autocad/lsp_tools/ntemacs/cygwin32-mount.el.
Thanks a lot! Andrew
Andrei Stebakov schrieb:
I took the code from your previous posting at http://article.gmane.org/gmane.lisp.slime.devel/2427, the one that Helmut suggested. It seems to work for me. Do you think that's enough for the future or I still need a fancier stuff that you posted in your post? BTW, I don't have access to http://xarch.tu-graz.ac.at/autocad/lsp_tools/ntemacs/cygwin32-mount.el.
sorry, rsync is a beast. (tight security here locally) fixed.
Andrei Stebakov schrieb:
I took the code from your previous posting at http://article.gmane.org/gmane.lisp.slime.devel/2427, the one that Helmut suggested. It seems to work for me. Do you think that's enough for the future or I still need a fancier stuff that you posted in your post?
mount-point conversion is needed if the mapping windows<=>cygwin paths are not simple. otherwise my simplier (replace-in-string filename "\\" "/") hack is very fast and easy, because it assumes the paths are the same.
but: latest clisp (self-compiled from CVS) doesn't understand "w:/slime/stuff" anymore. It converts it to "//c/w:/slime/stuff". this is still fixable, if I had the time to fix it. writing and fixing cygwin32-mount.el was faster, then argueing with sam. :)
BTW, I don't have access to http://xarch.tu-graz.ac.at/autocad/lsp_tools/ntemacs/cygwin32-mount.el
fixed.
but: latest clisp (self-compiled from CVS) doesn't understand "w:/slime/stuff" anymore. It converts it to "//c/w:/slime/stuff". this is still fixable, if I had the time to fix it. writing and fixing cygwin32-mount.el was faster, then argueing with sam. :)
So, correct me if I am wrong. Currently I have clisp shipped with cygwin. Sorry I don't know how to check its version. You say that one day when they update clisp I might have a problem with the new paths convention? What's my plan of actions then, download and cygwin32-mount.el and call (require 'cygwin32-mount)? Will I be able to find cygwin32-mount.el some day in the near future?
Thank you, Andrei
Andrei Stebakov schrieb:
but: latest clisp (self-compiled from CVS) doesn't understand "w:/slime/stuff" anymore. It converts it to "//c/w:/slime/stuff". this is still fixable, if I had the time to fix it. writing and fixing cygwin32-mount.el was faster, then argueing with sam. :)
So, correct me if I am wrong. Currently I have clisp shipped with cygwin. Sorry I don't know how to check its version. You say that one day when they update clisp I might have a problem with the new paths convention? What's my plan of actions then, download and cygwin32-mount.el and call (require 'cygwin32-mount)? Will I be able to find cygwin32-mount.el some day in the near future?
Yes, it will stay there at my site forever.
Note: That this is a hacked version of the official cygwin32-mount.el, and it needs some documentation and better integration. I probably have to rename it, not to clash with the existing version. mine does also the reverse mapping and fixed a lot of bugs with the old one. the old one didn't understand the output of latest cygwin mount.exe command.
I will do that when I'll start hacking on clisp again. (1-2 months)
Reini Urban wrote:
Andrei Stebakov schrieb:
Hi,
I have xemacs and clisp that came with the cygwin distribution. I just downloaded slime-1.0 and put the following in my custom.el file:
(add-to-list 'load-path "C:\Linux\slime-1.0\") (add-hook 'lisp-mode-hook (lambda () (slime-mode t))) (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t))) (setq inferior-lisp-program "clisp -K full") (require 'slime) (slime-setup)
Now, when I load slime (via M-x slime) I got: [1]> *** - PARSE-NAMESTRING: syntax error in filename "c:\Linux\slime-1.0\swank-loader.lisp" at position 2 Break 1 [2]> *** - READ from #<IO TERMINAL-STREAM>: there is no package with name "SWANK" Break 2 [3]> "C:\DOCUME~1\stebakov\LOCALS~1\Temp\slime.2036" Break 2 [3]> Could anyone give me some info what I can do to fix it?
I am also facing a similar problem. I first tried to use a native version of Xemacs with clisp distributed by cygwin, but I ran into the above trouble..
So, I decided to download and install clisp separately from the cygwin distribution and then I changed the inferior lisp program to the new clisp program. But I am still getting the old error.
Any suggestions on what should I do to ensure that slime and inferior lisp connects to the right clisp and starts up properly.
Thanks.
Am Thu, 23 Dec 2004 04:12:13 -0700 schrieb Surendra Singhi efuzzyone@netscape.net:
Any suggestions on what should I do to ensure that slime and inferior lisp connects to the right clisp and starts up properly.
FWIW here's my working configuration:
--- init.el -------------------------------------------------- (add-to-list 'load-path "~/Eigene Dateien/devel/lisp/slime") (require 'slime) (add-hook 'lisp-mode-hook (lambda () (slime-mode t))) (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))
[...]
(defun clisp-start () (interactive) (shell-command (concat "C:\Programme\clisp\clisp-2.33.1\base\lisp.exe " "-B "C:/Programme/clisp/clisp-2.33.1/" " "-M "C:/Programme/clisp/clisp-2.33.1/base/lispinit.mem" " "-i "C:/Dokumente und Einstellungen/Tommy/slime.lisp" " "-ansi -q&")) (sleep-for 1) (slime-connect "localhost" 4005) (cd "~/Eigene Dateien/"))
--- slime.lisp ----------------------------------------------- (load "C:/Dokumente und Einstellungen/Tommy/Eigene Dateien/devel/lisp/slime/swank-loader.lisp") (swank:create-server)
That is I start up the swank-server independently and later connect to it. The (sleep-for 1) construct is a bit ugly since it may take longer than 1 second to start up swank in which case you have to manually call M-x slime-connect some seconds later.
HTH
-ts