7

Goal: to edit any text input (mostly text areas, but also single line inputs) shown by web browsers with an external editor, in my case, Emacs. Achieve a high level of comfort.

Whenever I'm browsing and need to write huge texts (editing a wiki, answering an email, writing blog entries) I like to do it in my editor of choice (Emacs). In order to do this I can go the manual route: copy in web browser, paste in editor, edit, copy in editor, paste in browser. What a hassle.

For Firefox I used to have an addon for that, though it got lost somewhere along the way. I've found It's All Text which supposedly works, though I haven't tried it yet.

For Chrome I'm currently using Edit with Emacs which works but has some serious shortcomings. However, I'm perfectly aware of the limitation that a Chrome extension cannot spawn other processes; using Emacs' edit server is therefore probably the only way. But I'm fine with that.

What I really want:

  • The ability to use any Emacs mode, major or minor ("Edit with Emacs" fails this as it is itself a major mode, and you lose the interaction with Chrome if you switch to a different major mode). That way editing e.g. wiki markup language can benefit from Emacs capabilities like syntax highlighting etc.
  • The ability to save the file, or at least, have automatic saves ("Edit with Emacs" fails this as well)
  • Minimum amount of manual work required for handing text over to the editor and back (context menu is fine, shortcut would be better. This is one area "Edit with Emacs" shines)

Any proposals? Thanks :)

3
  • Have you tried any of the solutions mentioned in superuser.com/a/262968/87552? Even if it uses It's All Text stackoverflow.com/a/10386560/789593 might be relevant for you as it talks about how to interact with Stack Overflow.
    – N.N.
    Oct 17, 2012 at 5:26
  • One of the mentioned solutions is currently not working according to the Chrome pluing page. I haven't tried TextAid, but it looks interesting. I did update "Edit with Emacs" (the Emacs part of it) yesterday, and at least the hassle with the modes is now gone. It even has (ugly) save capabilities, so it's "OK enough" for now. Not good enough, but it has reached that bare minimum that I can live with for now. Oct 17, 2012 at 7:32
  • 1
    Are you familiar with the Vimperator plugin for Firefox? It allows the described behavior. There are a couple of available counterparts of it for Chrome. I think it's not unreasonable that this feature has been added to Vimium of Vrome. You can probably study the code, or ask the developers how it's done. Nov 18, 2012 at 17:23

3 Answers 3

1

You didn't specify which OS. For Windows, check out http://www.listary.com/text-editor-anywhere I use it as I was looking for a similar utility, but for vim. You can specify whichever editor you like. I, too, was turned off by the complexity of implementing "Edit with Emacs" What I love about text editor anywhere is that it uses temporary files for each editing session, and saved me much lost time repeatedly.

1

If you're using firefox, check out Vimperator. If you install it, you can use the web browser just like you normally would, but with a ton of extra keyboard shortcuts. If you are in a text area or text box, you can press Control+i to launch the external editor. Edit your ~/.vimperatorrc to change which editor you want to use (it defaults to gvim).

0

You could use Atomic Chrome for Emacs that despite the name supports (in addition to Google Chrome) Firefox too (via Ghost Text addon/browser extension).

Here's my use-package configuration in .emacs:

;; ** edit browser text area in Emacs (sync both ways)
(use-package atomic-chrome
  ;; dependency Atomic Chrome extension (in Chrome)
  :ensure t
  :init
  (setq atomic-chrome-default-major-mode 'markdown-mode)
  (setq atomic-chrome-extension-type-list '(atomic-chrome))
  :config
  (atomic-chrome-start-server))

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .