From: Mark Carter
Subject: Writing to the reader
Date: 
Message-ID: <43515633$0$41147$14726298@news.sunsite.dk>
Is it possible to write to the readline in, say, CLISP? Is such a thing 
possible> ... the logic being ...

suppose the user has typed in some data for a database application, for 
example. Later on, the user decides to edit the data, so lisp writes the 
old information to the readline, which the user edits, and presses 
return to confirm the changes.

I understand that readline retains a history of commands entered ... but 
suppose that the information should be considered "ancient history", and 
not readily accessable by the user.

From: justinhj
Subject: Re: Writing to the reader
Date: 
Message-ID: <1129428427.657847.326940@g44g2000cwa.googlegroups.com>
Mark Carter wrote:
> Is it possible to write to the readline in, say, CLISP? Is such a thing
> possible> ... the logic being ...
>
> suppose the user has typed in some data for a database application, for
> example. Later on, the user decides to edit the data, so lisp writes the
> old information to the readline, which the user edits, and presses
> return to confirm the changes.
>
> I understand that readline retains a history of commands entered ... but
> suppose that the information should be considered "ancient history", and
> not readily accessable by the user.

You could read the data into a string and process the string, keeping
it around for later.

Justin
From: Surendra Singhi
Subject: Re: Writing to the reader
Date: 
Message-ID: <7jcejefx.fsf@netscape.net>
"justinhj" <········@gmail.com> writes:

> Mark Carter wrote:
>> Is it possible to write to the readline in, say, CLISP? Is such a thing
>> possible> ... the logic being ...
>>
>> suppose the user has typed in some data for a database application, for
>> example. Later on, the user decides to edit the data, so lisp writes the
>> old information to the readline, which the user edits, and presses
>> return to confirm the changes.
>>
>> I understand that readline retains a history of commands entered ... but
>> suppose that the information should be considered "ancient history", and
>> not readily accessable by the user.
>
> You could read the data into a string and process the string, keeping
> it around for later.
>
He wants to write some text on the console which should be editable by the
user. 

-- 
Surendra Singhi
http://www.public.asu.edu/~sksinghi/index.html

,----
| By all means marry; if you get a good wife, you'll be happy. If you
| get a bad one, you'll become a philosopher.  
|    -- Socrates
`----
From: Barry Margolin
Subject: Re: Writing to the reader
Date: 
Message-ID: <barmar-B94604.01081616102005@comcast.dca.giganews.com>
In article <············@netscape.net>,
 Surendra Singhi <·········@netscape.net> wrote:

> He wants to write some text on the console which should be editable by the
> user.

ANSI Common Lisp has no notion of an input editor.

If the Lisp implementation provides input editing, then this is 
implementation-specific.

If it makes use of an input editor provides by the OS's terminal driver, 
then it's OS-specific.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
From: Christophe Rhodes
Subject: Re: Writing to the reader
Date: 
Message-ID: <sqpsq5hne1.fsf@cam.ac.uk>
Barry Margolin <······@alum.mit.edu> writes:

> In article <············@netscape.net>,
>  Surendra Singhi <·········@netscape.net> wrote:
>
>> He wants to write some text on the console which should be editable by the
>> user.
>
> ANSI Common Lisp has no notion of an input editor.
>
> If the Lisp implementation provides input editing, then this is 
> implementation-specific.
>
> If it makes use of an input editor provides by the OS's terminal driver, 
> then it's OS-specific.

Go not unto usenet for advice, for they shall not bother to read the
original post and then state the bloody obvious.

Christophe
From: Harald Hanche-Olsen
Subject: Re: Writing to the reader
Date: 
Message-ID: <pco7jcddc6k.fsf@shuttle.math.ntnu.no>
+ Barry Margolin <······@alum.mit.edu>:

| In article <············@netscape.net>,
|  Surendra Singhi <·········@netscape.net> wrote:
| 
| > He wants to write some text on the console which should be
| > editable by the user.
| 
| ANSI Common Lisp has no notion of an input editor.

But SLIME comes bundled (*cough*) with an editor.  I wonder, how would
you go about doing this sort of thing with SLIME?  Either insert some
text into the regular SLIME interaction buffer, or pop up some special
purpose interaction buffer, with the text in it?  Both approaches may
be of interest - the latter having the advantage that the special
buffer could have its own keybindings, offering a richer range of
interaction modes.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
  than thinking does: but it deprives us of whatever chance there is
  of getting closer to the truth.  -- C.P. Snow
From: Pascal Bourguignon
Subject: Re: Writing to the reader
Date: 
Message-ID: <87k6gdd1pk.fsf@thalassa.informatimago.com>
Barry Margolin <······@alum.mit.edu> writes:

> In article <············@netscape.net>,
>  Surendra Singhi <·········@netscape.net> wrote:
>
>> He wants to write some text on the console which should be editable by the
>> user.
>
> ANSI Common Lisp has no notion of an input editor.
>
> If the Lisp implementation provides input editing, then this is 
> implementation-specific.
>
> If it makes use of an input editor provides by the OS's terminal driver, 
> then it's OS-specific.

Which is why it would have been smarter to ask that on the clisp-list
mail list insteade of here.  There is currently a discussion about the
newly integrated readline module to clisp.  You'll have to fetch the
CVS head of clisp.  http://sourceforge.net/mail/?group_id=1355

If you needed this for sbcl, I've written a readline package with sbcl
FFI:  http://www.informatimago.com/develop/lisp/index.html


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
From: Kaz Kylheku
Subject: Re: Writing to the reader
Date: 
Message-ID: <1129442474.175211.194490@f14g2000cwb.googlegroups.com>
Mark Carter wrote:
> Is it possible to write to the readline in, say, CLISP? Is such a thing
> possible> ... the logic being ...
>
> suppose the user has typed in some data for a database application, for
> example. Later on, the user decides to edit the data, so lisp writes the
> old information to the readline, which the user edits, and presses
> return to confirm the changes.

I once (in 1996) wrote a line-editing routine completely in the GNU
shell, relying on the stty command to fiddle with and later restore the
terminal settings, and the dd utility to read exactly one character
from the device. :)

This is captured on Usenet, in article
·····················@torfree.net

The source code text contains control characters, since there isn't any
other way to represent them.

:)
From: Mark Carter
Subject: Re: Writing to the reader
Date: 
Message-ID: <435211c7$0$41146$14726298@news.sunsite.dk>
Kaz Kylheku wrote:

> I once (in 1996) wrote a line-editing routine completely in the GNU
> shell, relying on the stty command to fiddle with and later restore the
> terminal settings, and the dd utility to read exactly one character
> from the device. :)
> 
> This is captured on Usenet, in article
> ·····················@torfree.net

Is that the right link, only it just shows as an email address for me, 
and I can't locate it using Google.
From: Edi Weitz
Subject: Re: Writing to the reader
Date: 
Message-ID: <uzmp93iej.fsf@agharta.de>
On Sun, 16 Oct 2005 09:39:59 +0100, Mark Carter <··@privacy.net> wrote:

> Is that the right link, only it just shows as an email address for
> me, and I can't locate it using Google.

Welcome to Usenet.  It's not an email address, it's a message ID.  You
can locate it using "Google Groups Advanced Search."

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")