News for hackers. Stuff that matters.
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by ajross on Monday August 13, 2012 @04:13PM (#4377896)
It's not emacs (I guess it's "an emacs"). It's an editor that does syntax coloring, handles the core emacs keystrokes, and implements the subset of GNU emacs functionality that the author uses in a routine manner.

Right off the bat, I hit the following speedbumps:

  + No replace-regexp
  + No set-fill-prefix (or it's unbound)
  + Default fill prefix detection doesn't work like GNU emacs (e.g. no
    way to fill a long paragraph with a prefix of "> " for quoting
    email)
  + No ispell-word (or any spell checker) on C-$
  + C-x b tab doesn't give me the list of buffers I expect
  + No keyboard navigability in file selection dialog!  I hit C-x C-f
    and end up in this weird web 2.0 world where I'm (no joke) prompted to
    "Drag files here".
So.. it's cute. But other than the author (or someone else willing to reimplement the bits of emacs they need) I don't see to whom it's going to appeal. Serious emacs users aren't the target demographic.
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by stcredzero on Monday August 13, 2012 @04:26PM (#4377962)
An excellent, informative, high value comment!

Someone could host emacs in virtual machines that have a bunch of real emacsen hosted with TTYs implemented in Javascript and a virtual filesystem that actually writes to Dropbox. Someone could probably make good lifestyle-business money doing that.

Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by eslaught on Monday August 13, 2012 @05:54PM (#4378375)
If you're going to go to that much trouble, you might as well just compile Emacs to Javascript with enscripten and run it natively in the browser. The download time might be painful, but then we'd have a web editor actually worth using.
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by ams6110 on Monday August 13, 2012 @08:31PM (#4378841)
You might not even need to implement all of emacs, just emacsclient and have the emacs daemon running on the server.

But why does everything need to run in the browser? You have a perfectly good OS and you can run Emacs natively and use tramp to open remote files over ssh. I do it every day, it's awesome because I'm using my local emacs configured the way I like it and I can edit files on any server that has sshd running. Problem solved.

Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by Tcepsa on Tuesday August 14, 2012 @08:50AM (#4380608)
It'd be nifty if I could have the power of Emacs available to me on a tablet. Since I don't imagine anyone's going to port it soon, being able to use it in a browser seems like the only way that's going to happen.
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by cycojesus on Tuesday August 14, 2012 @09:11AM (#4380697)
It's running right now on Android: https://play.google.com/store/apps/details?id=com.zielm.emac...

It's even 24.1. I only have patchy wifi now so I haven't been able to finish the install yet on my tablet but it installed and ran M-x tetris just fine on my phone.

Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by Tcepsa on Tuesday August 14, 2012 @03:28PM (#4382675)
I stand corrected and am looking forward to giving it a spin--thanks for pointing this out!
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by jdc on Monday August 13, 2012 @07:10PM (#4378622)
Better just to do a smaller editor like Vim.
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by stcredzero on Monday August 13, 2012 @08:10PM (#4378795)
There's more value in having Emacs cloud hosted, I think. The old joke that it's an OS masquerading as a text editor is actually somewhat true. Hosted in the cloud, you have really great bandwidth to other cloud environments, all accessible through low-bandwidth requirement TTY.
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by Arelius on Monday August 13, 2012 @10:40PM (#4379128)
Yes, the core C part of Emacs is actually surprisingly small.

Sadly the vast majority of the C emacs core is platform-specific code, the sort of thing that emscripten would be worthless at.

That being said, a manual port of the VM and C modules is not inconceivable.

Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by foobarqux on Monday August 13, 2012 @06:03PM (#4378421)
Shortcut (i.e. key binding) conflicts with the web browser like C-n (new-line) make it unusable for me.
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.
Re:Show HN: Ymacs - Emacs in the browser with Dropbox, GDriv... by pjmlp on Tuesday August 14, 2012 @02:04AM (#4379624)
EmacsLisp is also missing.