emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs, MSYS2 bash and term mode


From: Eli Zaretskii
Subject: Re: Emacs, MSYS2 bash and term mode
Date: Fri, 07 Apr 2017 15:43:04 +0300

> From: Fabrice Popineau <address@hidden>
> Date: Fri, 7 Apr 2017 12:02:03 +0200
> 
> Currently, it seems that no terminal emulator runs the msys2 bash under a 
> mingw64 emacs.
> I am reporting against emacs 25.2.
> My findings up to now :
> - "/bin/sh" is hardwired in lisp/term.el whereas the full windows path to 
> bash.exe has to be given in
> term-exec-1
> - the command that is run in term-exec-1 is built by :
> (apply 'start-process name buffer
> (getenv "SHELL") "-c"
> (format "stty -nl echo rows %d columns %d sane 2>/dev/null;\
> if [ $1 = .. ]; then shift; fi; exec \"address@hidden""
> term-height term-width)
> ".."
> command "-i" switches)))
> 
> I had to add the "-i" option to bash.exe, else bash won't communicate with 
> emacs
> 
> - the stty seems to be ignored by bash, anyway the buffer doesn't get proper 
> cr
> - term.el tries to track the current directory and calls the cd function with 
> msys2 paths. This obviously fails
> because emacs being mingw64 emacs expects windows paths.
> 
> Did anybody manage to run term.el with the msys2 bash from a windows emacs ?

I suggest not to waste your time: term.el assumes the communications
between the shell and Emacs are via a pty (otherwise, the shell won't
behave as if it displays on a terminal), while on Windows the only
method of communicating with subprocesses is via pipes.  That's why,
for example, the shell ignores stty.  More generally, that's why
term.el will never work on anything non-Posix.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]