Created
October 25, 2020 01:25
-
-
Save imarko/ec8f39550662fcd16908b7ec9d100e7e to your computer and use it in GitHub Desktop.
pandoc view mode
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
(define-derived-mode | |
pandoc-view-mode | |
org-mode | |
"pandoc-view-mode" | |
"View pandoc converted files in org-mode." | |
(erase-buffer) | |
(save-excursion | |
(call-process "pandoc" nil t nil "-torg" (buffer-file-name))) | |
(not-modified) | |
(read-only-mode t) | |
(view-mode t)) | |
(add-to-list 'auto-mode-alist '("\\.docx\\'" . pandoc-view-mode)) | |
(add-to-list 'auto-mode-alist '("\\.epub\\'" . pandoc-view-mode)) |
For more comprehensive epub support check out nov-mode or ereader mode. Both support images if I remember right.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First stab at image support