From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs 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 Message-ID: <87a6auzcp5.fsf@melete.silentflame.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27350"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.36 Emacs/29.0.50 (x86_64-pc-linux-gnu) To: Massimiliano Mirra , 48716@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 03 04:47:17 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwxLH-0006q1-I1 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jun 2022 04:47:16 +0200 Original-Received: from localhost ([::1]:55372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwxLF-0006S0-RX for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jun 2022 22:47:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwxL4-0006RI-O0 for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 22:47:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60961) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwxL4-000675-EZ for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 22:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwxL4-0008VO-AM for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 22:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jun 2022 02:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48716 X-GNU-PR-Package: emacs Original-Received: via spool by 48716-submit@debbugs.gnu.org id=B48716.165422439132656 (code B ref 48716); Fri, 03 Jun 2022 02:47:02 +0000 Original-Received: (at 48716) by debbugs.gnu.org; 3 Jun 2022 02:46:31 +0000 Original-Received: from localhost ([127.0.0.1]:54858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwxKY-0008Ue-RI for submit@debbugs.gnu.org; Thu, 02 Jun 2022 22:46:31 -0400 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:36069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwxKR-0008UK-5V for 48716@debbugs.gnu.org; Thu, 02 Jun 2022 22:46:29 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 0F26E3200909; Thu, 2 Jun 2022 22:46:16 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 02 Jun 2022 22:46:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1654224376; x=1654310776; bh=fkdHYXPuVp VTJDuIWw0C4CiGjXm9Mif5ljhsWRYUUcY=; b=V+7eaFrahwGts9V6DaeEC06++9 M7Y2PToKVCD7yFncJ7ZTzX8bpjDcvhj8O0apXOdG6d4A7j7yVBMA6/xWWsMFpEIn k8jl5ZfMNqW15h+Sh3f0cUUYHSjKLrioc8KBI4KBTesY87Eagi+neQMQoO4WgW+D 3Jin2hp2dRtDVQKnbUWcP5g5iNsbElVzqst8V0ZJct5sPp1K5iaTbKSuWGsOHPEB 196dHzdy+vjvpmcihtGbnznoccZKgBVpj9MUg9Ho74T7jKKzA4RF1HmQQG9ZXfmM cQs0FwLMgKTkQc9VmVBNEG3MLvRMaC4kJn8FAErEyOpezL3CAe7j5lZ7oO/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1654224376; x=1654310776; bh=fkdHYXPuVpVTJDuIWw0C4CiGjXm9 Mif5ljhsWRYUUcY=; b=WqAiptQFAZ4Fw1dgQoie3Tp4/xMpFfihCr7XAmmiGFyt mQq0g+l0CmpKqrSIqDBWBIUAlXZmvH82OQcm43f82+0TW8CD3s1GSnAbAtS1/971 ESJw/GnpYtkbLQm0PvOZy1EpyRE86Tc7mVnWvhM1/vaj4ooXtJujJ7j1vOgb83qS BZ3dSIky7Cof8GVsPU/FdwX0tB4jDE/JN6IMslTj7MSYdQNHVyA/1tysbfHijTf3 HcJLjstrZ9b+G9JLhSOaNENwnp5X04NLxVVneFRYg1uIbpLYh15dM8rGUy4efbb8 i+kk7/8ZdeXao1VCaet400DQTLAkfystNU1APxIIGw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrleehgdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufgjfhgffffkgggtsehttddttd dtredtnecuhfhrohhmpefuvggrnhcuhghhihhtthhonhcuoehsphifhhhithhtohhnsehs phifhhhithhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepleeggefgvdeijedvhf dugfegtefgkeekueeileejjeehudeggeefteeghfeuffeknecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhih htthhonhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Jun 2022 22:46:16 -0400 (EDT) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id 548557E3A7F; Thu, 2 Jun 2022 19:46:15 -0700 (MST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233576 Archived-At: 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