News for hackers. Stuff that matters.
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by danielweber on Monday August 13, 2012 @05:46PM (#4378323)
C-k (the most useful command ever) is captured by my browser. Google Chrome.
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by antimatter15 on Monday August 13, 2012 @08:03PM (#4378772)
I'm inclined to think that that's more a bug on their part since Ctrl+K isn't one of those unstoppable key combinations (Ctrl+W, Ctrl+Tab, Ctrl+T, Ctrl+N, Shift+Esc as far as I'm aware are the only ones). Perhaps they just aren't calling e.preventDefault() on their event handlers.

And even for the combinations which can't be captured, the new Chrome platform app API lets you stop those.

Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by slipperyp on Monday August 13, 2012 @07:26PM (#4378674)
In an effort not to totally derail the conversation I guess I'll mention that nearly every browser is going to have some shortcut keys that would map to common emacs functions that will get swallowed by the browser.

But what I'm really wondering: what makes you say C-k (kill-line) is the most useful command ever? This is slightly inconvenient with basic Windows shortcuts (shift+end ctrl+x, approximately). I tend to think one of the functions which isn't trivially replicated in other environments is more useful. Just curious...

Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by danielweber on Tuesday August 14, 2012 @11:14AM (#4381299)
what makes you say C-k (kill-line) is the most useful command ever

A little bit of a joke, but it's based on a bias that the best thing you can do to source code is make it smaller. To its ridiculous conclusion wiping out every line leaves you with a program with no bugs. :)

Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by radarsat1 on Monday August 13, 2012 @07:15PM (#4378639)
That's actually a pretty big problem with the whole "browser app" thing, isn't it... there are certain key bindings that you just can't have. I wonder if there'll ever be a solution for that. Anything I can think of sounds like it would be a security issue, or annoying. (Having to answer pages asking for permission for certain keybindings... ugh.)
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by anaran on Tuesday August 14, 2012 @10:38PM (#4384187)
There's actually a simple workaround for that:

See http://support.google.com/chrome/bin/answer.py?hl=en&ans... (Create shortcuts for other apps) which I found via http://stackoverflow.com/questions/7295508/javascript-captur...

All Google Chrome keyboard shortcuts are now not interfering when used in ymacs (C-j, C-k, C-n, C-p, C-t, C-w).

Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by FuzzyDunlop on Monday August 13, 2012 @07:34PM (#4378690)
I suppose it could have been developed on a Mac, where a bunch of emacs keybindings are integrated into the OS itself.

I had no problem deleting and re-inserting that above sentence with C-k and C-y, in the textfield, for example. Hell, even C-t works.

Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by DeepDuh on Monday August 13, 2012 @07:55PM (#4378746)
The fact that OSX native doesn't use C-??? keybindings for non-unixy behavior is one of the greatest advantages IMO. It's even better than Linux in that regard, because CMD-C/V even copies/pastes from OSX clipboard in the terminal.