2010/11/7 Michele Zaffalon michele.zaffalon@gmail.com:
Hi all,
Hi Michele
I am using Gambit from the terminal: is it it possible to change the terminal behaviour so that if you type a partial word and hit up arrow, the terminal tries to complete it with a command from the past command history that matches the partial word, not just with the last command?
This behaviour is, as far as I know, not very common. Most pervasive completion systems are based on the readline library, which Gambit reimplemented if I remember correctly. So, <up> will always give you the previous command in history (though some of us believe that the previous S-exp would be better). In your case, what you want is to use <tab>, form completion. And this works well. I do not know however if this can be restrained to symbols that are in the history, or if the suggestion order may consider history first.
Cheers,
P!
-- Mail resent to the list, for I initially sent it with a wrong account…
Afficher les réponses par date
On 8 November 2010 02:23, Adrien Piérard pierarda@iro.umontreal.ca wrote:
2010/11/7 Michele Zaffalon michele.zaffalon@gmail.com:
Hi all,
Hi Michele
I am using Gambit from the terminal: is it it possible to change the terminal behaviour so that if you type a partial word and hit up arrow, the terminal tries to complete it with a command from the past command history that matches the partial word, not just with the last command?
This behaviour is, as far as I know, not very common. Most pervasive completion systems are based on the readline library, which Gambit reimplemented if I remember correctly. So, <up> will always give you the previous command in history (though some of us believe that the previous S-exp would be better). In your case, what you want is to use <tab>, form completion. And this works well.
Readline implements incremental search with C-r, which works like the OP describes (C-r, then start typing to match against history), so rlwrap can be useful for dealing with prompts that don't provide any such functionality (I use it with sqlite3's repl). Gambit doesn't respond to C-r, on my system anyway, but it might be easy enough to implement a similar incremental search?
OK, so it cannot be done at the moment. Thanks for the answers. And how do you usually use Gambit? From the terminal? From Emacs? michele
2010/11/8 Oisín denpashogai@gmail.com:
On 8 November 2010 02:23, Adrien Piérard pierarda@iro.umontreal.ca wrote:
2010/11/7 Michele Zaffalon michele.zaffalon@gmail.com:
Hi all,
Hi Michele
I am using Gambit from the terminal: is it it possible to change the terminal behaviour so that if you type a partial word and hit up arrow, the terminal tries to complete it with a command from the past command history that matches the partial word, not just with the last command?
This behaviour is, as far as I know, not very common. Most pervasive completion systems are based on the readline library, which Gambit reimplemented if I remember correctly. So, <up> will always give you the previous command in history (though some of us believe that the previous S-exp would be better). In your case, what you want is to use <tab>, form completion. And this works well.
Readline implements incremental search with C-r, which works like the OP describes (C-r, then start typing to match against history), so rlwrap can be useful for dealing with prompts that don't provide any such functionality (I use it with sqlite3's repl). Gambit doesn't respond to C-r, on my system anyway, but it might be easy enough to implement a similar incremental search?
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
OK, so it cannot be done at the moment. Thanks for the answers. And how do you usually use Gambit? From the terminal? From Emacs? michele
I use vim and the terminal. Not the fastest nor the best way to develop though. I should use gambit.el in emacs: if it does at least the few things I use when I'm doing Common Lisp with slime, then I'd be more than happy. (Basically, completion, evaluation of a form and evaluation of the whole buffer...)
Yeah, I think that programming in a Lisp dialect without something like slime and paredit is just madness.
Cheers,
P!