Last active
January 28, 2016 03:29
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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