Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs: standard input is not a tty

I want to use emacs in git bash, but when I run:

emacs -nw file.c

It gives me some error saying:

emacs: standard input is not a tty

However When I run the same command to open a file in cmd(Windows Terminal) it works fine

like image 596
Juned Khan Avatar asked Sep 18 '25 01:09

Juned Khan


1 Answers

Considering that emacs.exe (Windows native) would talk to the console TTY, not mingW tty, you can try:

winpty emacs  -nw file.c

That would be compatible with your git bash session.

As noted by daveloyall in the comments:

For msys2 users, install winpty first with:

$ pacman -S msys/winpty

For Git for Windows users, winpty.exe is already there in C:\Program Files\Git\usr\bin.

like image 61
VonC Avatar answered Sep 20 '25 17:09

VonC