I'm trying to run QGIS from the command-line on Windows. QGIS provides a batch file for this, "C:\Program Files\QGIS 3.20.3\bin\qgis.bat". When I run this from within Emacs shell, the load hangs when QGIS tries to load it's Python interpreter.
To reproduce, start a new shell in Emacs with M-x shell and call "C:\Program Files\QGIS 3.20.3\bin\qgis.bat". If instead you first call start (to load a new prompt) and then call "C:\Program Files\QGIS 3.20.3\bin\qgis.bat" in that, QGIS loads.
Looking at qgis.bat, it calls several other batch files and also sets many environment variables. My guess is that some necessary variables aren't set when called directly from shell.
Is there a way to call the batch directly from Emacs shell so that QGIS loads?
M-x shellin emacs, I'm in bash. What are you in?cmd /C qgis.batat the shell prompt would do it, but likely you still will get the popped up cmd window. GNU Emacs 29.0.50 (build 1, x86_64-w64-mingw32) of 2021-10-12 Windows 10 Procmd. I'm not running from MSYS2 or Cygwin or mingw.explicit-shell-file-nameorshell-file-nametocmd.exe? Because otherwise, you are not at the DOS prompt. You are in a shell produced by Emacs'cmdproxy.exe.shell-file-nameis"C:/emacs-27.1-x86_64/libexec/emacs/27.1/x86_64-w64-mingw32/cmdproxy.exe". (I guess at some level I am running mingw).startis just runningcmd.exeand that's why it works.