GNU bug report logs - #62004
30.0.50; comp-run-async-workers failure when default-directory deleted

Previous Next

Package: emacs;

Reported by: No Wayman <iarchivedmywholelife <at> gmail.com>

Date: Mon, 6 Mar 2023 16:25:01 UTC

Severity: normal

Found in version 30.0.50

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: 62004 <at> debbugs.gnu.org, iarchivedmywholelife <at> gmail.com
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 <at> sdf.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 62004 <at> debbugs.gnu.org
> Date: Tue, 07 Mar 2023 16:06:56 +0000
> 
> No Wayman <iarchivedmywholelife <at> gmail.com> writes:
> 
> > No Wayman <iarchivedmywholelife <at> 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 <at> 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.




This bug report was last modified 2 years and 133 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.