Skip to content

Instantly share code, notes, and snippets.

@ikedaisuke
Last active January 28, 2016 03:29
Show Gist options
  • Save ikedaisuke/c9c31f4dad447659d62a to your computer and use it in GitHub Desktop.
Save ikedaisuke/c9c31f4dad447659d62a to your computer and use it in GitHub Desktop.
render a markdown document on your browser in real time by impatient-mode and markdown-mode
;; How to use:
;; impatient-mode
;; M-x imp-set-user-filter
;; markdown-filter
;; see also https://github.com/skeeto/impatient-mode
(defun markdown-filter (buffer)
"Render a markdown document on your browser in real time by impatient-mode and markdown-mode."
(princ
(with-temp-buffer
(let ((tempname (buffer-name)))
(set-buffer buffer)
(set-buffer (markdown tempname))
(buffer-string)))
(current-buffer)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment