GNU bug report logs - #12976
24.2; C-c i is bound to custom function, but in a term buffer it gets bound to ido-insert-file

Previous Next

Package: emacs;

Reported by: Joseph Mingrone <jrm <at> ftfl.ca>

Date: Sat, 24 Nov 2012 01:52:01 UTC

Severity: minor

Tags: wontfix

Found in version 24.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 12976 <at> debbugs.gnu.org (full text, mbox):

From: Josh <josh <at> foxtail.org>
To: 12976 <at> debbugs.gnu.org, jrm <at> ftfl.ca
Cc: Glenn Morris <rgm <at> gnu.org>, 12976-done <at> debbugs.gnu.org
Subject: Re: 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 <at> 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?




This bug report was last modified 3 years and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.