Edit with Emacs is an extension for editing text areas in Google Chrome.
The extension requires an “edit server” to handle edit requests from Chrome(ium). This is due to the security model of Chrome preventing the execution of external applications. Fortunately the extension comes with a native elisp edit server which can run in your Emacs daemon session.
The extension has a number of variables that allow various behaviours to be customised. Currently they are:
‘default-frame-alist’for examples. If nil, the new frame will use the existing
There are currently two hooks
(lambda () (kill-ring-save (point-min) (point-max)))
If you’re already running an instance of Emacs in
--daemon mode then you can wrap the code in something like:
(when (and (daemonp) (locate-library "edit-server")) (require 'edit-server) (edit-server-start))
The edit To open pages for editing in a new buffer instead of a new frame on your running Emacs instance do:
(when (locate-library "edit-server") (require 'edit-server) (setq edit-server-new-frame nil) (edit-server-start))
Gmail has switched to a new compose window which unfortunately breaks interaction with
edit-server. However fortunately someone has hacked together a solution for this: https://github.com/frobtech/edit-server-htmlize
To use, simply ensure that
edit-server-htmlize.el is on your
load-path and then do:
(autoload 'edit-server-maybe-dehtmlize-buffer "edit-server-htmlize" "edit-server-htmlize" t) (autoload 'edit-server-maybe-htmlize-buffer "edit-server-htmlize" "edit-server-htmlize" t) (add-hook 'edit-server-start-hook 'edit-server-maybe-dehtmlize-buffer) (add-hook 'edit-server-done-hook 'edit-server-maybe-htmlize-buffer)
TODO: Look at integrating as-external…
On OS X, running Aquamacs 2.1, how would I force Aquamacs to bring the new message frame above Chrome? Currently, a new frame is opened on top of Aquamacs, but below Chrome. Also, i think the ALT+E button doesn’t function on Chrome 10.0.612.1 dev - no Aquamacs window is raised.
On OS X running Aquamacs (version 3.x development) : force Aquamacs to become the front application (bringing all frames forward, not just new “edit” frame) using: (add-hook ‘edit-server-start-hook (lambda () (do-applescript “tell application \“Aquamacs\” to activate”)))