tags 13350 patch quit Johan Claesson writes: > emacs -Q > M-x ansi-term > /bin/bash > cd /tmp > printf '%4090s' x > > On my system this gives the error message: > > error in process filter: No such directory found via CDPATH environment variable > > I think the following is happening: > > - Bash will after each command send ?\032 and the current directory > "/tmp" to inform term.el. > - Bash output is buffered in 4096 bytes chunks. The end of the first > chunk will be "/tm" > - term.el interprets "/tm" as the current directory and tries to cd > there. Since /tm does not exist it signals an error. > Yes, by doing M-x trace-function RET term-emulate-terminal RET, it's easy to see the chunking. > I don't know if this buffer size of 4096 varies from system to system. > In that case maybe the above recipe will not trigger the error on all > systems. > I needed to use printf '%4088s' x, not sure why the difference. > The following term.el patch is an attempt to fix this: Patch looks good. I will push to master in a week or so, unless there are objections (I added a commit message, see attached).