From: Bill Clementson
Subject: Problem using step in emacs with clisp
Date: 
Message-ID: <wk7kqf4ct2.fsf@attbi.com>
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: Roland Kaufmann
Subject: Re: Problem using step in emacs with clisp
Date: 
Message-ID: <tl2advbv144.fsf@space.at>
Try to use
  Step
instead of
  :s
it works on my (rather old CLISPs) under Emacs 20.3 on 
Solaris (CLISP 1997-12-06)
and Windows NT (CLISP 1999-07-22).
HTH

                                    Roland Kaufmann
From: Bill Clementson
Subject: Re: Problem using step in emacs with clisp
Date: 
Message-ID: <wk3d134bkx.fsf@attbi.com>
Roland Kaufmann <···············@space.at> writes:

> Try to use
>   Step
> instead of
>   :s
> it works on my (rather old CLISPs) under Emacs 20.3 on 
> Solaris (CLISP 1997-12-06)
> and Windows NT (CLISP 1999-07-22).

Thanks for the suggestion; however, I had already tried that and it doesn't
work either.
-- 
Bill Clementson
From: Kristoffer Kvello
Subject: Re: Problem using step in emacs with clisp
Date: 
Message-ID: <3c494bc3.1009630221@news.online.no>
On Fri, 18 Jan 2002 20:33:35 GMT, Bill Clementson <·······@attbi.com>
wrote:

>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)?

Try to do in the *inferior-lisp* buffer:

M-x set-buffer-process-coding-system <ret> iso-8859-1-unix <ret>
iso-88591-unix <ret>

and then do Step (instead of :s).  That works for me (I'm using gnu
emacs 20.7.1, ordinary inferior-lisp-mode and not ilisp, though).
From: Bill Clementson
Subject: Re: Problem using step in emacs with clisp
Date: 
Message-ID: <wkpu46gcfj.fsf@attbi.com>
·······@my1to1.com (Kristoffer Kvello) writes:

> On Fri, 18 Jan 2002 20:33:35 GMT, Bill Clementson <·······@attbi.com>
> wrote:
> 
> >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)?
> 
> Try to do in the *inferior-lisp* buffer:
> 
> M-x set-buffer-process-coding-system <ret> iso-8859-1-unix <ret>
> iso-88591-unix <ret>
> 
> and then do Step (instead of :s).  That works for me (I'm using gnu
> emacs 20.7.1, ordinary inferior-lisp-mode and not ilisp, though).
> 
> 
> 

I sent my query to the clisp mailing list also & received the following reply
from Sam Steingold:

> 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)

I did what he suggested and it fixed the problem. Thanks for your suggestions
too.

-- 
Bill Clementson