"Update: Holy shit! I am told that this bug was fixed FIVE HOURS after I posted this -- Webkit bug 73888 [1] and the patch [2]. Thanks, Alexey!"<p><pre><code> 1. https://bugs.webkit.org/show_bug.cgi?id=73888
2. https://bug-73888-attachments.webkit.org/attachment.cgi?id=117988</code></pre>
HOKAY. So you can totally do this:<p>> I'm guessing there's no easy way to replace the definition of the deleteToEndOfParagraph: action with something else...<p>with DYLD_INSERT_LIBRARIES and method_exchangeImplementations (and maybe launchd to apply that DYLD_INSERT_LIBRARIES to everything?).<p>What you have to do is:<p>Implement a category message that does what you want (my_deleteToEndOfParagraph:).<p>Write a function that uses method_exchangeImplementations to replace deleteToEndOfParagraph: with my_deleteToEndOfParagraph:. deleteToEndOfParagraph: probably depends on class (NSTextView, NSTextField, WebView, etc.)<p>Create a shared library that uses your function as an initialization routine.<p>Inject that shared library into every app on the system.<p>As you can see this is <i>very easy</i>. Har har har.
Great comments thread on that post, including this gem after WebKit is fingered as the wrongdoer:<p>"Two different libraries to implement text-field editing -- because, you know, that's somewhere you might want to diverge and innovate."<p>LOL.
I'm always agog when an organization changes something beloved like key bindings. Qui bono? Someone who uses them is in the same boat as everyone else, muscle memory-wise. And someone who doesn't shouldn't care. And in either case, there should be enough people with facial hair (or female equivalent) who will block it because toying with user expectations is bad.
File a bug. This seems like the kind of thing that Apple would actually fix.<p><a href="https://bugreport.apple.com/" rel="nofollow">https://bugreport.apple.com/</a>
To clarify this a bit for non-Emacs users (as I saw a comment), the tl;dr version is that jwz wants Mac to maintain the Emacs key bindings that essentially amount to a specialized set of copy, cut and paste functions in text editing.<p>This is not because Apple particularly sponsors Emacs, but because historically, Mac key bindings and Emacs key bindings were the same for those functions. So it's the same (roughly) as finding that Command-A, Command-C and Command-V no longer work the way they used to.
You can set per-user shortcuts for this. <a href="http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html" rel="nofollow">http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html</a><p>I'm unsure if it works in 10.7 though.
I use ^K all the time, but somehow I didn't remember ^Y from my dalliance with Emacs a decade ago. And now that I know I want it, I can't have it. Crap.
you can change the keybindings to do multiple things, not just pick a single preset command like deleteToEndOfParagraph. not sure how much help that is though, since what he wants is kind of adding "truncate buffer" (or at least "setLastCommandFlag") to ALL other commands, rather than actually changing ctrl-k itself. this is not a problem with the deleteToEndOfParagraph implementation though, and i don't see how hacking that could help, since he wants something to happen after hitting arrows keys, typing, etc...
While I can understand the issue the change creates for the author, a nexus between the emacs interface and Apple's overall user experience philosophy would appear to be somewhat hard to find.