[Top][All Lists]

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

Re: find s-expr in the REPL?

From: Neil Jerram
Subject: Re: find s-expr in the REPL?
Date: Mon, 25 Sep 2006 08:29:35 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Daniel Llorens del Río <address@hidden> writes:

> Hi,
> I'd like to have the following key bindings in the REPL:
> - like up-arrow, but shows previous s-expr instead of last line

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?

> - like ^R, but searches s-exprs instead of lines

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.

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.

> Has somebody written readline macros to do these things? Any other way?

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


reply via email to

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