Created
January 15, 2013 22:30
-
-
Save siancu/4542778 to your computer and use it in GitHub Desktop.
Function to open Marked.app from Emacs showing the contents of the current Markdown file.
This file contains hidden or 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
(defun markdown-preview-file () | |
"run Marked on the current file and revert the buffer" | |
(interactive) | |
(shell-command | |
(format "open -a /Applications/Marked.app %s" | |
(shell-quote-argument (buffer-file-name)))) | |
) | |
(global-set-key (kbd "C-c m") 'markdown-preview-file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for getting me started down the path of what I wanted to accomplish here. I added some behavior to only load Marked.app if it is installed; otherwise, fallback to regular
markdown-preview