all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* w32-shell-execute and Cygwin
@ 2020-04-20  9:59 H. Dieter Wilhelm
  2020-04-20 15:12 ` Jakub Jankiewicz
  2020-04-20 15:28 ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: H. Dieter Wilhelm @ 2020-04-20  9:59 UTC (permalink / raw)
  To: help-gnu-emacs

Hello Emacs-26.3

Under windows-nt I'm using w32-shell-execute to start a Windows10
program.  This isn't working for Emacs-26.3 in a cygwin terminal because
w32-shell-execute is not bound.

Do you know a cygwin alternative for w32-shell-execute?  I guess
start-process will do but I don't need a subprocess for this independent
application.

Thank you very much

      Dieter

-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany




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

* Re: w32-shell-execute and Cygwin
  2020-04-20  9:59 w32-shell-execute and Cygwin H. Dieter Wilhelm
@ 2020-04-20 15:12 ` Jakub Jankiewicz
  2020-04-20 19:09   ` H. Dieter Wilhelm
  2020-04-20 15:28 ` Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Jakub Jankiewicz @ 2020-04-20 15:12 UTC (permalink / raw)
  To: H. Dieter Wilhelm; +Cc: help-gnu-emacs


> Under windows-nt I'm using w32-shell-execute to start a Windows10
> program.  This isn't working for Emacs-26.3 in a cygwin terminal because
> w32-shell-execute is not bound.

Why don't use you WSL, it's Linux on Windows 10, that is fully compatible
with Windows binaries, so you can use standard way to start a process in
Emacs. The only problem with WSL is that I was not able to run ansi-term with
Ubuntu on Windows.

--
Jakub Jankiewicz, Web Developer
https://jcubic.pl/me



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

* Re: w32-shell-execute and Cygwin
  2020-04-20  9:59 w32-shell-execute and Cygwin H. Dieter Wilhelm
  2020-04-20 15:12 ` Jakub Jankiewicz
@ 2020-04-20 15:28 ` Eli Zaretskii
  2020-04-20 19:49   ` H. Dieter Wilhelm
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2020-04-20 15:28 UTC (permalink / raw)
  To: help-gnu-emacs

> From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm)
> Date: Mon, 20 Apr 2020 11:59:32 +0200
> 
> Under windows-nt I'm using w32-shell-execute to start a Windows10
> program.  This isn't working for Emacs-26.3 in a cygwin terminal because
> w32-shell-execute is not bound.
> 
> Do you know a cygwin alternative for w32-shell-execute?  I guess
> start-process will do but I don't need a subprocess for this independent
> application.

Can't you use the Cygwin/w32 build of Emacs, i.e. a Cygwin build which
uses MS-Windows native GUI widgets?  That build does support
w32-shell-execute function.



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

* Re: w32-shell-execute and Cygwin
  2020-04-20 15:12 ` Jakub Jankiewicz
@ 2020-04-20 19:09   ` H. Dieter Wilhelm
  2020-04-21  8:27     ` Jakub Jankiewicz
  0 siblings, 1 reply; 9+ messages in thread
From: H. Dieter Wilhelm @ 2020-04-20 19:09 UTC (permalink / raw)
  To: Jakub Jankiewicz; +Cc: help-gnu-emacs

Jakub Jankiewicz <jcubic@onet.pl> writes:

>> Under windows-nt I'm using w32-shell-execute to start a Windows10
>> program.  This isn't working for Emacs-26.3 in a cygwin terminal because
>> w32-shell-execute is not bound.
>
> Why don't use you WSL, it's Linux on Windows 10, that is fully compatible
> with Windows binaries, so you can use standard way to start a process in

Good idea :-)

Installed it and it seems to be a good alternative to (other?) VMs.  But
to be fully functional I need to run graphical programs on it as well.
For example an Emacs with docview.

Do you know if this is possible?

Thanks
        Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



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

* Re: w32-shell-execute and Cygwin
  2020-04-20 15:28 ` Eli Zaretskii
@ 2020-04-20 19:49   ` H. Dieter Wilhelm
  2020-04-21  2:24     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: H. Dieter Wilhelm @ 2020-04-20 19:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm)
>> Date: Mon, 20 Apr 2020 11:59:32 +0200
>> 
>> Under windows-nt I'm using w32-shell-execute to start a Windows10
>> program.  This isn't working for Emacs-26.3 in a cygwin terminal because
>> w32-shell-execute is not bound.
>> 
>> Do you know a cygwin alternative for w32-shell-execute?  I guess
>> start-process will do but I don't need a subprocess for this independent
>> application.
>
> Can't you use the Cygwin/w32 build of Emacs, i.e. a Cygwin build which
> uses MS-Windows native GUI widgets?  That build does support
> w32-shell-execute function.

Installed on cygwin the emacs-w32.exe version, do you mean that?  This
Emacs built (version emacs-27.0.90) is knowing w32-shell-execute. :-)

But now there is the problem that w32-shell-execute seemingly doesn't
recognise cygwin paths. (here: "/cygwin/c/...")

  error "ShellExecute failed: The system cannot find the file..."

It seems to me as if w32-shell-execute is not literate for cygwin paths
and one needs to normalise them to the Windows standard ("c:/...")?

Thank you Eli

  Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



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

* Re: w32-shell-execute and Cygwin
  2020-04-20 19:49   ` H. Dieter Wilhelm
@ 2020-04-21  2:24     ` Eli Zaretskii
  2020-04-21  8:53       ` H. Dieter Wilhelm
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2020-04-21  2:24 UTC (permalink / raw)
  To: help-gnu-emacs

> From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm)
> Cc: help-gnu-emacs@gnu.org
> Date: Mon, 20 Apr 2020 21:49:48 +0200
> 
> But now there is the problem that w32-shell-execute seemingly doesn't
> recognise cygwin paths. (here: "/cygwin/c/...")
> 
>   error "ShellExecute failed: The system cannot find the file..."
> 
> It seems to me as if w32-shell-execute is not literate for cygwin paths
> and one needs to normalise them to the Windows standard ("c:/...")?

Yes.  There's a function for that already in Emacs:
cygwin-convert-file-name-to-windows.



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

* Re: w32-shell-execute and Cygwin
  2020-04-20 19:09   ` H. Dieter Wilhelm
@ 2020-04-21  8:27     ` Jakub Jankiewicz
  0 siblings, 0 replies; 9+ messages in thread
From: Jakub Jankiewicz @ 2020-04-21  8:27 UTC (permalink / raw)
  To: H. Dieter Wilhelm; +Cc: help-gnu-emacs


> >> Under windows-nt I'm using w32-shell-execute to start a Windows10
> >> program.  This isn't working for Emacs-26.3 in a cygwin terminal because
> >> w32-shell-execute is not bound.  
> >
> > Why don't use you WSL, it's Linux on Windows 10, that is fully compatible
> > with Windows binaries, so you can use standard way to start a process in  
> 
> Good idea :-)
> 
> Installed it and it seems to be a good alternative to (other?) VMs.  But
> to be fully functional I need to run graphical programs on it as well.
> For example an Emacs with docview.
> 
> Do you know if this is possible?

I have installed GNU Emacs from [Choco][1], windows application not Linux one
so every GUI mode works. With that one ansi-term doesn't work. Other option
was is [Emacs-WSL Guide][2] but I didn't tested it. It seems that it work with
[ansi-term][3]. It's Emacs from Linux and the intro to the guide say that it
show how make it work with GUI.

[1]: https://chocolatey.org/docs/installation
[2]: https://github.com/hubisan/emacs-wsl
[3]: https://github.com/hubisan/emacs-wsl/issues/8

--
Jakub Jankiewicz, Web Developer
https://jcubic.pl/me



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

* Re: w32-shell-execute and Cygwin
  2020-04-21  2:24     ` Eli Zaretskii
@ 2020-04-21  8:53       ` H. Dieter Wilhelm
  2020-04-21 14:20         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: H. Dieter Wilhelm @ 2020-04-21  8:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm)
>> Cc: help-gnu-emacs@gnu.org
>> Date: Mon, 20 Apr 2020 21:49:48 +0200
>> 
>> But now there is the problem that w32-shell-execute seemingly doesn't
>> recognise cygwin paths. (here: "/cygwin/c/...")
>> 
>>   error "ShellExecute failed: The system cannot find the file..."
>> 
>> It seems to me as if w32-shell-execute is not literate for cygwin paths
>> and one needs to normalise them to the Windows standard ("c:/...")?
>
> Yes.  There's a function for that already in Emacs:
> cygwin-convert-file-name-to-windows.

Thank you for the hint but I still can't get it to run.

I'm afraid there might be a bug in cygwin's w32-shell-execute because
under system-type = windows-nt (26.3) I'm able to start the following
application (with a space in the path).  But under system-type = cygwin
(27.0.50) it isn't finding the exec:

    (w32-shell-execute
     ;; "Open" (concat "\"" (cygwin-convert-file-name-to-windows
     ;;                                      apdl-ansys-help-program) "\"") )
     ;; "open" (concat "\"" (cygwin-convert-file-name-to-windows
     ;;                                      "/cygdrive/c/CAx/App/ANSYS Inc/v201/commonfiles/help/HelpViewer/ANSYSHelpViewer.exe") "\""))
        "Open" (concat "\""
                       "C:\\CAx\\App\\ANSYS Inc\\v201\\commonfiles\\help\\HelpViewer\\ANSYSHelpViewer.exe" "\""))

Thank you

        Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



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

* Re: w32-shell-execute and Cygwin
  2020-04-21  8:53       ` H. Dieter Wilhelm
@ 2020-04-21 14:20         ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2020-04-21 14:20 UTC (permalink / raw)
  To: help-gnu-emacs

> From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm)
> Cc: help-gnu-emacs@gnu.org
> Date: Tue, 21 Apr 2020 10:53:42 +0200
> 
> > Yes.  There's a function for that already in Emacs:
> > cygwin-convert-file-name-to-windows.
> 
> Thank you for the hint but I still can't get it to run.
> 
> I'm afraid there might be a bug in cygwin's w32-shell-execute because
> under system-type = windows-nt (26.3) I'm able to start the following
> application (with a space in the path).  But under system-type = cygwin
> (27.0.50) it isn't finding the exec:
> 
>     (w32-shell-execute
>      ;; "Open" (concat "\"" (cygwin-convert-file-name-to-windows
>      ;;                                      apdl-ansys-help-program) "\"") )
>      ;; "open" (concat "\"" (cygwin-convert-file-name-to-windows
>      ;;                                      "/cygdrive/c/CAx/App/ANSYS Inc/v201/commonfiles/help/HelpViewer/ANSYSHelpViewer.exe") "\""))
>         "Open" (concat "\""
>                        "C:\\CAx\\App\\ANSYS Inc\\v201\\commonfiles\\help\\HelpViewer\\ANSYSHelpViewer.exe" "\""))

Actually, I see that w32-shell-execute aleady invokes
cygwin-convert-file-name-to-windows internally, so you don't have to
do that.

Other than that, I'm afraid I cannot help you, sorry.  I suggest to
ask this on the Cygwin mailing list.



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

end of thread, other threads:[~2020-04-21 14:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-20  9:59 w32-shell-execute and Cygwin H. Dieter Wilhelm
2020-04-20 15:12 ` Jakub Jankiewicz
2020-04-20 19:09   ` H. Dieter Wilhelm
2020-04-21  8:27     ` Jakub Jankiewicz
2020-04-20 15:28 ` Eli Zaretskii
2020-04-20 19:49   ` H. Dieter Wilhelm
2020-04-21  2:24     ` Eli Zaretskii
2020-04-21  8:53       ` H. Dieter Wilhelm
2020-04-21 14:20         ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.