Tuesday, November 5, 2013

Chrome edits in emacs

Noticed a plugin in chrome -- Edit with Emacs.

When using Chrome and editing some (but unfortunately not all) text area, this plugin can connect to emacs and let the edit done therein.

This works great for gmail. Especially that I find it works together with org-mode. With the following bit of code in .emacs, one can use all powerful org edits, such as org-tables and send them back to gmail.

(require 'edit-server)
(edit-server-start)

(add-hook 'edit-server-start-hook (lambda () 
    (org-mode)
    (local-set-key (kbd "C-d") '(lambda () 
        (interactive)
     (mark-whole-buffer)
     (org-html-convert-region-to-html)
 (goto-char (point-max))
 (insert "Here is signature")
     (edit-server-done)))
))

No comments:

Post a Comment