Skip to content

Instantly share code, notes, and snippets.

@marciomazza
Created June 17, 2012 16:32
Show Gist options
  • Save marciomazza/2945021 to your computer and use it in GitHub Desktop.
Save marciomazza/2945021 to your computer and use it in GitHub Desktop.
Emacs lisp snippet to open the buit html when editing an rst file
(defun sphinx-open-html-for-rst nil
"Opens the buit html for the current buffer rst file in the browser."
(interactive)
(browse-url-of-file
(replace-regexp-in-string
".rst$" ".html"
(replace-regexp-in-string "/source/" "/build/html/" (buffer-file-name)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment