Fix #3688: failure tangling config.org

This commit is contained in:
Henrik Lissner 2020-08-04 18:04:15 -04:00
parent d45fff0088
commit 01c5c35686
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -29,12 +29,14 @@ byte-compiled from.")
;; Prevent infinite recursion due to recompile-on-save ;; Prevent infinite recursion due to recompile-on-save
;; hooks later. ;; hooks later.
(org-mode-hook nil)) (org-mode-hook nil))
(copy-file org backup t) ;; Tangling won't ordinarily expand #+INCLUDE directives, and it
(with-current-buffer (find-file-noselect backup) ;; modifies the buffer so we must do it in a copy to prevent
;; Tangling won't ordinarily expand #+INCLUDE directives ;; stepping on the user's toes.
(with-temp-file backup
(let ((buffer-file-name backup))
(insert-file-contents org)
(org-export-expand-include-keyword) (org-export-expand-include-keyword)
(org-babel-tangle nil dest) (org-babel-tangle nil dest)))
(kill-buffer (current-buffer)))
t) t)
;; Write an empty file to serve as our mtime cache ;; Write an empty file to serve as our mtime cache
(with-temp-file +literate-config-cache-file)) (with-temp-file +literate-config-cache-file))