branch: externals/org
commit e00259667eb016c8ab4b979868551c52e17a4e04
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>

    org-export-async-start: Fix when running from emacs -Q
    
    * lisp/ox.el (org-export-async-start): Handle scenario when
    `user-init-file' is nil.
    
    Reported-by: George Huebner <[email protected]>
    Link: https://orgmode.org/list/[email protected]
---
 lisp/ox.el | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 686ffee8de..7f72cfdca6 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6775,15 +6775,16 @@ and `org-export-to-file' for more specialized 
functions."
              (process
              (apply
               #'start-process
-              (append
-               (list "org-export-process"
-                     proc-buffer
-                     (expand-file-name invocation-name invocation-directory)
-                     "--batch")
-               (if org-export-async-init-file
-                   (list "-Q" "-l" org-export-async-init-file)
-                 (list "-l" user-init-file))
-               (list "-l" temp-file)))))
+               (delq nil
+                    (append
+                     (list "org-export-process"
+                           proc-buffer
+                           (expand-file-name invocation-name 
invocation-directory)
+                           "--batch")
+                     (if org-export-async-init-file
+                         (list "-Q" "-l" org-export-async-init-file)
+                        (and user-init-file (list "-l" user-init-file)))
+                     (list "-l" temp-file))))))
         ;; Register running process in stack.
         (org-export-add-to-stack (get-buffer proc-buffer) nil process)
         ;; Set-up sentinel in order to catch results.

Reply via email to