[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12976: 24.2; C-c i is bound to custom function, but in a term buffer
From: |
Josh |
Subject: |
bug#12976: 24.2; C-c i is bound to custom function, but in a term buffer it gets bound to ido-insert-file |
Date: |
Sat, 13 Jul 2013 18:14:20 -0700 |
On Thu, Jul 11, 2013 at 6:52 PM, Leo Liu <sdl.web@gmail.com> wrote:
> On 2012-11-24 11:43 +0800, Glenn Morris wrote:
>> Now `C-c i' is bound to insert-file. I guess this is because
>> term-escape-char = C-c, and term-raw-escape-map has Control-X-prefix as
>> parent keymap. I don't know what, if anything, to do about this.
>
> I consider this not a bug.
I certainly do. From (info "(elisp) Key Binding Conventions") :
* Don't define `C-c LETTER' as a key in Lisp programs. Sequences
consisting of `C-c' and a letter (either upper or lower case) are
reserved for users; they are the *only* sequences reserved for
users, so do not block them.
Changing all the Emacs major modes to respect this convention was a
lot of work; abandoning this convention would make that work go to
waste, and inconvenience users. Please comply with it.
> This is how term.el works because it has drastically different key
> bindings. Thus it gives the user C-c to invoke those critical commands
> on the C-x prefix, or you will be trapped in term-mode forever.
Several of the commands that term.el binds to C-c <letter> are
anything but critical, e.g. set-fill-column (C-c f) and
count-lines-page (C-c l). Furthermore, as for being "trapped
forever," I see no reason for C-c in particular to be appropriated for
this purpose instead of some other control character that would leave
users' bindings intact, or even moving `ctl-x-map' from C-c to C-c
C-x, though this would be more effort to implement.
> User-defined commands are secondary in this scenario.
The passage I cited refers to "all the Emacs major modes". Is there
any reason to believe that term.el should be exempt from adhering to
this convention?