unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54766: [PATCH] 28.1.0; Native comp: Inherit working directory for sub processes (MS Windows)
@ 2022-04-07 14:35 Robin Putters
  2022-04-07 16:08 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Robin Putters @ 2022-04-07 14:35 UTC (permalink / raw)
  To: 54766

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

On MS Windows systems, where the Emacs executable is typically not in the PATH, creating the async sub processes for the native compiler will fail because they are started in a random working directory. The included patch will inherit the working directory from the parent emacs process by setting default-directory before creating the sub process.    

Robin Putters

[-- Attachment #2: Pat2409.diff --]
[-- Type: application/octet-stream, Size: 625 bytes --]

 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 a363bed..61968f4 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3961,6 +3961,7 @@ display a message."
                         (comp-log "\n")
                         (mapc #'comp-log expr-strings)))
                    (load1 load)
+                   (default-directory invocation-directory)
                    (process (make-process
                              :name (concat "Compiling: " source-file)
                              :buffer (with-current-buffer

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#54766: [PATCH] 28.1.0; Native comp: Inherit working directory for sub processes (MS Windows)
  2022-04-07 14:35 bug#54766: [PATCH] 28.1.0; Native comp: Inherit working directory for sub processes (MS Windows) Robin Putters
@ 2022-04-07 16:08 ` Eli Zaretskii
  2022-04-23 17:16   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2022-04-07 16:08 UTC (permalink / raw)
  To: Robin Putters; +Cc: 54766

> From: Robin Putters <robin.putters@keronic.com>
> Date: Thu, 7 Apr 2022 14:35:57 +0000
> 
> On MS Windows systems, where the Emacs executable is typically not in the PATH, creating the async sub processes for the native compiler will fail because they are started in a random working directory. The included patch will inherit the working directory from the parent emacs process by setting default-directory before creating the sub process.    

Please tell more about the failure and its reasons.  The compilation
command does this:

                   (process (make-process
                             :name (concat "Compiling: " source-file)
                             :buffer (with-current-buffer
                                         (get-buffer-create
                                          comp-async-buffer-name)
                                       (setf buffer-read-only t)
			               (current-buffer))
                             :command (list
                                       (expand-file-name invocation-name
                                                         invocation-directory)
                                       "--batch" "-l" temp-file)

So the program we invoked already has its executable file name
expanded relative to invocation-directory, and we shouldn't need PATH
at all.  What am I missing?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#54766: [PATCH] 28.1.0; Native comp: Inherit working directory for sub processes (MS Windows)
  2022-04-07 16:08 ` Eli Zaretskii
@ 2022-04-23 17:16   ` Lars Ingebrigtsen
  2022-05-22 11:27     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-23 17:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Robin Putters, 54766

Eli Zaretskii <eliz@gnu.org> writes:

> So the program we invoked already has its executable file name
> expanded relative to invocation-directory, and we shouldn't need PATH
> at all.  What am I missing?

I don't understand either -- using nativecomp Emacs without having the
Emacs executable in PATH works just fine for me.

Robin, what was the actual error messages you were seeing?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#54766: [PATCH] 28.1.0; Native comp: Inherit working directory for sub processes (MS Windows)
  2022-04-23 17:16   ` Lars Ingebrigtsen
@ 2022-05-22 11:27     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-22 11:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Robin Putters, 54766

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I don't understand either -- using nativecomp Emacs without having the
> Emacs executable in PATH works just fine for me.
>
> Robin, what was the actual error messages you were seeing?

More information was requested, but no response was given within a
month, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-22 11:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07 14:35 bug#54766: [PATCH] 28.1.0; Native comp: Inherit working directory for sub processes (MS Windows) Robin Putters
2022-04-07 16:08 ` Eli Zaretskii
2022-04-23 17:16   ` Lars Ingebrigtsen
2022-05-22 11:27     ` Lars Ingebrigtsen

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).