I'm using mintty + msys. And I want to use emacs with it. But without GUI.
I saw such behavior in cygwin. But I can not understand how they did that.
$ emacs -nw
emacs: standard input is not a tty
$ stty.exe -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = ^Z; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -tostop echoctl echoke
$ echo $TERM
xterm
Mintty is a terminal emulator for Cygwin with a native Windows user interface and minimalist design. Its terminal emulation is largely compatible with xterm, but it does not require an X server.
You should use winpty:
winpty emacs -nw
winpty is a Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs. The package consists of a library (libwinpty) and a tool for Cygwin and MSYS for running Windows console programs in a Cygwin/MSYS pty.
Emacs in your case is actually "Windows console program".
If you want to use tty emacs with mintty, you will probably need to use cygwin's emacs. The native win32 emacs wants to talk to a Windows console window, not to an actual tty -- the error message is misleading here.
Another alternative, if you want to stick with the native win32 emacs, is to use ConEmu, rather than mintty. It gives a compatible Windows console interface while also providing all the niceties of a normal terminal emulator like mintty.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With