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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12976 in the body.
You can then email your comments to 12976 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12976; Package emacs. (Sat, 24 Nov 2012 01:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joseph Mingrone <jrm <at> ftfl.ca>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 24 Nov 2012 01:52:02 GMT) Full text and rfc822 format available.

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

From: Joseph Mingrone <jrm <at> ftfl.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2;
	C-c i is bound to custom function, but in a term buffer it gets bound
	to ido-insert-file
Date: Fri, 23 Nov 2012 20:32:41 -0400
I bind C-c i to a custom function, but when I'm in a term buffer C-c i is
bound to ido-insert-file.  When I asked about this in #emacs on freenode
I was told to report a bug.


In GNU Emacs 24.2.1 (i386-portbld-freebsd8.3)
 of 2012-09-17 on gly.ath.cx
Configured using:
 `configure '--localstatedir=/var' '--without-x' '--without-sound'
 '--without-dbus' '--without-xml2' '--without-gnutls'
 '--prefix=/usr/local' '--mandir=/usr/local/man'
 '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.3'
 'build_alias=i386-portbld-freebsd8.3' 'CC=cc' 'CFLAGS=-O2 -pipe
 -fno-strict-aliasing' 'LDFLAGS= -L/usr/local/lib
 -rpath=/usr/lib:/usr/local/lib' 'CPPFLAGS=-I/usr/local/include'
 'CPP=cpp''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_CA.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Help

Minor modes in effect:
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  show-paren-mode: t
  global-auto-revert-mode: t
  erc-spelling-mode: t
  shell-dirtrack-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
SPC SPC H a v e SPC a SPC g o o d SPC n i g h t . RET 
C-x o C-p C-p RET C-x k RET ESC x r e p TAB o TAB r 
TAB RET C - c SPC i SPC i s DEL DEL b o u n d SPC t 
o SPC c u s t o m e SPC DEL DEL SPC f u n c t i o n 
, SPC b u t SPC i n SPC t e r m SPC DEL DEL DEL DEL 
DEL a SPC t e r m SPC b u f f e r SPC i t SPC g e t 
s SPC b o u n d SPC t o SPC C-y DEL DEL DEL DEL DEL 
DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL 
DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL 
C-x o C-x o C-c n C-x h k C-c i C-x o i d o - f i n 
d - i l DEL DEL f i l e RET C-x o C-x C-f C-g C-c n 
C-x h k C-c i C-x b RET C-x o C-x b C-s RET C-p C-p 
C-p C-f C-e DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL 
DEL DEL DEL i d o - i n s e r t - f i l e C-a C-n C-n 
C-n C-n C-p C-p C-n C-n C-n C-n C-n C-n C-n C-n C-n 
ESC > ESC < C-n C-n C-f C-f C-f C-f C-f C-f C-f C-f 
C-f C-@ C-e ESC w C-x o C-x o C-x k RET y e s RET ESC 
x r e p o r TAB RET

Recent messages:
Checking 148 files in /usr/local/share/emacs/24.2/lisp/emacs-lisp...
Checking 24 files in /usr/local/share/emacs/24.2/lisp/cedet...
Checking 57 files in /usr/local/share/emacs/24.2/lisp/calendar...
Checking 87 files in /usr/local/share/emacs/24.2/lisp/calc...
Checking 65 files in /usr/local/share/emacs/24.2/lisp/obsolete...
Checking 1 files in /usr/local/share/emacs/24.2/leim...
Checking for load-path shadows...done
Quit
Type "q" in help window to restore its previous buffer.
Mark set [3 times]

Load-path shadows:
/home/jrm/.emacs.d/elpa/multi-eshell-0.0.1/multi-eshell hides ~/.elisp/multi-eshell
/home/jrm/.emacs.d/elpa/rainbow-delimiters-1.3.4/rainbow-delimiters hides ~/.elisp/rainbow-delimiters
/home/jrm/.emacs.d/elpa/multi-term-0.8.8/multi-term hides ~/.elisp/multi-term

Features:
(shadow debug emacsbug help-mode view multi-term term disp-table ehelp
electric erc-menu erc-join erc-ring erc-networks erc-pcomplete erc-track
erc-match erc-button wid-edit erc-fill erc-stamp erc-netsplit mule-util
network-stream starttls mailalias smtpmail auth-source eieio
password-cache sendmail mail-extr sort gnus-util message rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
server time-date paren autorevert cus-start cus-load edit-server derived
erc-spelling flyspell ispell auctex-autoloads tex-site info
dired+-autoloads multi-eshell-autoloads multi-term-autoloads
rainbow-delimiters-autoloads uniquify byte-opt warnings advice help-fns
advice-preload tls package tabulated-list org-install mode-compile-kill
mode-compile reporter cl bytecomp byte-compile cconv macroexp ido
ess-toolbar ess-mouse mouseme compile tool-bar browse-url ess-menu
speedbar sb-image ezimage dframe ess-swv ess-noweb noweb-font-lock-mode
ess-bugs-l essd-els ess-sas-d ess-sas-l ess-sas-a executable shell
pcomplete ess-arc-d ess-vst-d ess-xls-d ess-lsp-l ess-sta-d ess-sta-l
cc-vars cc-defs make-regexp ess-sp6-d ess-sp5-d ess-sp3-d ess-r-d
ess-r-args assoc tooltip ess-s-l ess-inf ess-utils comint ansi-color
ring ess-mode noweb-mode edmacro kmacro ess ess-custom ess-compat
ess-site erc-goodies erc erc-backend erc-compat format-spec thingatpt pp
doc-view easymenu jka-compr image-mode image dired regexp-opt ediff-hook
vc-hooks lisp-float-type lisp-mode register page menu-bar rfn-eshadow
timer jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12976; Package emacs. (Sat, 24 Nov 2012 03:45:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Joseph Mingrone <jrm <at> ftfl.ca>
Cc: 12976 <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: Fri, 23 Nov 2012 22:43:04 -0500
Joseph Mingrone wrote:

> I bind C-c i to a custom function, but when I'm in a term buffer C-c i is
> bound to ido-insert-file. 

Nothing to do with ido, really, which just remaps insert-file.

emacs -Q -f term
bash RET

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.




Reply sent to Leo Liu <sdl.web <at> gmail.com>:
You have taken responsibility. (Fri, 12 Jul 2013 01:54:02 GMT) Full text and rfc822 format available.

Notification sent to Joseph Mingrone <jrm <at> ftfl.ca>:
bug acknowledged by developer. (Fri, 12 Jul 2013 01:54:02 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Joseph Mingrone <jrm <at> ftfl.ca>, 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: Fri, 12 Jul 2013 09:52:46 +0800
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.

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.
User-defined commands are secondary in this scenario.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12976; Package emacs. (Sun, 14 Jul 2013 01:15:02 GMT) Full text and rfc822 format available.

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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12976; Package emacs. (Sun, 14 Jul 2013 01:15:03 GMT) Full text and rfc822 format available.

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 18 Jul 2013 16:33:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12976; Package emacs. (Sat, 04 Dec 2021 04:32:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Josh <josh <at> foxtail.org>
Cc: jrm <at> ftfl.ca, Glenn Morris <rgm <at> gnu.org>, 12976 <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, 04 Dec 2021 05:31:19 +0100
Josh <josh <at> foxtail.org> writes:

>> 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.

[...]

> 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?

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

It's an oddball mode, and it breaks many Emacs conventions.  In any
case, this isn't something we can change at this point, since the `C-c'
key bindings are ingrained at this point.  (You can change
`term-escape-char' if you want, though.)

So I'm reclosing this bug report as a WONTFIX.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 04 Dec 2021 04:32:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 12976 <at> debbugs.gnu.org and Joseph Mingrone <jrm <at> ftfl.ca> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 04 Dec 2021 04:32:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Jan 2022 12:24:08 GMT) Full text and rfc822 format available.

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.