yonglehou / ergoemacs

Automatically exported from code.google.com/p/ergoemacs
0 stars 0 forks source link

Create a easy key for C-g ? #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
we should consider adding a Alt+‹key› shortcut for invoking the emacs C-g 
(keyboard-quit).

Rational: C-g is one of the frequently used command. It is used to cancel a 
key sequence, or exit minibuffer, exit i-search, and i'm sure others i 
can't think of at the moment. Therefore, with the ergonomic keybinding 
priciple, it perhaps should have a Alt+‹key› space, so that it is 
consistent with the idea that most frequently used command have the most 
easy to press shortcuts.

If we do implement this, we must be careful that it must be implement 
robustly. As far as i know, C-g is not simply a function that can be easily 
remapped. I think in some modes it is hard coded in C or calling elisp 
functions other than keyboard-quit. If we implement this, we must be sure 
it works in all special situations... in minibuffer, in i-search, in shell 
(if it applies), in middle of key sequence, in viper mode, in middle of 
ang-ftp or tramp, in middle of starting a process, in other special modes 
such as irc, etc.

Also, if we implement this, it should not introduce complications or 
exceptionss under normal use. ... i the past i noticed tat the ESC ESC ESC 
(keyboard-escape-quit) might be related to C-g too...

Another idea is that perhaps Esc key should actually do C-g, becuse Esc for 
canceling is rather standard on Windows. Need research on Linux's KDE and 
Gnome. For actual implementation, again it might be be very complex and 
problematic. For example, Esc ‹key› is equivalent to Meta+‹key› and 
Ctrl+[ 
‹key›. So, if we think about adding C-g or Esc to ErgoEmacs, we must 
consider what happens to these emacs equivalences.

Original issue reported on code.google.com by xah...@gmail.com on 15 Sep 2009 at 12:40

GoogleCodeExporter commented 9 years ago
Temporally added Alt+n (qwerty) shortcut:

http://code.google.com/p/ergoemacs/source/detail?r=313

Original comment by davidcapello on 9 Oct 2009 at 1:29

GoogleCodeExporter commented 9 years ago
haven't fully tested out yet.

i got the impression that C-g isn't just a simple function/command... i got the 
impression that it calls different commands in different situations, and in 
some 
places might be hardcoded in emacs that doesn't even invoke a command.

places we need to check on this: minibuffer, recursive edit, cancel a running a 
elisp 
script/command. Also test equivalence to one of the repeated press of Esc.

To fully get this right. First we need to have a comprehensive study on what 
C-g 
exactly do, in all situations (e.g. minibuffer, canceling a running program, 
while in 
intercative shell, etc.)

Then, check if our implementation is exactly the same or behaves the same as 
above. 
Might want it to be exactly the same, might not, i don't know.

I don't know if the above sounds silly... haven't really spend much time on 
this... 
but i thought i'd add some ideas here, just for extra sure. This is a important 
key 
we need to get it right.

Also, if we add C-g as part of the ergonomic keybinding in Meta space, we need 
to 
consider whether we need to add C-x, and C-c, since at least many “C-x 
something” 
combination may be more frequently used.

Original comment by xah...@gmail.com on 13 Oct 2009 at 1:38

GoogleCodeExporter commented 9 years ago
fixed in release 1.7, by David Capello.

Original comment by xah...@gmail.com on 18 Feb 2010 at 5:39

GoogleCodeExporter commented 9 years ago
this is implemented, however, is not a full implementation. See issue 68.

Original comment by xah...@gmail.com on 19 Feb 2010 at 1:36

GoogleCodeExporter commented 9 years ago
Now issue 68 is fixed. Anyway it was fixed adding alt+n key explicitly in a 
keymap used to cancel queries (query-replace-map). For other cases we will need 
to add the alt+n key in other keymaps.

Original comment by davidcapello on 11 Jun 2010 at 2:36