diff options
-rw-r--r-- | 2022/organizers-notebook.org | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/2022/organizers-notebook.org b/2022/organizers-notebook.org index 6ba3f420..17e4c143 100644 --- a/2022/organizers-notebook.org +++ b/2022/organizers-notebook.org @@ -13,6 +13,22 @@ - [[elisp:(progn (org-md-export-to-markdown) (org-babel-tangle))][Export and tangle]] - [[elisp:(emacsconf-org-publish-this-page)][Export, tangle, commit, push]] - [[elisp:(org-babel-execute-buffer)][Execute buffer]] + +** Export and tangle on save +#+begin_src emacs-lisp :eval query +(defun emacsconf-export-markdown-on-save () + "Export markdown on save. +Meant to be used with `after-save-hook'." + (org-md-export-to-markdown) + (org-babel-tangle)) + +(add-hook 'after-save-hook #'emacsconf-export-markdown-on-save nil t) +#+end_src + +Remove the hook: +#+begin_src emacs-lisp :eval query +(remove-hook 'after-save-hook #'emacsconf-export-markdown-on-save t) +#+end_src * Current tasks / status Planned dates and phases: |