bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62004: 30.0.50; comp-run-async-workers failure when default-director


From: Eli Zaretskii
Subject: bug#62004: 30.0.50; comp-run-async-workers failure when default-directory deleted
Date: Tue, 07 Mar 2023 18:14:26 +0200

> From: Andrea Corallo <akrl@sdf.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 62004@debbugs.gnu.org
> Date: Tue, 07 Mar 2023 16:06:56 +0000
> 
> No Wayman <iarchivedmywholelife@gmail.com> writes:
> 
> > No Wayman <iarchivedmywholelife@gmail.com> writes:
> >
> >> Binding default-directory makes sense.
> >> It's just a matter of what to bind it to.
> >> I see that `comp-run-async-workers` calls `make-temp-file'
> >> internally.
> >> Binding default-directory to temporary-file-directory around the
> >> call to
> >> `make-process' will prevent this error and seems like a safe bet.
> >
> > The attached patch implements this and fixes the error on my end. >From 
> > fd33c2d58ac078ed53cdada5fa6e378e59247a3a Mon Sep 17 00:00:00 2001
> > From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
> > Date: Tue, 7 Mar 2023 10:44:17 -0500
> > Subject: [PATCH] comp.el (comp-run-async-workers): bind default-directory
> >
> > Ensure default-directory exists prior to creating subprocess. (bug#62004)
> > ---
> >  lisp/emacs-lisp/comp.el | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
> > index ce81680a226..97cfa27a1aa 100644
> > --- a/lisp/emacs-lisp/comp.el
> > +++ b/lisp/emacs-lisp/comp.el
> > @@ -4023,6 +4023,7 @@ comp-run-async-workers
> >                          (comp-log "\n")
> >                          (mapc #'comp-log expr-strings)))
> >                     (load1 load)
> > +                   (default-directory temporary-file-directory)
> >                     (process (make-process
> >                               :name (concat "Compiling: " source-file)
> >                               :buffer (with-current-buffer
> 
> If tested LGTM, another option (maybe safer?) would be to use
> `invocation-directory'.

I think I'd prefer invocation-directory, indeed.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]