Created
May 11, 2013 23:18
-
-
Save joostkremers/5561773 to your computer and use it in GitHub Desktop.
Emacs lisp code to run pandoc on each buffer where pandoc-mode is activated.
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 pandoc-process-all-buffers (prefix) | |
| "Run pandoc on all buffers with pandoc-mode enabled." | |
| (interactive "P") | |
| (let ((buffers (buffer-list))) | |
| (mapc #'(lambda (buffer) | |
| (set-buffer buffer) | |
| (when pandoc-mode | |
| (when (or (and prefix (y-or-n-p (format "Process buffer `%s' with pandoc? (y/n)" (buffer-name buffer)))) | |
| (not prefix)) | |
| (pandoc-run-pandoc nil)))) | |
| buffers))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment