[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emulate readline
From: |
despen |
Subject: |
Re: emulate readline |
Date: |
Wed, 06 Apr 2011 19:44:57 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
fork <forkandwait@gmail.com> writes:
> <despen <at> verizon.net> writes:
>
>> By default the up arrow just goes to the previous element.
>
> Yes.
>
>> This is close but not right:
>>
>> (define-key minibuffer-local-map [(up)] 'previous-matching-history-element)
>
> Cool!
>
> Is there a way to pass the text currently in the minibuffer to a function
> (which
> would be bound to "up" like the above)?
Well, I just tried what seemed "intuitive" and it seems to work.
I typed:
M-x
then
m C-r
That gave me a prompt for isearch backwards
with the "m" already in place.
I hit C-r again and it pulled out the command
I was looking for "man".
Then I hit return and got the completed M-x prompt
where I could then run the command.
Try it.
I think there's an option about nesting commands in the mini-buffer
that you may have to enable. I have this:
(setq minibuffer-max-depth nil)
Re: emulate readline, Peter Dyballa, 2011/04/06
Re: emulate readline, Le Wang, 2011/04/06