Friday, March 29, 2013

Emacs: press F5 to reload Firefox browser

this is great for web developers. Press a key in Emacs to save your work, then reload a page in a real browser!  If you're doing debugging with Python logging, this is all you need to do for rapid development.



(require 'net-utils)

(defun save-buffers-reload-browser ()
  (interactive)
  (save-some-buffers t)
  (run-network-program "Firefox" "localhost" 32000 "reload"))

(global-set-key (kbd "") 'save-buffers-reload-browser)

1 comment:

  1. hi can you show how to use it,? i got make client process failed: connection refused, :name, Firefox, :buffer, *Firefox*, :host, $
    (No files need saving)

    ? sory for noob question

    ReplyDelete