If README.org file write README.md on save custom function
This commit is contained in:
parent
1b9fadb68c
commit
ebb8631a81
1 changed files with 9 additions and 1 deletions
|
@ -113,7 +113,15 @@
|
||||||
(shell . t)
|
(shell . t)
|
||||||
(plantuml . t)
|
(plantuml . t)
|
||||||
(typescript . t)
|
(typescript . t)
|
||||||
(http . t))))
|
(http . t)))
|
||||||
|
(defun me/write-readme-md-on-save ()
|
||||||
|
;; when README.org, also write README.md on save
|
||||||
|
(when (string-match "README" (buffer-file-name))
|
||||||
|
(make-local-variable 'after-save-hook)
|
||||||
|
(add-hook 'after-save-hook
|
||||||
|
(lambda () (let ((outfile (org-export-output-file-name ".md")))
|
||||||
|
(org-export-to-file 'md outfile))))))
|
||||||
|
(add-hook 'org-mode-hook 'me/write-readme-md-on-save))
|
||||||
|
|
||||||
(use-package org-roam
|
(use-package org-roam
|
||||||
:init
|
:init
|
||||||
|
|
Loading…
Add table
Reference in a new issue