From: Sean Whitton <spwhitton@spwhitton.name>
To: Massimiliano Mirra <hyperstruct@gmail.com>, 48716@debbugs.gnu.org
Subject: bug#48716: 28.0.50; Spurious output from term-emulate-terminal when in line-mode
Date: Thu, 02 Jun 2022 19:46:14 -0700 [thread overview]
Message-ID: <87a6auzcp5.fsf@melete.silentflame.com> (raw)
In-Reply-To: <CABoBKutFT14vp9eZAsqaAgn5D0AN02rR8cTQ3ZdUu6bkDq6RCA@mail.gmail.com>
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
prev parent reply other threads:[~2022-06-03 2:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 15:00 bug#48716: 28.0.50; Spurious output from term-emulate-terminal when in line-mode Massimiliano Mirra
2022-06-03 2:46 ` Sean Whitton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a6auzcp5.fsf@melete.silentflame.com \
--to=spwhitton@spwhitton.name \
--cc=48716@debbugs.gnu.org \
--cc=hyperstruct@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).