gavenkoa · 2022-12-23 16:00
For the smooth integration I am using Cygwin (with w32 Emacs for native UI + copy/paste). But its `fork` is slow, especially with corporate antivirus.
In the past I used NT Emacs with Cygwin and in order to make `hg` work I created an executable wrapper that re-invoke the command stripping `.exe` extension:
https://hg.defun.work/utils/file/tip/cygwin/cygrun/cygrun.c
Because `hg` is a Python script in Cygwin! And this is not enough: I set `CYGWIN="noglob"`, otherwise braces are removed from expression `--template {rev}`, see https://sourceware.org/legacy-ml/cygwin/2011-11/msg00225.html
Now I face the same issue with MSYS2: `hg` is a Python script so Windows apps (фтв ТЕ Уьфсі ші) cannot directly call it... What would you do to marry NT Emacs and MSYS2?
github-alphapapa · 2022-12-23 18:02
This seems like an interesting question, but a bit hard to understand. You might be more likely to get answers if you add more explanation for those who aren't as familiar with the details.
gavenkoa · 2022-12-23 18:19
NT Emacs is able to invoke `.exe` or `.bat` files, not Bash or Python scripts from MSYS.
Mercurial comes as a Python script in MSYS so Windows Emacs cannot call it.
Wrapper with batch file (`hg.bat` with `c:\msys64\usr\bin\python3 /usr/bin/hg "$@"`) damages arguments enough (quoting??) so Emacs VC mode cannot work with it,
I have a C program for Cygwin which I used as a wrapper in the past. I wonder if there are any attempts to befriend NT Emacs & MSYS2 other way around.
**PS** Lots of projects create wrapper which are re-calling executables, to workaround Windows stupidity, for example Scoop package manager has so called shims: https://github.com/ScoopInstaller/Shim
github-alphapapa · 2022-12-25 17:12
Thanks, that's a good explanation. :)
If you can't find answers here, you might ask on gnu-emacs-help or emacs-devel.