Subject: bug#67006: 30.0.50; w32-shell-execute will freeze Emacs on Windows 10

From: Eason Huang <[email-masked]>
Date: Fri, 10 Nov 2023 09:58:17 +0800

Eli Zaretskii <[email-masked]> writes:

> I cannot reproduce this.  I tried this on several Windows systems and
> several Emacs versions, including Windows 10 and Emacs 30, and I don't
> see the hang.  (I don't have a Windows 10 system with Emacs 30, so I
> tested there with an older version, but unless you are saying that
> this happens only with Emacs 30 and only on Windows 10, I don't think
> this matters.)

agree. actually this issue also happend on Emacs 29.2

I tested this version of Emacs 29:
http://mirrors.syringanetworks.net/gnu/emacs/windows/emacs-29/emacs-29.1_2.zip

> Tell me, does the directory "~/.emacs.d/" exist on that system?  If
> you type "C-x C-f ~/.e" and press TAB, do you see ".emacs.d" among the
> completion candidates?

Yes, I can confirm that the .emacs.d folder exist.

> Another thing to check is whether you customized your Windows system
> in a way that affects the "open" operation on directories.
>
> Also, what happens if you type
>
>   M-: (w32-shell-execute nil "~/.emacs.d/")

When I try `M-: (w32-shell-execute nil "~/.emacs.d/")`, it works as
expected. the .emacs.d folder will shows in the Windows Explorer.

I also try `M-: (w32-shell-execute "open" "~/.emacs.d/init.el")`,
it aslo works as expected, the init.el will be open with the default
notepad editor.

Another infomation about this issue, may be it is related:

I also tried to reproduce the issue on my other Windows machine with
Windows 10 and Emacs 30.

At the fist time I tried it, every things is working as expected. I also
can not reproduce the issue on that machine.

But after I installed the PowerToys  by
`winget installMicrosoft.PowerToys`, and luanch the powertoys then I can
reprodue the issue. Maybe the issue is related to PowerToys?

About the PowerToys: https://github.com/microsoft/PowerToys

But I uninstall the PowerToys, then restart that machine, the issue
still existed.

Best regard,

Eason Huang