From c1edbb9960acced1c41a6220022e5d07aa1e452c Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 8 Jul 2016 11:30:03 -0700 Subject: [PATCH 1/1] add org_to_doc.mk --- templates/makefiles/org_to_doc.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 templates/makefiles/org_to_doc.mk diff --git a/templates/makefiles/org_to_doc.mk b/templates/makefiles/org_to_doc.mk new file mode 100644 index 0000000..8d65796 --- /dev/null +++ b/templates/makefiles/org_to_doc.mk @@ -0,0 +1,10 @@ +EMACSARGS?=--batch -l ~/.emacs +EMACS?=emacs + +# The tempdir here is because libreoffice doesn't properly handle two +# instances using the same home directory, and will fail if you're +# exporting with another libreoffice instance open. +$(DOC_TARGETS): %.doc: %.org + TEMPDIR="$$(mktemp -d)"; \ + SYSUSERCONFIG="file://$$TEMPDIR" $(EMACS) $(EMACSARGS) --visit $^ --eval '(setq org-odt-preferred-output-format "doc")' --funcall org-odt-export-to-odt; \ + rm -rf "$$TEMPDIR"; -- 2.39.2