Thanks for your detailed explanation. I've never tried to find out how it works on Emacs, though I'm so used to hit C-g :) Emacs has perfect functionality, but elisp makes me sick.
Maybe I should bind C-g to sth else in my yi.sh -Wen On Aug 18, 5:42 pm, Deniz Dogan <deniz.a.m.do...@gmail.com> wrote: > 2009/8/18 Wen Pu <dexte...@gmail.com>: > > > > > > > On Aug 18, 2:46 am, Jean-Philippe Bernardy > > <jeanphilippe.berna...@gmail.com> wrote: > >> On Tue, Aug 18, 2009 at 7:51 AM, Wen Pu<dexte...@gmail.com> wrote: > >> > btw: is there a "keyboard-quit" function in Yi, just like the one on > >> > emacs? > > >> I guess there is, but my emacs-fu is lacking so I'm not sure what you mean. > >> What do you need exactly? > > > It's the function bind on C-g on Emacs, it will "cancel running or > > partially typed command" whenever it is invoked, like a "universal > > quit". > > > This is especially useful for Emacs style operations, which usually > > involve long key sequences that can be easily massed up by users. > > > Thanks, > > -Wen > > AIUI, in Emacs C-g doesn't really do anything magical when part of a > key sequence; e.g. "C-x C-g" will tell you that "C-x C-g is > undefined", because that's exactly what the sequence is -- undefined. > There's just this Emacs mode author convention that modes should never > ever have C-g in their default key sequences just because C-g is, as > you say, seen as some sort of universal key sequence abortion key. One > Emacs mode which breaks this particular convention is actually > haskell-mode which has "C-c C-g" bound to > "haskell-indent-insert-guard", which basically inserts a guard at > point. > > Cases where C-g *is* useful though is e.g. if you try to execute a > function which sort of hangs your Emacs, such as connecting to > unresponsive servers (synchronously). Hitting C-g will then execute > keyboard-quit which sends a "quit" signal to Emacs making it abort > this horrendous call. > > I have absolutely no idea on how this would be implemented in > Haskell/Yi or if it is even needed at this point of development. JP > implied that there may already exist such a thing, but I can't be > bothered looking for it myself. > > -- > Deniz Dogan --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list yi-devel@googlegroups.com http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---