Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I hadn't even realized how much I'd gotten used to emacs' way of thinking about buffers until I tried automating Google Docs.

... What a nightmare. Everything is an object. A header is an object. A paragraph is an object. There's a three-deep hierarchy to start talking about the current document. Yes, it's nice and namespaced and in that sense is well-defined, but the "hello world" of inserting text at the current cursor position is an absolute nightmare. And if you want to insert something more complex, like a couple headers and a paragraph and maybe a table? Get ready to build a factory function that creates a bunch of stuff and glues it together like you're writing a UI in Java AWT. And then it's not even in the doc yet, you have to go find your cursor, find the doc element the cursor is in, and only then can you insert content via a reparenting operation.

In emacs, you could do all of that with repeated "insert" calls, nearly literally touching the same keys you'd use to do it in the editor. It's an almost 1-to-1 metaphor mapping. If you know how to write text in emacs you know half of what you need to script emacs.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: