GNU bug report logs - #48716
28.0.50; Spurious output from term-emulate-terminal when in line-mode

Previous Next

Package: emacs;

Reported by: Massimiliano Mirra <hyperstruct <at> gmail.com>

Date: Fri, 28 May 2021 15:13:01 UTC

Severity: normal

Found in version 28.0.50

Full log


Message #8 received at 48716 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Massimiliano Mirra <hyperstruct <at> gmail.com>, 48716 <at> debbugs.gnu.org
Subject: Re: bug#48716: 28.0.50; Spurious output from term-emulate-terminal
 when in line-mode
Date: Thu, 02 Jun 2022 19:46:14 -0700
Hello,

On Fri 28 May 2021 at 04:00PM +01, Massimiliano Mirra wrote:

> Spurious output is occasionally produced when running a command
> with `make-term', and the command performs cursor movements and
> partial screen clears.
>
> [...]
>
> The culprit appears to be following lines from `term-emulate-terminal'
> in term.el; commenting them out fixes this problem:
>
>    (when (and (> (point-max) (process-mark proc))
>       (term-in-line-mode))
>      (narrow-to-region (point-min) (process-mark proc)))

The code assumes anything after the process mark is prospective input,
which is very often going to be wrong when the command moves the cursor
-- even if the command just emits \r.  One way to fix this might be to
add text properties to actual output, thereby distinguishing it from
something the user has typed.

-- 
Sean Whitton




This bug report was last modified 3 years and 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.