Re: readline eats previous text on line

2006-12-01 Thread Jon Wilson
Hi, (non)Update on this old issue. Neil Jerram wrote: Good point. I believe Jon's going to raise this (inability to do readline starting from the column after the prompt) with the readline people. I filed a bug report some time ago, since I was unable to find any sort of users mailing list. I

Re: readline eats previous text on line

2006-10-05 Thread Kevin Ryde
Neil Jerram <[EMAIL PROTECTED]> writes: > > Good point. I believe Jon's going to raise this (inability to do > readline starting from the column after the prompt) with the readline > people. I see there's an rl_already_prompted, though you still have to tell it the prompt string to make redisplay

Re: readline eats previous text on line

2006-10-05 Thread Neil Jerram
Kevin Ryde <[EMAIL PROTECTED]> writes: > Neil Jerram <[EMAIL PROTECTED]> writes: >> >> Slightly confusingly, set-readline-prompt! does also set the default >> prompt for an explicit `readline' call (1). I think the overall >> situation would be clearer if it didn't. > > It's not too terrible, may

Re: readline eats previous text on line

2006-10-05 Thread Neil Jerram
Kevin Ryde <[EMAIL PROTECTED]> writes: > This is what I ended up checking-in. This all looks great to me; sorry for not commenting earlier! Regards, Neil ___ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile

Re: readline eats previous text on line

2006-10-04 Thread Kevin Ryde
This is what I ended up checking-in. 6.5.3 Readline Functions The following functions are provided by (use-modules (ice-9 readline)) There are two ways to use readline from Scheme code, either make calls to `readline' directly to get line by line input, or use

Re: readline eats previous text on line

2006-10-02 Thread Kevin Ryde
I wrote: > > ... some words for the manual. What else should be described? Extra options to `readline' for the input/output ports, or is that only meant for the %readline level and only set-readline-input-port! for the high level? (readline-port) create/return the readline port? Is it possible

Re: readline eats previous text on line

2006-10-02 Thread Kevin Ryde
Neil Jerram <[EMAIL PROTECTED]> writes: > > + (let ((outer-new-input-prompt new-input-prompt) > + (outer-continuation-prompt continuation-prompt) Could there be a way for an application to get the prompts back, so it could do the same sort of save/restore too? _

Re: readline eats previous text on line

2006-10-02 Thread Kevin Ryde
Neil Jerram <[EMAIL PROTECTED]> writes: > > Slightly confusingly, set-readline-prompt! does also set the default > prompt for an explicit `readline' call (1). I think the overall > situation would be clearer if it didn't. It's not too terrible, may as well leave it alone in case anyone's nutted i

Re: readline eats previous text on line

2006-09-30 Thread Neil Jerram
Neil Jerram <[EMAIL PROTECTED]> writes: > The bug which Jon has noted, about the effect of set-readline-prompt! > not lasting very long, is caused by the fact that Guile's REPL code, > when using readline, does a > > (set-readline-prompt! "guile>" "...") > > before reading an expression from the

Re: readline eats previous text on line

2006-09-29 Thread Neil Jerram
Kevin Ryde <[EMAIL PROTECTED]> writes: > Neil Jerram <[EMAIL PROTECTED]> writes: >> >> ... instead of by a parameter to `readline', > > Is that readline function meant to be used? I assume it's emulating > the C function of that name. If you use it and no other input it > works does it? Yes, it

Re: readline eats previous text on line

2006-09-28 Thread Kevin Ryde
Neil Jerram <[EMAIL PROTECTED]> writes: > > ... instead of by a parameter to `readline', Is that readline function meant to be used? I assume it's emulating the C function of that name. If you use it and no other input it works does it? ___ Guile-use

Re: readline eats previous text on line

2006-09-28 Thread Jon Wilson
Hi Kevin, It might be as simple as (readline "foo: ") Not sure if that's meant to be documented, seems like a pretty sensible usage, even if reading current-input-port might be usual. Sorry, I think I misunderstood you before. I thought you had gotten confused between `read-line' a

Re: readline eats previous text on line

2006-09-28 Thread Neil Jerram
Jon Wilson <[EMAIL PROTECTED]> writes: > Hi Kevin, > >> (readline "foo: ") > > This gives an error. I think what you need is (set-readline-prompt! "foo: "). The reason it's done this way, instead of by a parameter to `readline', is that when readline is activated it applies to the input por

Re: readline eats previous text on line

2006-09-27 Thread Jon Wilson
Hi Kevin, (readline "foo: ") This gives an error. (read-line (current-input-port) 'trim "foo: ") does not give an error, but "foo: " is ignored. The first two arguments are the port to read from and the handle-delim value. Any further arguments seem to be completely ignored. Sor

Re: readline eats previous text on line

2006-09-27 Thread Kevin Ryde
Jon Wilson <[EMAIL PROTECTED]> writes: > > This prints "prompt: " on a line, and then after a short time, it is > erased. It might be as simple as (readline "foo: ") Not sure if that's meant to be documented, seems like a pretty sensible usage, even if reading current-input-port might be

readline eats previous text on line

2006-09-27 Thread Jon Wilson
Hi, I'm trying to read user input (interactive) using guile. I'd like to use (ice-9 readline), so that the user can use backspace and history and such. I'd also like to have a prompt at the beginning of the line. These last two desires seem to be incompatible, at least mod my best efforts.