This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
It appears that emacs keybindings are specified with 'D' instead of 'C' (e.g. D-P instead of C-P). This ends up binding emacs keybindings to the command key on MacOS instead of the control key. I cannot think of one system where emacs binds those keys to anything other than the control key. The list of ones I noticed that are wrong are: Other->Insertion Point Backward: Ctrl+B Other->Insertion Point Forward: Ctrl+F Other->Insertion Point Up: Ctrl+P Other->Insertion Point Down: Ctrl+N Other->Insertion Point to Beginning of Line: Ctrl+A Other->Insertion Point to End of Line: Ctrl+E Edit->Delete Next Character: Ctrl+D It is possible I missed others, but theae are the ones I use all the time.
I am sorry for a silly question, but are you sure this should be changed?
Emacs keybindings should match emacs, period. The only choice is to collect emacs variants for mac and see how their keybindings work and compare them, and know something about their popularity. Emacs makes liberal use of META which is Command on Mac OS, but the key arrangement on a Mac keyboard is different from a PC. The important thing is what are the majority of Mac-based-emacs users really used to. The point of D- bindings is to a. Get the common case right without anybody having to own a mac or think too much about it b. Not accidentally bind things like Cmd-H and Cmd-Q which you can't actually bind on a mac because the O/S will consume the keystrokes before they ever reach the application
I have used both the Carbon version of GNU Emacs and also Aquamacs and both use Control key for these bindings. I also have never used an emacs on any system that did not use control by default. I have used emacs on various Unix variants and Windows as well and these keys have always used the control key.
Can we please bump the priority on this issue? I reported these same problems in the comments section of related issue 67006, but it's probably worth inlining them here as well: ---- I just tried the latest 6.0 dev build (200703291800) on Mac OS X (don't have another machine handy at the moment) and found that many of the Emacs keybindings are not correct at all. For example: Other / Cut from insertion point to line end ----> [Meta+K] (this should be [Ctrl+K]) Other / Delete next word ----> [Ctrl+D] (this binding is usually for "Edit / Delete next character") Other / Insertion point to beginning of line ----> [Meta+A] (this should be [Ctrl+A]) Go To / Go to line... ----> [Ctrl+G] (this is usually [Meta+G], I believe) This is just a small sample that I noticed. I'm not enough an Emacs power user, so I don't know all the keybindings, but I do know that the ones above are incorrect. So it's good to see that the keybindings interface now exposes things that were previously missing (such as "Cut from insertion point to..."), but the bindings are still incorrect for a number of them. ---- I've verified that this issue is still unresolved as of 6.0 M9. This is a clear regression from NB 5.x... I won't be spending much time testing the NB 6.0 milestones until this issue is fixed (that is, until the Emacs keybindings are restored with the proper Ctrl+* bindings as they were in NB 5.5 and earlier). Yes, they're that important to me :)
As a regression against 5.5 marking as P2.
OK looks like the emacs keybindings should be C instead of D in order to get them correct. This means that Max has to revert the changes done Emacs-keybindings in ide/defaults from version 1.18 to 1.19. And it also means that people using daily builds and emacs keybindings will get some warnings in console about using D instead of C in key bindings definitions. Reassigning to Max.
Presumably Alt bindings should be Meta (Command) in Emacs, since Emacs makes real use of the meta key (but maps it to alt on poor PCs that don't have a meta key [well, some do, it's that windows menu key but windows will eat it]). Cc'ing Jesse as our resident emacs guru.
I suppose Ctrl- on all platforms is correct, or so says enebo. Emacs may call the key "Meta" but Java considers it plain old Alt.
Though I didn't put this in this bug, All emacs implementations also allow all meta bindings to also be escape bindings for platforms that do not have a proper meta key. Since I have been using emacs I have used escape since I began on hardware which lacked this key. I am sure I am not the only emacs user who uses escape instead of meta.
Well, except on Mac OS, where you have a real meta key called the Command key...and an Alt key you can't use for accelerators... Isn't this fun?
I should have phrased my last comment as all platforms whether they have a meta key or not also allow escape key bindings. Meta-F is also bound as ESC F for example. I sure keybindings are the love and joy of netbeans engineers everywhere :)
>> I am sure I am not the only emacs user who uses escape instead of meta. Yep, I do too, on machines where the meta key isn't properly configured, or otherwise not available. On Mac keyboards (with the "Command" key) it would be nice if NetBeans properly mapped that to mean "Meta", since that's most natural. However, I agree with enebo that it would be nice if NetBeans automatically treated ESC-W and META-W as being identical, for example. In other words, the two should be interchangeable without requiring users to manually hack the keybindings options in NetBeans to get this behavior.
*** Issue 104574 has been marked as a duplicate of this issue. ***
I've changed all C's to D's. Please verify. As for the meta key, please file an enhancement and describe how it should work, thanks. --- Checking in Emacs-keybindings.xml; /cvs/ide/defaults/src/org/netbeans/modules/defaults/Emacs-keybindings.xml,v <-- Emacs-keybindings.xml new revision: 1.24; previous revision: 1.23 done IDE: [8/28/07 3:22 PM] Committing "Emacs-keybindings.xml" finished
Thanks for fixing this. I've verified that many keybindings are now working properly again as Ctrl+*. However, there are still a number of incorrect mappings, as mentioned in an earlier comment. I've decided to file these as a new defect so that they will be addressed separately; see 114278: http://www.netbeans.org/issues/show_bug.cgi?id=114278 In that bug report I've listed some inconsistencies that I've found in a short amount of time; there are likely many others, so please, for those emacs users listening here, please look at that bug report and add any other incorrect bindings that you may have found. Also, I've filed a separate enhancement for the Meta/ESC issue that both enebo and I were discussing here; see 114281: http://www.netbeans.org/issues/show_bug.cgi?id=114281
*** Issue 67006 has been marked as a duplicate of this issue. ***