If I enter (from an italian keyboard) a "small 'a' with grave accent"
#\à
I get
#\LATIN_CAPITAL_LETTER_A_WITH_TILDE
which is obviously wrong. I put the following lines in my emacs:
(setq inferior-lisp-program "c:/home/bin/clisp/full/lisp.exe -B c:/home/bin/clisp/full -M c:/home/bin/clisp/full/lispinit.mem -E utf-8 -q"); my Lisp system ... (setq slime-net-coding-system 'utf-8-unix) ; sets the coding system of communications between SLIME and Lisp (setq locale-coding-system 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (set-selection-coding-system 'utf-8) (set-default-coding-systems 'utf-8) (prefer-coding-system 'utf-8) (set-language-environment "UTF-8") (swank:create-server :coding-system "utf-8-unix")
but the problem is still there.
Thanks for any help u can give me.
Mario
Emacs 23.2.1, Clisp, Windows 7
On Tue, 15 Mar 2011 02:50:52 +0100 mv968 mv968@tiscalinet.it wrote:
If I enter (from an italian keyboard) a "small 'a' with grave accent"
#\à
I get
#\LATIN_CAPITAL_LETTER_A_WITH_TILDE
It's likely that this is an issue with clisp's unicode tables; an easy way to confirm is to start clisp's REPL directly at a shell and do the same.
It's not a Clisp issue. When i enter
#\à
in Clisp REPL, it returns the right code point (altough it displays a placeholder -dot- when I type the 'à').
Il 15/03/2011 05:09, Matthew Mondor ha scritto:
On Tue, 15 Mar 2011 02:50:52 +0100 mv968mv968@tiscalinet.it wrote:
If I enter (from an italian keyboard) a "small 'a' with grave accent"
#\à
I get
#\LATIN_CAPITAL_LETTER_A_WITH_TILDE
It's likely that this is an issue with clisp's unicode tables; an easy way to confirm is to start clisp's REPL directly at a shell and do the same.
* mv968 [2011-03-15 01:50] writes:
If I enter (from an italian keyboard) a "small 'a' with grave accent"
#\à
I get
#\LATIN_CAPITAL_LETTER_A_WITH_TILDE
which is obviously wrong. I put the following lines in my emacs:
(setq inferior-lisp-program "c:/home/bin/clisp/full/lisp.exe -B c:/home/bin/clisp/full -M c:/home/bin/clisp/full/lispinit.mem -E utf-8 -q"); my Lisp system ...
What do you get for (stream-external-format *standard-input*)?
Helmut
* mv968 [2011-03-15 09:55] writes:
From
(stream-external-format *standard-input*)
I get
:DEFAULT
Hmm, for me that looks like #<ENCODING CHARSET:CP1252 :DOS> which would explain the problems. After
(setf (stream-external-format *standard-input*) (ext:make-encoding :charset "utf-8"))
the problem goes away.
Helmut
I saw somewhere that 'CHARSET:CP1252', and I too suspect that this is the problem, but your solution gives me an error
SYSTEM::SET-STREAM-EXTERNAL-FORMAT on #1=#<SWANK-BACKEND::SLIME-INPUT-STREAM #x19F7D29D> is illegal [Condition of type SYSTEM::SIMPLE-STREAM-ERROR]
maybe there is a typo?
Moreover, do you know any good SLIME tutorial for a Lisp-SLIME almost-newbie? The online SLIME User Manual is not enough self-explanatory for my level of knowledge.
Thanks
Il 15/03/2011 12:07, Helmut Eller ha scritto:
- mv968 [2011-03-15 09:55] writes:
From
(stream-external-format *standard-input*)
I get
:DEFAULT
Hmm, for me that looks like #<ENCODING CHARSET:CP1252 :DOS> which would explain the problems. After
(setf (stream-external-format *standard-input*) (ext:make-encoding :charset "utf-8"))
the problem goes away.
Helmut
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel
* mv968 [2011-03-15 11:30] writes:
I saw somewhere that 'CHARSET:CP1252', and I too suspect that this is the problem, but your solution gives me an error
SYSTEM::SET-STREAM-EXTERNAL-FORMAT on #1=#<SWANK-BACKEND::SLIME-INPUT-STREAM #x19F7D29D> is illegal [Condition of type SYSTEM::SIMPLE-STREAM-ERROR]
maybe there is a typo?
I not sure. How exactly do you connect to the Lisp process? With M-x slime-connect? And in which buffer to you enter the #\à?
Moreover, do you know any good SLIME tutorial for a Lisp-SLIME almost-newbie? The online SLIME User Manual is not enough self-explanatory for my level of knowledge.
There are some links on the Slime webpage. In particular the screencast: http://common-lisp.net/project/movies/movies/slime.mov
But first I would suggest to switch away from CLisp to CCL. CLisp is ok for a lot of things, but it doesn't work well with Slime.
Helmut
I connect with
M-x slime
and I enter #\à in *inferior-lisp* buffer. I also have the following lines in my emacs (don't know exactly what they are for):
(require 'slime-autoloads) (slime-setup '(slime-scratch slime-editing-commands)) (slime-setup '(slime-repl)) (slime-setup '(slime-fancy)) (slime-setup '(slime-autodoc))
Since I'd like to use Lisp for technical software, do you think that CMUCL might be better suited than CCL ?
Thanks again.
Mario
Il 15/03/2011 13:02, Helmut Eller ha scritto:
- mv968 [2011-03-15 11:30] writes:
I saw somewhere that 'CHARSET:CP1252', and I too suspect that this is the problem, but your solution gives me an error
SYSTEM::SET-STREAM-EXTERNAL-FORMAT on #1=#<SWANK-BACKEND::SLIME-INPUT-STREAM #x19F7D29D> is illegal [Condition of type SYSTEM::SIMPLE-STREAM-ERROR]
maybe there is a typo?
I not sure. How exactly do you connect to the Lisp process? With M-x slime-connect? And in which buffer to you enter the #\à?
Moreover, do you know any good SLIME tutorial for a Lisp-SLIME almost-newbie? The online SLIME User Manual is not enough self-explanatory for my level of knowledge.
There are some links on the Slime webpage. In particular the screencast: http://common-lisp.net/project/movies/movies/slime.mov
But first I would suggest to switch away from CLisp to CCL. CLisp is ok for a lot of things, but it doesn't work well with Slime.
Helmut
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel
* mv968 [2011-03-15 14:36] writes:
I connect with
M-x slime
and I enter #\à in *inferior-lisp* buffer. I also have the following lines in my emacs (don't know exactly what they are for):
Hmm, this is a bit awkward to fix. We need to set the encoding before Slime starts. It should work to add
(setf (stream-external-format *standard-input*) (ext:make-encoding :charset "utf-8"))
to the file ~/.swank.lisp. I'm not sure where ~/.swank.lisp ends up on Windows but you can find it out by calling (user-homedir-pathname) in CLisp.
(require 'slime-autoloads) (slime-setup '(slime-scratch slime-editing-commands)) (slime-setup '(slime-repl)) (slime-setup '(slime-fancy)) (slime-setup '(slime-autodoc))
slime-setup overwrites the previous call so you should call it only once with a longer list: (slime-setup '(slime-scratch slime-editing-commands slime-repl ...))
Since I'd like to use Lisp for technical software, do you think that CMUCL might be better suited than CCL ?
CMUCL doesn't work on Windows, so it's probably not an option.
Helmut
It worked, thank you very much. Nevertheless, it was quite problematic solving such a basic issue. I also tried CCL changing my emacs to
(set-language-environment "utf-8") (setq inferior-lisp-program "c:/home/bin/ccl/wx86cl64 -K utf-8") (require 'slime) (setq slime-net-coding-system 'utf-8-unix) (slime-setup '(slime-fancy))
but, without your last hack, I had the same #\à - CP1252 issue.
Also I see something strange in SLIME startup messages with CCL, that make me suspect that SLIME is still using CLISP instead of CCL:
... ;; Loading file C:\home\me.slime\fasl\2010-12-10\clisp-2.49-win32-pc386\swank-clisp.fas ... WARNING: DEFUN/DEFMACRO: redefining function BREAK in
C:\home\me.slime\fasl\2010-12-10\clisp-2.49-win32-pc386\swank-clisp.fas, was defined in G:\gnu\home\src\clisp\clisp-2.49\build-full\condition.fas WARNING: Replacing method #<STANDARD-METHOD (#<BUILT-IN-CLASS T>)> in #<STANDARD-GENERIC-FUNCTION EMACS-INSPECT> ;; Loaded file C:\home\me.slime\fasl\2010-12-10\clisp-2.49-win32-pc386\swank-clisp.fas ...
Thanks again.
Mario
Il 16/03/2011 07:53, Helmut Eller ha scritto:
Hmm, this is a bit awkward to fix. We need to set the encoding before Slime starts. It should work to add
(setf (stream-external-format *standard-input*) (ext:make-encoding :charset "utf-8"))
to the file ~/.swank.lisp.
Helmut
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel
mv968 mv968@tiscalinet.it writes:
Also I see something strange in SLIME startup messages with CCL, that make me suspect that SLIME is still using CLISP instead of CCL:
... ;; Loading file C:\home\me.slime\fasl\2010-12-10\clisp-2.49-win32-pc386\swank-clisp.fas ...
Yes, definitely :-)
Therefore setting the variable inferior-lisp-program as in
(setq inferior-lisp-program "c:/home/bin/ccl/wx86cl64 -K utf-8")
is not enough to change Lisp implementation? The more I spend time with Emacs-SLIME the more I'm confused...
Il 16/03/2011 12:02, Pascal J. Bourguignon ha scritto:
mv968mv968@tiscalinet.it writes:
Also I see something strange in SLIME startup messages with CCL, that make me suspect that SLIME is still using CLISP instead of CCL:
... ;; Loading file C:\home\me.slime\fasl\2010-12-10\clisp-2.49-win32-pc386\swank-clisp.fas ...
Yes, definitely :-)
Therefore setting the variable inferior-lisp-program as in
(setq inferior-lisp-program "c:/home/bin/ccl/wx86cl64 -K utf-8")
is not enough to change Lisp implementation?
for an example setup, see slime-lisp-implementations e.g. here:
http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20hu.dwim.environment;a=headblob...
hint: in my experience it's more effective to search for this string in the slime sources and to run through the code/comments around the matches...
The more I spend time with Emacs-SLIME the more I'm confused...
well, slime's defaults are not exactly newbie friendly... you need to climb that fence (i oppose that, but i don't have the influence to change it).