[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] Cannot use M-<key> bindings in incremental search
From: |
Chet Ramey |
Subject: |
Re: [Bug-readline] Cannot use M-<key> bindings in incremental search |
Date: |
Mon, 06 Sep 2010 19:14:15 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 |
On 8/29/10 1:03 AM, Davor Cubranic wrote:
> On August 28, 2010 04:55:41 pm you wrote:
>>> Could this be because the lookup of the key in _rl_isearch_dispatch
>>> (isearch.c:340) does not match for bindings involving Meta because
>>> the input character 'c' does not map to an ISFUNC in the current
>>> _rl_keymap?
>>
>> It is, but changing this is a problem. I can easily modify the code
>> so that it handles keymap[key].type == ISKMAP and behaves
>> appropriately, but it introduces an incompatibility. ESC is one of
>> the characters that terminates an incremental search; making this
>> change will break that. I'm reluctant to change the behavior as a
>> result.
>
> How about doing this check only if 'key' is not in 'isearch-
> terminators'? I should have added that I removed ESC from my list of
> terminators, precisely for this reason.
That's the way I had done my experimental implementation, with a
few other changes.
> Or, even better, move the isearch-terminators check as early as
> possible. Right now, it doesn't look like a few special characters (C-
> G/W/Y) will work as they're treated specially around lines 350-355, and
> the terminator check is at line 362. That way, the whole customization
> works more consistently, and no keys are treated specially.
That doesn't quite work, because of the desire to have escape-prefixed
sequences like the arrow keys work by default.
I think we'll try allowing different key sequences in readline-6.2, and
see how it works.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/
- Re: [Bug-readline] Cannot use M-<key> bindings in incremental search,
Chet Ramey <=