From 8bc0a66275ca6ffdf142e8e2c2b38d79923531d8 Mon Sep 17 00:00:00 2001 Message-Id: <8bc0a66275ca6ffdf142e8e2c2b38d79923531d8.1664855997.git.yantar92@gmail.com> From: Ihor Radchenko Date: Tue, 4 Oct 2022 11:58:45 +0800 Subject: [PATCH] ox: Do not disable graphical Emacs capabilities during async export * lisp/ox.el (org-export-async-start): Run Emacs in possibly iconized window instead of batch mode. This way, font colors can be processed by htmlize during async export. --- lisp/ox.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index 42204ffde..a31459632 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -6432,7 +6432,9 @@ (defun org-export-async-start (fun body) (funcall ',copy-fun) (restore-buffer-modified-p nil) ;; Sexp to evaluate in the buffer. - (print ,body))) + (print ,body) + ;; Kill Emacs at the end. + (kill-emacs 0))) nil temp-file nil 'silent)) ;; Start external process. (let* ((process-connection-type nil) @@ -6444,7 +6446,9 @@ (defun org-export-async-start (fun body) (list "org-export-process" proc-buffer (expand-file-name invocation-name invocation-directory) - "--batch") + ;; "--batch" + "--iconic" + ) (if org-export-async-init-file (list "-Q" "-l" org-export-async-init-file) (list "-l" user-init-file)) -- 2.35.1