LWN.net Logo

GNOME and the way forward

GNOME and the way forward

Posted Aug 18, 2005 4:55 UTC (Thu) by iabervon (subscriber, #722)
In reply to: GNOME and the way forward by hp
Parent article: GNOME and the way forward

The problem with the Gtk emacs keybindings is that Gtk implements them differently from how emacs does. Consider, for example, Ctrl-K.
I use it as the sole way I copy or move text in Emacs, by hitting it repeatedly until the area I want to copy has been cut and then hitting Ctrl-Y if I wanted to keep it, moving to the destination, and hitting Ctrl-Y. In Gtk, however, Ctrl-K has no effect, unless I've told it that I want emacs keybindings, in which case it deletes all of the text I want to copy. Alternatively, I could try using Ctrl-W, but that tends to close the window instead (definitely if the text entry doesn't have focus). After I've forgotten that I'm using Gtk and done something wrong, I type Ctrl-_ to undo it, but this has no effect. I don't know if a set of keybindings could be designed to be more hostile to emacs users. (That page tells you not to use the standard application shortcut keys for anything else, and then uses one of them in the emacs keybinds for something else; it also tells applications not to use symbols that require shift in shortcuts, and then doesn't bother to implement one of the emacs shortcuts that is therefore free.) In order to save myself, I avoid using any shortcuts or pressing Ctrl or Alt while a Gtk application has focus, and never restructure my text.

I will note that OS X's emacs keybindings actually get Ctrl-K right, so it is possible. (Pressing Ctrl-K cuts to the end of the line, unless the cursor is at the end of the line, in which case it cuts the line break, and pressing it again without intervening keypresses appends the removed text to the clipboard rather than replacing it.)


(Log in to post comments)

GNOME and the way forward

Posted Aug 18, 2005 12:28 UTC (Thu) by hp (subscriber, #5220) [Link]

Maybe the bindings can be improved, nobody is against it in principle afaik. Someone has to do the work though.

Obviously we aren't going to fully implement Emacs, so they will always be sort of limited vs. Emacs itself.

GNOME and the way forward

Posted Aug 18, 2005 14:10 UTC (Thu) by ajross (subscriber, #4563) [Link]

I think the poster was a little confused. The ^K behavior he describes for OS/X is identical to the one I see in FC4's 2.10 gedit. The other complaints are about the lack of GNU Emacs's selection and copy behavior, which have never been traditionally part of "emacs keybindings" (e.g. the Motif widgets didn't support them either), which actually predate the GNU program by quite a bit.

The collision between the window keybindings and the emacs ones, though, is a good point. I have the emacs cursor movement keys in my synapses and they (^P ^N, ^F, ^B) tend to have very surprising effects when they get sent to non-emacs windows. Maybe someone could hack at the event precedence so a text field with focus can intercept them selectively, as part of the theme?

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds