From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#48399: 27.2; term-mode: After splitting window, newlines are inserted Date: Tue, 12 Jul 2022 15:13:22 +0200 Message-ID: <87pmiascct.fsf@miha-pc> References: <87o7xvsocm.fsf@gnus.org> <87czebg0if.fsf@gmail.com> <878rozsla3.fsf@web.de> <871quqsef6.fsf@gnus.org> Reply-To: miha@kamnitnik.top Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38409"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Robert Pluim , Khoa Vo , 48399@debbugs.gnu.org To: Lars Ingebrigtsen , Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 12 15:27:35 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 1oBFvL-0009pb-64 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jul 2022 15:27:35 +0200 Original-Received: from localhost ([::1]:56356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFvJ-00027P-Oq for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jul 2022 09:27:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFWc-00021o-RD for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2022 09:02:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBFWc-0007Dd-BA for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2022 09:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBFWc-0001Vc-7n for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2022 09:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: miha@kamnitnik.top Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jul 2022 13:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48399 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 48399-submit@debbugs.gnu.org id=B48399.16576309115781 (code B ref 48399); Tue, 12 Jul 2022 13:02:02 +0000 Original-Received: (at 48399) by debbugs.gnu.org; 12 Jul 2022 13:01:51 +0000 Original-Received: from localhost ([127.0.0.1]:41895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBFWR-0001VB-7V for submit@debbugs.gnu.org; Tue, 12 Jul 2022 09:01:51 -0400 Original-Received: from kamnitnik.top ([209.250.245.214]:38708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBFWO-0001V0-3D for 48399@debbugs.gnu.org; Tue, 12 Jul 2022 09:01:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1657630905; bh=M22has/yiVV4JVGtQy0pZNNbSPNbXzYvF8rlmt0YV4g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=guDgp3qzlG8jNfKM5mNWc6/GU+VwiWefRTCymGPfBwnsUCd3P+Jp7E5P4UZbT7y95 ZWrJNeB1Y2doz2Ly27nu3vteaiPZH4pcJCwKZSikJatL4DLWQECPq8y5P/STD0hYaH aH4tPTR1WRyqer/5hqZ1eIDNp965MbIo6UEYWkLw/gjxA+EFcn3EIA2N26M0qH8kPr Q69MeppKZPjlnYH91uvrEOyEJX0YGHdSD82MkopELGCKMQ3dBiJy49a3WpY78wBq97 VhISZtUXKt22xEZHn0v6CHmjkak4Ixny8QK4KVVjHakpViFVw1urUtyYKiH5wEqcHd 3LJp/E/yqcxjw== In-Reply-To: <871quqsef6.fsf@gnus.org> 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:236768 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Michael Heerdegen writes: > >> Happens even without C-n: >> >> M-x term >> C-c C-j >> ls >> C-x 2 ;; a linefeed between prompt and "ls" in inserted >> C-x 1 ;; another one is inserted > > Thanks. I've had a brief look at term.el to see what could be causing > this -- I wondered whether it might be a window change hook or > something, but that doesn't seem to be the case. > > It seems to be happening non-synchronously -- sometimes the extra > newline isn't added until half a second passes, so perhaps it's > something that happens during communication between the shell and Emacs. > > I'm pretty unfamiliar with the term.el code. Anybody know where to > start poking? When a term.el window is resized, emacs sends a SIGWINCH to it's process. Bash seems to output some spaces newlines upon receiving a SIGWINCH. In an ordinary terminal emulator, these spaces have the effect of clearing bash's readline display and they aren't really visible to the user. In term.el, however, they are inserted before the "ls" that the user has input (this "ls" is input in term-line-mode, which means that bash isn't aware of it yet, until the user presses RET). --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmLNc3ITHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP2HzD/0f127aDvylVBp+yL8IKSBj0XqwPsvX Jv52Y+tydibAAxmAk8rJiiuFZ3mOHIYO8SBwTYq2vCH+nQ+Y0aLq53iDe9BqClen 1j6jTmpmb3T3i5oqOpqIC+d6Z/KmbRRea5HdHs+OypHDqyalT8QO6Zy2dekIHmLi wx4Ti78u3YWMLE2u+epzOxoBuvNT0QBpx64y4Do3w/s7oHcQiZ9SAotm8XGcwfhd QrpQT69wueXxjMIwb3l2i64XKraiMUrjw7OKC5gvYdpGcVDi0EjdkcjqTFM7hz1T E+dgFiLtlfVtLq4fSxAK91AUGr8w/WdcMeEhmebSpxsJzUszype58LYl5FqSwr0j GCffWhKG+7s+vILLUDWxrVVJyIB7nogWJ1DcsxhHzQIxjBaKRdbgp9kvslud7/ip omnamw++sUkUpNz3CNLg9fuprEIIHihWSYtf2uNdScBcFEd2DvvRwuLfiXfLS39t 3sj71gsMQK3pw4NzWFmIJjURveUIit/tsOWBCVBG/HyJKazaxJXbp5snNxmEX2VQ dT/mqF9803h+X78qMhWWGJwefUsJKGw0UTHc/FFYt7EOuRffJRKs+fCPkHooZIec hiYYM0FZ7dSgaZmiofTv5JWiBQYiTT01uejuah1a9hs0v9ILjR9oTxV4AxT9NfP1 sdymr2ym4pStkQ== =GLVl -----END PGP SIGNATURE----- --=-=-=--