From 35ae093113d9a04a99b55f0747848b373a7463f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Mon, 29 Nov 2021 09:54:33 +0100 Subject: [PATCH] ox: Fix async export with native compilation * lisp/ox-beamer.el (org-beamer-export-to-pdf): * lisp/ox-icalendar.el (org-icalendar-export-to-ics): * lisp/ox-koma-letter.el (org-koma-letter-export-to-pdf): * lisp/ox-man.el (org-man-export-to-pdf): * lisp/ox-texinfo.el (org-texinfo-export-to-info): Quote lambda. Quote or name lambdas to prevent their compilation into anonymous functions which cannot be passed to the external async emacs process. --- lisp/ox-beamer.el | 2 +- lisp/ox-icalendar.el | 4 ++-- lisp/ox-koma-letter.el | 2 +- lisp/ox-man.el | 2 +- lisp/ox-texinfo.el | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index c9a67f891..3bfcd01d4 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -1059,7 +1059,7 @@ Return PDF file's name." (let ((file (org-export-output-file-name ".tex" subtreep))) (org-export-to-file 'beamer file async subtreep visible-only body-only ext-plist - (lambda (file) (org-latex-compile file))))) + #'org-latex-compile))) ;;;###autoload (defun org-beamer-select-environment () diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index 0a682c7c8..68c5679ea 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -888,8 +888,8 @@ Return ICS file name." (org-export-to-file 'icalendar outfile async subtreep visible-only body-only '(:ascii-charset utf-8 :ascii-links-to-notes nil) - (lambda (file) - (run-hook-with-args 'org-icalendar-after-save-hook file) nil)))) + '(lambda (file) + (run-hook-with-args 'org-icalendar-after-save-hook file) nil)))) ;;;###autoload (defun org-icalendar-export-agenda-files (&optional async) diff --git a/lisp/ox-koma-letter.el b/lisp/ox-koma-letter.el index 6a895a6a2..978e4e41f 100644 --- a/lisp/ox-koma-letter.el +++ b/lisp/ox-koma-letter.el @@ -982,7 +982,7 @@ Return PDF file's name." (org-koma-letter-special-contents)) (org-export-to-file 'koma-letter file async subtreep visible-only body-only ext-plist - (lambda (file) (org-latex-compile file))))) + #'org-latex-compile))) (provide 'ox-koma-letter) diff --git a/lisp/ox-man.el b/lisp/ox-man.el index 6d3476cda..9a1f00f35 100644 --- a/lisp/ox-man.el +++ b/lisp/ox-man.el @@ -1117,7 +1117,7 @@ Return PDF file's name." (let ((outfile (org-export-output-file-name ".man" subtreep))) (org-export-to-file 'man outfile async subtreep visible-only body-only ext-plist - (lambda (file) (org-latex-compile file))))) + #'org-latex-compile))) (defun org-man-compile (file) "Compile a Groff file. diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index b0125894a..734c8a4f3 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1701,7 +1701,7 @@ Return INFO file's name." (org-export-coding-system org-texinfo-coding-system)) (org-export-to-file 'texinfo outfile async subtreep visible-only body-only ext-plist - (lambda (file) (org-texinfo-compile file))))) + #'org-texinfo-compile))) ;;;###autoload (defun org-texinfo-publish-to-texinfo (plist filename pub-dir) -- 2.34.1