reddit / emacs

term and ansi-term on windows

kitcarson03 · 2022-12-14 18:09
Hi, it's a while i'm trying to make the native version of emacs in windows (not the cygwin one) run term or ansi-term but i always get the "spawning child process: invalid argument". i know that using the cygwin version solve this problem but it has other disadvantages. Do you know any solution or a workaround to this issue? EDIT: maybe it'll turn out i'm entering the wrong path or something else but [https://www.masteringemacs.org/article/running-shells-in-emacs-overview](https://www.masteringemacs.org/article/running-shells-in-emacs-overview) suggest that "out-of-the-box" term and ansi-term don't work in windows. my question could also be "how can i make them work"?
MitchellMarquez42 · 2022-12-14 20:09
!remindme 12hrs
RemindMeBot · 2022-12-14 20:10
I will be messaging you in 12 hours on [**2022-12-15 08:09:21 UTC**](http://www.wolframalpha.com/input/?i=2022-12-15%2008:09:21%20UTC%20To%20Local%20Time) to remind you of [**this link**](https://www.reddit.com/r/emacs/comments/zlxy7s/term_and_ansiterm_on_windows/j08b4by/?context=3) [**CLICK THIS LINK**](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fzlxy7s%2Fterm_and_ansiterm_on_windows%2Fj08b4by%2F%5D%0A%0ARemindMe%21%202022-12-15%2008%3A09%3A21%20UTC) to send a PM to also be reminded and to reduce spam. ^(Parent commenter can ) [^(delete this message to hide from others.)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete%20Comment&message=Delete%21%20zlxy7s) ***** |[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remindmebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside%20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Your Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](https://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot%20Feedback)| |-|-|-|-|
7890yuiop · 2022-12-14 22:16
Which program are you trying to run in the terminal? Have you confirmed whether you have that program installed? If it's not an absolute filename then the `PATH` inherited by Emacs (see `process-environment`) must include the relevant directory.
hangingpawns · 2022-12-14 22:36
term and ansi-term expect bash or zsh or something like that.. for example, if I do ansi-term, it expects /bin/bash in the path. Naturally, Windows doesn't have /bin/bash, so what do you want emacs to run instead?
kitcarson03 · 2022-12-15 09:17
in case you're not being rethorical, either cmd or powershell are ok
hangingpawns · 2022-12-15 15:38
PowerShell is a terminal emulator, not a shell like bash. PowerShell runs a shell, but is not a shell.