Add a function to convert markdown files to org
This commit is contained in:
parent
cf7aaaa7f9
commit
7cc53c6f4d
|
@ -183,3 +183,12 @@
|
|||
(turn-off-auto-fill)
|
||||
(flyspell-mode)))
|
||||
(add-hook 'org-after-todo-statistics-hook 'org-summary-todo)))
|
||||
|
||||
|
||||
;; https://emacs.stackexchange.com/a/41619
|
||||
(defun az-markdown-convert-buffer-to-org ()
|
||||
"Convert the current buffer's content from markdown to orgmode format and save it with the current buffer's file name but with .org extension."
|
||||
(interactive)
|
||||
(shell-command-on-region (point-min) (point-max)
|
||||
(format "pandoc -f markdown -t org -o %s"
|
||||
(concat (file-name-sans-extension (buffer-file-name)) ".org"))))
|
||||
|
|
Loading…
Reference in New Issue