]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/comp.el (comp-run-async-workers): Fail more gracefully
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 3 Sep 2022 15:03:01 +0000 (11:03 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 3 Sep 2022 19:14:58 +0000 (15:14 -0400)
Otherwise Emacs may fail to start if it can't find a writable
`~/.emacs.d/eln-cache` directory.
Fixes bug#57562.  See also Debian's bug #1017739.

lisp/emacs-lisp/comp.el

index 374b39e99902239a89b2af4504d04a978b8d4e18..a5ab12ae38859ab3c9fe581a1c324723326fff37 100644 (file)
@@ -3927,8 +3927,11 @@ display a message."
          when (or native-comp-always-compile
                   load ; Always compile when the compilation is
                        ; commanded for late load.
-                  (file-newer-than-file-p
-                   source-file (comp-el-to-eln-filename source-file)))
+                  ;; Skip compilation if `comp-el-to-eln-filename' fails
+                  ;; to find a writable directory.
+                  (with-demoted-errors "Async compilation :%S"
+                    (file-newer-than-file-p
+                     source-file (comp-el-to-eln-filename source-file))))
          do (let* ((expr `((require 'comp)
                            ,(when (boundp 'backtrace-line-length)
                               `(setf backtrace-line-length ,backtrace-line-length))