M- commands no longer pass through

Alessandro Piras laynor at gmail.com
Wed Mar 13 21:03:24 CET 2013


Hi again,
I got it working, there was a problem in my custom file
(evil-intercept-esc was being set to (quote always) instead of
always... Sorry if I made you lose time with this last one!

Thanks for the fix, seems perfect!
Alessandro Piras


On 11 March 2013 23:46, Alessandro Piras <laynor at gmail.com> wrote:
> Hi again. This solution works perfectly when starting emacs in
> graphical mode "normally", thanks!
>
> I have a problem when starting it as a daemon though.
> I tried starting emacs with
> $ emacsclient --alternate-editor="" -c
> C-[ does not work, but esc does.
>
> Alessandro Piras
>
>
> On 7 March 2013 08:40, Frank Fischer <frank-fischer at shadow-soft.de> wrote:
>> On 2013-03-03, Alessandro Piras <laynor at gmail.com> wrote:
>>> Hi Frank,
>>> Yes, I meant pressing Ctrl and [ simultaneously :-)
>>> I can understand what you mean about the german keyboard, it's as
>>> crazy on an italian keyboard, but I usually type using the US layout,
>>> and my laptop has a real US-ansi layout.
>>> This happens on X, everything works as expected on the terminal.
>>>
>>> As a half-baked fix, I put this in my evil configuration:
>>>
>>>   (define-key input-decode-map (kbd "C-[") [escape])
>>
>> This is dangerous, because several meta-key-translations are contained
>> in `input-decode-map`. Furthermore `input-decode-map` is
>> 'keyboard-local', so you have to ensure to modify this map on each
>> frame. Furthermore, evil now uses more or less the same trick, so you
>> could easily interfere with Evil.
>>
>> Because `input-decode-map` is keyboard-local (or better
>> terminal-local), Evil now only modifies this map when the current
>> frame is in a terminal and leaves it untouched in X (the philosophy is
>> to tweak Emacs as less as possible, and in X not intercepting ESC
>> should be fine for most users). This works because in X the plain
>> escape key generates the 'escape event, which will eventually be
>> converted to ESC in `function-key-map` unless it is bound to some
>> command. Unfortunately C-[ generates the 'terminal' ESC event.
>>
>> IMO, the easiest fix is to instruct Evil to do its ESC magic in X,
>> too. I've committed a change to esc24.3 that introduces the
>> (customization) variable `evil-intercept-esc`. Setting this variable
>> to 'always makes Evil intercept the ESC event in any frame, not only
>> in terminal frames, i.e. something like
>>
>>     (setq evil-intercept-esc 'always)
>>
>> should solve your problem and, hopefully, not break something else (by
>> default this variable is t which means 'terminal-only').
>>
>> Hope this helps,
>> Frank
>>
>>
>>
>> _______________________________________________
>> implementations-list mailing list
>> implementations-list at lists.ourproject.org
>> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list



More information about the implementations-list mailing list