summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ennu.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/ennu.el b/ennu.el
index ae61f0e..c19799f 100644
--- a/ennu.el
+++ b/ennu.el
@@ -132,9 +132,15 @@ last form in BODY."
(ennu-setting :static-directory)))
(ennu-post-tangle post))
:publish (lambda (&rest output-files)
- (org-babel-tangle-publish
- nil (ennu-post-filename post)
- (file-name-directory (first output-files)))))))
+ ;; TODO: Handle tangle outputs that are nested
+ ;; into directories, and when each tangle output
+ ;; is nested into a different directory.
+ (let ((post-file-copy (concat
+ (file-name-directory (first output-files))
+ (file-name-nondirectory (ennu-post-filename post)))))
+ (copy-file (ennu-post-filename post) post-file-copy)
+ (org-babel-tangle-file post-file-copy)
+ (delete-file post-file-copy))))))
posts)
link-publish-operations)))