unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: No Wayman <iarchivedmywholelife@gmail.com>
To: No Wayman <iarchivedmywholelife@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	62004@debbugs.gnu.org, Andrea Corallo <akrl@sdf.org>
Subject: bug#62004: 30.0.50; comp-run-async-workers failure when default-directory deleted
Date: Tue, 07 Mar 2023 10:53:58 -0500	[thread overview]
Message-ID: <87ilfctv36.fsf@gmail.com> (raw)
In-Reply-To: <87mt4otw1x.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]


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. 


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-comp.el-comp-run-async-workers-bind-default-director.patch --]
[-- Type: text/x-patch, Size: 969 bytes --]

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
-- 
2.39.1


  reply	other threads:[~2023-03-07 15:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 15:48 bug#62004: 30.0.50; comp-run-async-workers failure when default-directory deleted No Wayman
2023-03-06 16:49 ` Eli Zaretskii
2023-03-06 17:20   ` No Wayman
2023-03-06 18:31     ` Eli Zaretskii
2023-03-06 18:46       ` No Wayman
2023-03-06 20:10         ` Eli Zaretskii
2023-03-06 21:29           ` No Wayman
2023-03-07  3:30             ` Eli Zaretskii
     [not found]               ` <xjfo7p4vmjr.fsf@ma.sdf.org>
2023-03-07 13:17                 ` Eli Zaretskii
2023-03-07 13:51                   ` Andrea Corallo
2023-03-07 14:16                     ` Eli Zaretskii
2023-03-07 15:20                       ` No Wayman
2023-03-07 15:53                         ` No Wayman [this message]
2023-03-07 16:06                           ` Andrea Corallo
2023-03-07 16:14                             ` Eli Zaretskii
2023-03-07 16:30                               ` No Wayman
2023-03-08 20:19                                 ` Andrea Corallo
2023-03-08 20:51                                   ` No Wayman
2023-03-09  9:25                                     ` Andrea Corallo
2023-03-07 16:00                         ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilfctv36.fsf@gmail.com \
    --to=iarchivedmywholelife@gmail.com \
    --cc=62004@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).