by prawn on 12/6/11, 7:39 AM
"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!"
1. https://bugs.webkit.org/show_bug.cgi?id=73888
2. https://bug-73888-attachments.webkit.org/attachment.cgi?id=117988
by natesm on 12/6/11, 2:11 AM
HOKAY. So you can totally do this:
> I'm guessing there's no easy way to replace the definition of the deleteToEndOfParagraph: action with something else...
with DYLD_INSERT_LIBRARIES and method_exchangeImplementations (and maybe launchd to apply that DYLD_INSERT_LIBRARIES to everything?).
What you have to do is:
Implement a category message that does what you want (my_deleteToEndOfParagraph:).
Write a function that uses method_exchangeImplementations to replace deleteToEndOfParagraph: with my_deleteToEndOfParagraph:. deleteToEndOfParagraph: probably depends on class (NSTextView, NSTextField, WebView, etc.)
Create a shared library that uses your function as an initialization routine.
Inject that shared library into every app on the system.
As you can see this is very easy. Har har har.
by feralchimp on 12/6/11, 4:31 AM
Great comments thread on that post, including this gem after WebKit is fingered as the wrongdoer:
"Two different libraries to implement text-field editing -- because, you know, that's somewhere you might want to diverge and innovate."
LOL.
by Uhhrrr on 12/6/11, 2:08 AM
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.
by phren0logy on 12/6/11, 2:14 AM
by dylangs1030 on 12/6/11, 4:06 AM
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.
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.
by vault_ on 12/6/11, 3:03 AM
by mdanger on 12/6/11, 2:14 AM
As a non-emacs user: can someone explain what jwz is talking about here?
by mhartl on 12/6/11, 3:55 AM
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.
by js2 on 12/6/11, 3:04 AM
Hmm, I can reproduce this in Safari, but not in TextEdit, nor TextMate, under 10.7.2.
by xenophanes on 12/6/11, 2:43 AM
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...
by sambeau on 12/6/11, 4:25 AM
Just to be clear, these are standard Shell keybindings that Emacs also uses—not 'Emacs keybindings'.
by brudgers on 12/6/11, 3:14 AM
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.