Subject: [clisp-list] Problem using step in emacs with clisp

From: "Bill Clementson" <[email-masked]>
Date: Fri Jan 18 14:00:04 2002

Does anyone know why the debugging command "step" would work fine when clisp is
started from a command line but not from within an emacs shell or from within a 
lisp  buffer in emacs (using ilisp)?

For example, here is a session captured from a dos command line session:

[1]> (defun tst () (setq x 1) (+ x 2))
TST
[2]> (step (tst))
step 1 --> (TST)
Step 1 [3]> :s
step 2 --> (PROGN (SETQ X 1) (+ X 2))
Step 2 [4]> :s
step 3 --> (SETQ X 1)
Step 3 [5]> :s
step 4 --> 1
Step 4 [6]> :s

step 4 ==> value: 1
step 3 ==> value: 1
step 3 --> (+ X 2)
Step 3 [7]> :s
step 4 --> X
Step 4 [8]> :s

step 4 ==> value: 1
step 4 --> 2
Step 4 [9]> :s

step 4 ==> value: 2
step 3 ==> value: 3
step 2 ==> value: 3
step 1 ==> value: 3
3

Here is the same session run from within an ilisp lisp buffer:

[1]> 
[2]> (defun tst () (setq x 1) (+ x 2))
TST
[9]> (step (tst))
step 1 --> (TST)
Step 1 [10]> :s
:S
Step 1 [10]> :s
:S
Step 1 [10]> :s
:S
Step 1 [10]> 

As you can see, the step command (:s) is not being recognized when I'm in the
emacs lisp buffer but it is recognized when I run clisp from a regular command
line. 

I am using emacs 21.1 on Windows2000 with the cvs version of ilisp and clisp
2.27. This doesn't seem to be an ilisp issue (it seems to be an emacs issue) as
I get the same results if I start clisp in an emacs shell buffer. It doesn't
matter whether I use the standard Windows shell or if I use the bash shell from
cygwin as my shell within emacs, neither let me "step" from within emacs. 

Anybody have any ideas as to what I'm doing wrong or whether this might be an
emacs issue? 

-- 
Bill Clementson

---

From: Sam Steingold <[email-masked]>
Date: Fri Jan 18 20:02:03 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Problem using step in emacs with clisp"
> * Sent on Fri, 18 Jan 2002 15:02:03 -0700
> * Honorable "Bill Clementson" <[email-masked]> writes:
>
> I am using emacs 21.1 on Windows2000 with the cvs version of ilisp and
> clisp 2.27.

the clisp interaction buffer is in "dos" mode, so lines are terminated
with CR/LF instead of the plain LF.  this affects only "commands", not
the usual lisp forms.

This should be fixed in the CVS CLISP.

You can put the code from CLISP/emacsc/clisp-coding.el into your ~/.emacs:

;; For CLISP in `inferior-lisp-mode' under win32
(modify-coding-system-alist 'process "lisp" 'unix)

-- 
Sam Steingold (http://www.podval.org/~sds)
Keep Jerusalem united! <http://www.onejerusalem.org/Petition.asp>
Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/>
We're too busy mopping the floor to turn off the faucet.

---

From: "Bill Clementson" <[email-masked]>
Date: Sat Jan 19 15:16:01 2002

That fixed it - thanks a lot!!