I've been building and running Emacs 25 prereleases on a recent Fedora system that I usually access via ssh. I usually run this emacs in a terminal, and I'm fond of using ansi-term inside it.
I've noticed something frustrating when using ansi-term sessions inside this emacs 25-in-a-terminal-ansi-term: newlines generated by the shell in ansi-term often get eaten, particularly when I use readline interaction in the sub-terminal.
$ emacs -Q -nw # either over ssh or in a virtual terminal in an X environment M-x ansi-term <enter> <enter> # runs /bin/bash for me <ansi-term prompt> $ ls # works fine # normal ls output, newlines intact <ansi-term prompt> $ <ctrl-r> l s <enter> # r-search, causes problem # output rendered on same line, followed by prompt overwriting the output
I diagnose the problem as emacs rendering all of the newlines from the shell as \r.
ctrl-l inside the terminal seems to fix this, and I don't believe I've seen it happen unless I use the readline commands in bash.
I didn't notice this in Emacs 24.5, which is what I used prior to this. I'm currently on emacs-25.0.93 and have been following development some to see if this is fixed.
I'm not able to reproduce it without -nw (i.e. in an X frame of emacs); things work as expected.
It's a fiddly, specific case, but it's something that I affects me and I don't know enough about comint and emacs internals to diagnose myself. Any thoughts?
Edit: solved! I built a newer version and it works. Didn't bisect for the changeset. Thanks, folks.