unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
To: guile-devel@gnu.org
Subject: Re: request for hack: readline fixes
Date: Wed, 02 Jun 2010 15:48:09 +0200	[thread overview]
Message-ID: <87aardim06.fsf@newton.homeunix.net> (raw)
In-Reply-To: m3d3wapmga.fsf@pobox.com

[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]

On Tue, Jun 01 2010, Andy Wingo wrote:

> Hello list,
>
> It would be really great if someone could get to the bottom of our
> readline support and fix a couple things.
>
>  * Tab-completion: Works great for functions, not so much for arguments?
>
>    If at the repl you type `(string-' and press tab, you get a list of
>    symbols bound in the current module that start with string-. Of
>    course it would be nice to restrict these to procedures, but hey. But
>    if you type `(string-ref fo' and press TAB, you get nothing, not even
>    if `foo' is bound. Bummer, no? It's been this way for at least 10
>    years but I know that readline can do the right thing. Please fix?

I think the attached 1-character patch fixes argument completion.
Offering only callable symbols when completing on the first position is
something i hadn't thought of for geiser: i'm probably implementing it
there first and will try to backport the implementation to guile.

>
>  * History: Expression-oriented, please!
>
>    It would be great if going back in the history cycled through entire
>    expressions, not line-by-line. Again I know that readline can do
>    this. Please fix? :)

I'll try to find the time for that too. In the meantime, just use
geiser's REPL :)

Cheers,
jao
-- 
A lot of people have my books on their bookshelves.
That's the problem, they need to read them. -- Don Knuth


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: readline.patch --]
[-- Type: text/x-diff, Size: 468 bytes --]

diff --git a/guile-readline/readline.c b/guile-readline/readline.c
index 2d3617d..ed524da 100644
--- a/guile-readline/readline.c
+++ b/guile-readline/readline.c
@@ -554,7 +554,7 @@ scm_init_readline ()
 #else  
   rl_completion_entry_function = (Function*) completion_function;
 #endif
-  rl_basic_word_break_characters = "\t\n\"'`;()";
+  rl_basic_word_break_characters = " \t\n\"'`;()";
   rl_readline_name = "Guile";
 
   reentry_barrier_mutex = scm_make_mutex ();

  reply	other threads:[~2010-06-02 13:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 19:44 request for hack: readline fixes Andy Wingo
2010-06-02 13:48 ` Jose A. Ortega Ruiz [this message]
2010-10-30 15:30 ` Neil Jerram
2010-10-30 22:11   ` Neil Jerram
2010-11-14 11:32     ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aardim06.fsf@newton.homeunix.net \
    --to=jao@gnu.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).