From: ···@uol.com.br
Subject: newbie question: back history on the CMUCL listener
Date: 
Message-ID: <a0on7i$m42ok$1@ID-78052.news.dfncis.de>
Hello-

	Forgive my ignorance: simple question: in CMUCL I would like to know
what the keystroke for the back history is (in CLISP it's the up arrow) so that
I don't have to type the whole line again.
	Thank you for your benevolent patience and may grace fall upon your heads :-)

	HL

From: Raymond Toy
Subject: Re: newbie question: back history on the CMUCL listener
Date: 
Message-ID: <3C2FE49F.1060406@telocity.com>
···@uol.com.br wrote:

> 
> Hello-
> 
> 	Forgive my ignorance: simple question: in CMUCL I would like to know
> what the keystroke for the back history is (in CLISP it's the up arrow) so that
> I don't have to type the whole line again.

CMUCL doesn't have such a feature, so there's no keystroke to do what 
Clisp does.

I always run CMUCL with XEmacs and ilisp.

Ray
From: Dr. Edmund Weitz
Subject: Re: newbie question: back history on the CMUCL listener
Date: 
Message-ID: <m31yhb5065.fsf@bird.agharta.de>
···@uol.com.br writes:

> Hello-
> 
> 	Forgive my ignorance: simple question: in CMUCL I would like
> to know what the keystroke for the back history is (in CLISP it's
> the up arrow) so that I don't have to type the whole line again.
> Thank you for your benevolent patience and may grace fall upon your
> heads :-)
> 
> 	HL

There is no such thing. Most Lisp programmers prefer to use an IDE
that's based either on Emacs or on an Emacs-like editor (as with
vendor-supplied IDEs like the one from Xanalys). With CMUCL and many
other Lisp implementations you start your Lisp environment from
within Emacs and use ILISP for command history and other things. See
<http://sourceforge.net/projects/ilisp> for details.

Edi.
From: ········@acm.org
Subject: Re: newbie question: back history on the CMUCL listener
Date: 
Message-ID: <0q2Y7.2455$A67.951884@news20.bellglobal.com>
···@uol.com.br writes:
> 	Forgive my ignorance: simple question: in CMUCL I would like to know
> what the keystroke for the back history is (in CLISP it's the up arrow) so that
> I don't have to type the whole line again.
> 	Thank you for your benevolent patience and may grace fall upon your heads :-)

This isn't available as a built-in thing, but someone has implemented
such a thing as an "extension."

See:
<http://emu.res.cmu.edu/~mrd/line-reader/>
-- 
(reverse (concatenate 'string ····················@" "454aa"))
http://www.ntlug.org/~cbbrowne/spiritual.html
Roses are red
Violets are blue
Some poems rhyme
But this one doesn't. 
From: Thomas A. Russ
Subject: Re: newbie question: back history on the CMUCL listener
Date: 
Message-ID: <ymi1yh8ny0c.fsf@sevak.isi.edu>
········@acm.org writes:

> ···@uol.com.br writes:
> > 	Forgive my ignorance: simple question: in CMUCL I would like to
> >know what the keystroke for the back history is (in CLISP it's the up
> >arrow) so that I don't have to type the whole line again.  Thank you
> >for your benevolent patience and may grace fall upon your heads :-)
> 
> This isn't available as a built-in thing, but someone has implemented
> such a thing as an "extension."

Well, it may not be as flexible, but there is, in fact, a built-in thing
in Common Lisp:

  + ++ +++

are bound to the last, next-to last and input before that in the
listener.

This doesn't give you the full flexibility of history-based interfaces,
but at least it can sometimes save you some typing.


-- 
Thomas A. Russ,  USC/Information Sciences Institute          ···@isi.edu    
From: Thomas F. Burdick
Subject: Re: newbie question: back history on the CMUCL listener
Date: 
Message-ID: <xcvn0zwb25c.fsf@conquest.OCF.Berkeley.EDU>
···@sevak.isi.edu (Thomas A. Russ) writes:

> ········@acm.org writes:
> 
> > ···@uol.com.br writes:
> > > 	Forgive my ignorance: simple question: in CMUCL I would like to
> > >know what the keystroke for the back history is (in CLISP it's the up
> > >arrow) so that I don't have to type the whole line again.  Thank you
> > >for your benevolent patience and may grace fall upon your heads :-)
> > 
> > This isn't available as a built-in thing, but someone has implemented
> > such a thing as an "extension."
> 
> Well, it may not be as flexible, but there is, in fact, a built-in thing
> in Common Lisp:
> 
>   + ++ +++
> 
> are bound to the last, next-to last and input before that in the
> listener.

Huh.  I use + all the time for situations like:

  * (with-my-buggy-macro (foo (bar))
      (baz))
  ;; something unexpected here
  * (macroexpand +)

But I don't think I've ever done (eval +).  Not that it wouldn't work.

> This doesn't give you the full flexibility of history-based interfaces,
> but at least it can sometimes save you some typing.

Sure it does, it just takes a little more typing/counting :)

  * (loop for i from 1 to 10 do (format nil ··@R~%" i))
  nil
  * (setf (second (nth 8 +)) t)
  t
  * ++
  (loop for i from 1 to 10 do (format t ··@R~%" i))
  * (eval *)
  I
  II
  III
  IV
  V
  VI
  VII
  VIII
  IX
  X
  nil

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Erik Naggum
Subject: Re: newbie question: back history on the CMUCL listener
Date: 
Message-ID: <3219064485998418@naggum.net>
* ···@conquest.OCF.Berkeley.EDU (Thomas F. Burdick)
| Sure it does, it just takes a little more typing/counting :)
| 
|   * (loop for i from 1 to 10 do (format nil ··@R~%" i))
|   nil
|   * (setf (second (nth 8 +)) t)
|   t
|   * ++
|   (loop for i from 1 to 10 do (format t ··@R~%" i))
|   * (eval *)
  
  I was about to suggest (eval (subst t nil +)), until it dawned on me that
  subst works on trees.  But any other substitution, and it should work.  :)

///
-- 
From: Kent M Pitman
Subject: Re: newbie question: back history on the CMUCL listener
Date: 
Message-ID: <sfw8zbfpdpg.fsf@shell01.TheWorld.com>
Erik Naggum <····@naggum.net> writes:

> * ···@conquest.OCF.Berkeley.EDU (Thomas F. Burdick)
> | Sure it does, it just takes a little more typing/counting :)
> | 
> |   * (loop for i from 1 to 10 do (format nil ··@R~%" i))
> |   nil
> |   * (setf (second (nth 8 +)) t)
> |   t
> |   * ++
> |   (loop for i from 1 to 10 do (format t ··@R~%" i))
> |   * (eval *)
>   
>   I was about to suggest (eval (subst t nil +)), until it dawned on me that
>   subst works on trees.  But any other substitution, and it should work.  :)

or #.(subst t nil +)

Though I vaguely recall some "non-portability" (heh) in that some 
implementations may bind +/*/etc. only around the EVAL of the REPL and 
others may do it around the READ.  ... Anyway #. and #.` are often very
handy in conjunction with +/*, etc.

In a debugger loop, if the EVAL will occur in a given stack context, an
explicit EVAL may not, so #. may be not only fun but necessary there.
From: Thomas F. Burdick
Subject: Re: newbie question: back history on the CMUCL listener
Date: 
Message-ID: <xcv666jb6mp.fsf@conquest.OCF.Berkeley.EDU>
Kent M Pitman <······@world.std.com> writes:

> Erik Naggum <····@naggum.net> writes:
> 
> > * ···@conquest.OCF.Berkeley.EDU (Thomas F. Burdick)
> > | Sure it does, it just takes a little more typing/counting :)
> > | 
> > |   * (loop for i from 1 to 10 do (format nil ··@R~%" i))
> > |   nil
> > |   * (setf (second (nth 8 +)) t)
> > |   t
> > |   * ++
> > |   (loop for i from 1 to 10 do (format t ··@R~%" i))
> > |   * (eval *)
> >   
> >   I was about to suggest (eval (subst t nil +)), until it dawned on me that
> >   subst works on trees.  But any other substitution, and it should work.  :)
>
> or #.(subst t nil +)

Heh, I think you missed Erik's point.

  * (loop for i from 1 to 10 do (format nil ··@R~%" i))
  nil
  * (subst t nil +)
  (loop for i from 1 to 10 do (format t ··@R~%" i . t) . t)

Oops, that's not very much like a CL expression.

> Though I vaguely recall some "non-portability" (heh) in that some 
> implementations may bind +/*/etc. only around the EVAL of the REPL and 
> others may do it around the READ.  ... Anyway #. and #.` are often very
> handy in conjunction with +/*, etc.
> 
> In a debugger loop, if the EVAL will occur in a given stack context, an
> explicit EVAL may not, so #. may be not only fun but necessary there.

Huh.  In that case, I'd probably do something more like '#.(subst ...)
then #.*, because I always like to see whatever it is I'm about to
evaluate.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Martin Cracauer
Subject: Re: newbie question: back history on the CMUCL listener
Date: 
Message-ID: <a0qa3o$2l1g$1@counter.bik-gmbh.de>
···@uol.com.br writes:

>Hello-

>	Forgive my ignorance: simple question: in CMUCL I would like to know
>what the keystroke for the back history is (in CLISP it's the up arrow) so that
>I don't have to type the whole line again.
>	Thank you for your benevolent patience and may grace fall upon your heads :-)

Besides the menioned ilisp, you can also turn any program into a
readline program by running it in emacs M-x shell-mode.

Also, CMUCl has its own emacs-like editor, Hemlock which is kinda
CMUCl's answer to Clisp readline integration :-)

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <········@bik-gmbh.de> http://www.bik-gmbh.de/~cracauer/
FreeBSD - where you want to go. Today. http://www.freebsd.org/