summaryrefslogtreecommitdiffstats
path: root/2022
diff options
context:
space:
mode:
authorLeo Vivier <zaeph@zaeph.net>2022-09-21 18:38:44 +0200
committerLeo Vivier <zaeph@zaeph.net>2022-09-21 18:38:44 +0200
commitbb1b8846d29cd2203fc04526f7fe2adace039ff6 (patch)
tree81d820bbac03593890e8a967d6de0da3f961ceff /2022
parent605578c1e3420542f727bf6c66bfb7e73d5f55b7 (diff)
downloademacsconf-wiki-bb1b8846d29cd2203fc04526f7fe2adace039ff6.tar.xz
emacsconf-wiki-bb1b8846d29cd2203fc04526f7fe2adace039ff6.zip
Add code for export and tangle on save
Diffstat (limited to '2022')
-rw-r--r--2022/organizers-notebook.org16
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: