diff options
-rw-r--r-- | ennu.el | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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))) |