[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find s-expr in the REPL?

From: Daniel Llorens del Río
Subject: Re: find s-expr in the REPL?
Date: Mon, 25 Sep 2006 20:03:33 +0200

On 25 Sep, 2006, at 18:07, address@hidden wrote:

Just to check what you mean here: in many cases a line is a single
sexp, so there is no difference - so I presume you're talking about
the case where a sexp is split across lines, e.g.

guile> (define (foo)
guile>   (bar))

and saying that when you do up-arrow after this you'd like to see

guile> (define (foo) (bar))

Is that right?

Absolutely, that's what I mean. Actually, maybe I'd prefer up-arrow to show

guile> (define (foo)
...   (bar))

just as I would have typed it. But that's a minor detail.

I think this is just a corollary of the above, isn't it?  In other
words, if you do "^R foo" you'd also like to see the combined line, as
shown just above.

That's right.

It seems to me that these could most easily be achieved by modifying
what readline thinks its history is.  I'm sure this is doable, but
someone needs to look into the details.

The idea is, I guess, to have readline split its history not by newlines but by matching parentheses at the top level, at least when they cross line boundaries. I'll look into that, thanks.

I'm not familiar with readline macros.  Can they do this kind of line

I'm not familiar with them either. They seem to provide good search capabilities, so that's why I proposed them.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]