bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13350: 24.2; term.el is confused when bash prints almost 4096 bytes


From: npostavs
Subject: bug#13350: 24.2; term.el is confused when bash prints almost 4096 bytes
Date: Wed, 28 Dec 2016 21:20:38 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

tags 13350 patch
quit

Johan Claesson <address@hidden> 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).

Attachment: v1-0001-Fix-term.el-handling-of-Z-sequences-spanning-chun.patch
Description: patch


reply via email to

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