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.
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
"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
`----
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 ***
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
+ 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
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/
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.
:)
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.
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")