From: Mike Speed
Subject: CLISP [1]>        ?
Date: 
Message-ID: <1138980458.357612.139530@z14g2000cwz.googlegroups.com>
I installed CLISP and I get the above for a prompt when I run the
executable (clisp.exe).  What did I do wrong?

From: Pascal Bourguignon
Subject: Re: CLISP [1]>        ?
Date: 
Message-ID: <87k6ccbeo9.fsf@thalassa.informatimago.com>
"Mike Speed" <·······@yahoo.com> writes:

> I installed CLISP and I get the above for a prompt when I run the
> executable (clisp.exe).  What did I do wrong?

What did you expect?

Type: (+ 1 2) RET
What does it do?

Type: (defun f (x) (format t "~2%Hello ~A~2%" x)) RET
      (f "Master") RET
What does it do?


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

The world will now reboot.  don't bother saving your artefacts.
From: Mike Speed
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <1139013928.915614.145060@f14g2000cwb.googlegroups.com>
>> I installed CLISP and I get the above for a prompt when I run the
>> executable (clisp.exe).  What did I do wrong?

>What did you expect?

I expected '> ' for a prompt, not [1]> .

>Type: (+ 1 2) RET
>What does it do?

It's fine.

>Type: (defun f (x) (format t "~2%Hello ~A~2%" x)) RET
>      (f "Master") RET
>What does it do?

It's fine.

'[1]> ' reminds me of a debugging prompt.
From: Pascal Bourguignon
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <87psm39a0r.fsf@thalassa.informatimago.com>
"Mike Speed" <·······@yahoo.com> writes:

>>> I installed CLISP and I get the above for a prompt when I run the
>>> executable (clisp.exe).  What did I do wrong?
>
>>What did you expect?
>
> I expected '> ' for a prompt, not [1]> .

You can customize the prompt.  Try:

(apropos :prompt :custom) 

; and then go read the implementation notes (which I haven't done >:-})
; or keep guessing:
(list CUSTOM:*PROMPT-BODY* CUSTOM:*PROMPT-BREAK* 
      CUSTOM:*PROMPT-FINISH* CUSTOM:*PROMPT-START* CUSTOM:*PROMPT-STEP*)

(setf custom:*prompt-body* (lambda () ""))  ; should give what you want.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

HEALTH WARNING: Care should be taken when lifting this product,
since its mass, and thus its weight, is dependent on its velocity
relative to the user.
From: Mike Speed
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <1139033560.387081.198160@g43g2000cwa.googlegroups.com>
>> I expected '> ' for a prompt, not [1]> .

>You can customize the prompt.  Try:

>(apropos :prompt :custom)

>; and then go read the implementation notes (which I haven't done >:-})
>; or keep guessing:
>(list CUSTOM:*PROMPT-BODY* CUSTOM:*PROMPT-BREAK*
>      CUSTOM:*PROMPT-FINISH* CUSTOM:*PROMPT-START* >CUSTOM:*PROMPT-STEP*)

>(setf custom:*prompt-body* (lambda () ""))  ; should give what you want.

Okay, but right now I get:

[1]> (+ 1 2 3 4 5)
15
[2]> (defun foo (x)
         (+ x 9))
FOO
[3]> (foo 7)
16
[4]>

Does that look like a debugging prompt?  I don't know.  I'll try what
you sent.  Thanks.
From: Mike Speed
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <1139064877.778703.131130@f14g2000cwb.googlegroups.com>
>You can customize the prompt.  Try:
.
.
.
>(setf custom:*prompt-body* (lambda () ""))  ; should give what you want.

Yes:

[1]> (apropos :prompt :custom)
*PROMPT-BODY*                              variable
*PROMPT-BREAK*                             variable
*PROMPT-FINISH*                            variable
*PROMPT-START*                             variable
*PROMPT-STEP*                              variable

[2]> (list *PROMPT-BODY* *PROMPT-BREAK* *PROMPT-FINISH* *PROMPT-START*
*PROMPT-STEP*)
(#<COMPILED-FUNCTION #:|66 78 (DEFVAR *PROMPT-BODY* (LAMBDA
NIL#)...)-19-1|>
 #<COMPILED-FUNCTION #:|61 63 (DEFVAR *PROMPT-BREAK* (LAMBDA NIL #)
...)-17-1|>
 "> " ""
 #<COMPILED-FUNCTION
   #:|616 618 (DEFVAR *PROMPT-STEP* (LAMBDA NIL #) ...)-82-1|>)
[3]> (setf custom:*PROMPT-BODY* (lambda () ""))
#<FUNCTION :LAMBDA NIL "">
>

In the implementation notes:

" 30.9. The Prompt

CLISP prompt consists of 3 mandatory parts: "start", "body",
and "finish"; and 2 optional parts: "break", which appears only
during debugging (after BREAK or ERROR), and "step", which appears
only during STEPping. Each part is controlled by a custom variable,
which can be either a STRING or a FUNCTION of no arguments returning a
STRING (if it is something else - or if the return value was not a
STRING - it is printed with PRINC). In the order of invocation:

CUSTOM:*PROMPT-START*
    Defaults to an empty string.
CUSTOM:*PROMPT-STEP*
    Used only during STEPping. Defaults to "Step n ", where n is
the stepping level as returned by EXT:STEP-LEVEL.
CUSTOM:*PROMPT-BREAK*
    Used only inside break loop (during debugging). Defaults to
"Break n ", where n is the break level as returned by
EXT:BREAK-LEVEL.
CUSTOM:*PROMPT-BODY*
    Defaults to "package[n]" where package is the shortest
(nick)name (as returned by EXT:PACKAGE-SHORTEST-NAME) of the current
package *PACKAGE* if it is not the same as it was in the beginning
(determined by EXT:PROMPT-NEW-PACKAGE) or if it does not contain symbol
T, (it is assumed that in the latter case you would want to keep in
mind that your current package is something weird); and n is the index
of the current prompt, kept in EXT:*COMMAND-INDEX*;
CUSTOM:*PROMPT-FINISH*
    Defaults to "> ".                    "

Something is wrong, but I don't know what.  It's says in the above, the
prompt should be "> " .  And:

> (list *package*)
(#<PACKAGE COMMON-LISP-USER>)

WTH?
From: Matt
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <YF3Ff.5849$Nv2.2272@newsread1.news.atl.earthlink.net>
Mike Speed wrote:
> ...
> Something is wrong, but I don't know what.  It's says in the above, the
> prompt should be "> " .  And:
> 
>> (list *package*)
> (#<PACKAGE COMMON-LISP-USER>)
> 
> WTH?

Here, put this in your .clisprc and quit your moanin' (just kidding)


(setf *prompt-body*
   (lambda ()
     ;; prompt with *package* when it is different from the initial one
     ;; or when it doesn't contain standard LISP symbols, like T.
     (if (and (packagep *package*) (package-name *package*))
         (format nil ··@[~a~]"
                 (if (or (not (find-symbol "T" *package*))
                         (prompt-new-package))
                     ;; use symbol so that ~A will respect *PRINT-CASE*
                     (make-symbol (package-shortest-name *package*))))
         (TEXT "[*package* invalid]"))))


I copied this from clisp-2.38/src/reploop.lisp and modified it.

Clisp has always had that numbered prompt.  At least for the last
five years or something.

Matt
From: Joerg Hoehle
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <u64nrovje.fsf@users.sourceforge.net>
"Mike Speed" <·······@yahoo.com> writes:

> Something is wrong, but I don't know what.  It's says in the above, the
> prompt should be "> " .  And:
You didn't read closely enough what you posted:

> CUSTOM:*PROMPT-BODY*
>     Defaults to "package[n]" where ... and n is the index
> of the current prompt, kept in EXT:*COMMAND-INDEX*;


> > (list *package*)
> (#<PACKAGE COMMON-LISP-USER>)
Again, read:
> (nick)name of the current
> package *PACKAGE* if it is not the same as it was in the beginning
Therefore, COMMON-LISP-USER will not appear.

It's fully documented.  That is rare for software! Thanks to Sam
Steingold for being very precise about documentation.

Is anything left open still?
	Jorg Hohle
Telekom/T-Systems Technology Center
From: Pascal Bourguignon
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <878xsr7hsd.fsf@thalassa.informatimago.com>
"Mike Speed" <·······@yahoo.com> writes:

>>> I expected '> ' for a prompt, not [1]> .
>
>>You can customize the prompt.  Try:
>
>>(apropos :prompt :custom)
>
>>; and then go read the implementation notes (which I haven't done >:-})
>>; or keep guessing:
>>(list CUSTOM:*PROMPT-BODY* CUSTOM:*PROMPT-BREAK*
>>      CUSTOM:*PROMPT-FINISH* CUSTOM:*PROMPT-START* >CUSTOM:*PROMPT-STEP*)
>
>>(setf custom:*prompt-body* (lambda () ""))  ; should give what you want.
>
> Okay, but right now I get:
>
> [1]> (+ 1 2 3 4 5)
> 15
> [2]> (defun foo (x)
>          (+ x 9))
> FOO
> [3]> (foo 7)
> 16
> [4]>
>
> Does that look like a debugging prompt?  

No.

> I don't know.  

Why don't you try this debugging prompt? Evaluate: (/ 1 0)


> I'll try what you sent.

All right.  Keep us posted.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

This is a signature virus.  Add me to your signature and help me to live.
From: Ulrich Hobelmann
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <44j8hlF2dallU3@individual.net>
Mike Speed wrote:
> '[1]> ' reminds me of a debugging prompt.

It looks similar to a csh prompt.  The number in [] is the command 
number.  Not sure if CLisp has a history feature (in csh you can say !14 
to re-execute command 14).

-- 
Suffering from Gates-induced brain leakage...
From: Matt
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <Gt0Ff.5797$Nv2.4586@newsread1.news.atl.earthlink.net>
Mike Speed wrote:
> 
> '[1]> ' reminds me of a debugging prompt.
> 

You think you got problems.  I installed 2.38 and every time I hit
the tab key, it prints this:

Help (abbreviated :h) = this list
Use the usual editing capabilities.
(quit) or (exit) leaves CLISP.

I tried pasting some code in there and this is what it turned into:

[1]> (defmacro defenum ((&key (prefix "") (suffix "") (start 0) (step 1))

Help (abbreviated :h) = this list
Use the usual editing capabilities.
(quit) or (exit) leaves CLISP.

Help (abbreviated :h) = this list
Use the usual editing capabilities.
(quit) or (exit) leaves CLISP.
        &rest identifiers)
       (let ((results nil)

Help (abbreviated :h) = this list
Use the usual editing capabilities.
(quit) or (exit) leaves CLISP.
     (index 0)

Help (abbreviated :h) = this list
Use the usual editing capabilities.
(quit) or (exit) leaves CLISP.
     (start (eval start))

Help (abbreviated :h) = this list
Use the usual editing capabilities.
(quit) or (exit) leaves CLISP.
     (step (eval step)))

Help (abbreviated :h) = this list
Use the usual editing capabilities.
(quit) or (exit) leaves CLISP.
(dolist (id identifiers)

etc., etc.

I don't know what I did.

Matt
From: Mike Speed
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <1139063590.477937.47190@f14g2000cwb.googlegroups.com>
>> '[1]> ' reminds me of a debugging prompt.

>You think you got problems.  I installed 2.38 and every time I hit
>the tab key, it prints this:

.......

Uh, oh.  I just went to 2.38.  Crap.
From: Pascal Bourguignon
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <87irrv9j3x.fsf@thalassa.informatimago.com>
Matt <·····@invalid.net> writes:

> Mike Speed wrote:
>> '[1]> ' reminds me of a debugging prompt.
>> 
>
> You think you got problems.  I installed 2.38 and every time I hit
> the tab key, it prints this:
>
> Help (abbreviated :h) = this list
> Use the usual editing capabilities.
> (quit) or (exit) leaves CLISP.
>
> I tried pasting some code in there and this is what it turned into:
> [...]
> I don't know what I did.

You pasted lines beginning with tabulations.  It's in the clisp FAQ, IIRC.

[···@thalassa pjb]$ /usr/local/bin/clisp -q -ansi
;; Loading file /home/pjb/.clisprc.lisp ...
0 errors, 0 warnings
[1]>                                   ; I typed here TAB
Help (abbreviated :h) = this list
Use the usual editing capabilities.
(quit) or (exit) leaves CLISP.
[1]> (ca                               ; I typed here TAB
caaaar       caaddr       cadadr       caddr        case         
caaadr       caadr        cadar        cadr         cat          
caaar        caar         caddar       call-method  catch        
caadar       cadaar       cadddr       car          


This TAB behaves like in the shell, to auto-complete or print a list
of completions.  Out of a s-expr, it just prints this little help
message.  When you're using clisp from a terminal, it's good behavior.

When you use clisp from emacs (ilisp, inferior-lisp, slime), these
features are implemented in emacs so you don't need them from clisp.
To have clisp behave sanely in this case, you give it the -I option.
You can also use it in the terminal if you insist on using TAB for
spaces.


Unless you're a hard code masochist, you should configure emacs to
insert spaces instead of tabulations, so you'd never copy tabulations
in the first place.  Put this in your ~/.emacs:

(setq indent-tabs-mode nil)
(setq tab-stop 4)
(setq tab-width 4)


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Remember, Information is not knowledge; Knowledge is not Wisdom;
Wisdom is not truth; Truth is not beauty; Beauty is not love;
Love is not music; Music is the best." -- Frank Zappa
From: Matt
Subject: Re: CLISP [1]> ?
Date: 
Message-ID: <Al5Ff.5902$Nv2.535@newsread1.news.atl.earthlink.net>
Pascal Bourguignon wrote:

> You pasted lines beginning with tabulations.  It's in the clisp FAQ, IIRC.
> 
> [···@thalassa pjb]$ /usr/local/bin/clisp -q -ansi
> ;; Loading file /home/pjb/.clisprc.lisp ...
> 0 errors, 0 warnings
> [1]>                                   ; I typed here TAB
> Help (abbreviated :h) = this list
> Use the usual editing capabilities.
> (quit) or (exit) leaves CLISP.
> [1]> (ca                               ; I typed here TAB
> caaaar       caaddr       cadadr       caddr        case         
> caaadr       caadr        cadar        cadr         cat          
> caaar        caar         caddar       call-method  catch        
> caadar       cadaar       cadddr       car          

Ah, ok.  I figured there was something tricky going on.  Windows has a
readline version and a normal version, and I thought I'd upgrade to the
readline for a little Emacsage editing action but I didn't realize it
had autocompletion.  Bonus!


> This TAB behaves like in the shell, to auto-complete or print a list
> of completions.  Out of a s-expr, it just prints this little help
> message.  When you're using clisp from a terminal, it's good behavior.

I don't know about that.  That message isn't very helpful, I hate
to break it to them.


> When you use clisp from emacs (ilisp, inferior-lisp, slime), these
> features are implemented in emacs so you don't need them from clisp.
> To have clisp behave sanely in this case, you give it the -I option.
> You can also use it in the terminal if you insist on using TAB for
> spaces.

Ah, I was wondering about that -I option.


> Unless you're a hard code masochist, you should configure emacs to
> insert spaces instead of tabulations, so you'd never copy tabulations
> in the first place.  Put this in your ~/.emacs:
> 
> (setq indent-tabs-mode nil)
> (setq tab-stop 4)
> (setq tab-width 4)

Yeah, I don't normally use tabs.  I copied that out of a post.

Matt
From: Ivan Boldyrev
Subject: Re: CLISP [1]>        ?
Date: 
Message-ID: <6jieb3-jic.ln1@ibhome.cgitftp.uiggm.nsc.ru>
On 9374 day of my life Mike Speed wrote:
> I installed CLISP and I get the above for a prompt when I run the
> executable (clisp.exe).  What did I do wrong?

You installed Windows version under Linux.  Don't do it anymore.
Properly installed CLISP will solve all your problem automatically.

-- 
Ivan Boldyrev

       Assembly of a Japanese bicycle requires greatest peace of spirit.