From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60966: 30.0.50; Emacs -nw on msys2 is not clearing the terminal Date: Fri, 20 Jan 2023 21:17:07 +0200 Message-ID: <83lelxm2x8.fsf@gnu.org> References: <87v8l1p3bi.fsf.ref@aol.com> <87v8l1p3bi.fsf@aol.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8549"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60966@debbugs.gnu.org To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 20 20:18:16 2023 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 1pIwtz-00023c-Rh for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Jan 2023 20:18:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIwto-0006tU-6a; Fri, 20 Jan 2023 14:18:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIwtm-0006tK-Dv for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 14:18:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIwtl-0002Q7-P6 for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 14:18:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIwtl-0005wg-JQ for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 14:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jan 2023 19:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60966 X-GNU-PR-Package: emacs Original-Received: via spool by 60966-submit@debbugs.gnu.org id=B60966.167424224722811 (code B ref 60966); Fri, 20 Jan 2023 19:18:01 +0000 Original-Received: (at 60966) by debbugs.gnu.org; 20 Jan 2023 19:17:27 +0000 Original-Received: from localhost ([127.0.0.1]:47129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIwtC-0005vr-KZ for submit@debbugs.gnu.org; Fri, 20 Jan 2023 14:17:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIwtA-0005ve-OM for 60966@debbugs.gnu.org; Fri, 20 Jan 2023 14:17:25 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIwst-0002L7-V7; Fri, 20 Jan 2023 14:17:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6DCFSTweQ4PfA08qW6uRjpYQtSlsYJ+OnmUUm/S9Dwc=; b=NSlQx03G1fpa vlreeob1j4P60kDiuAQQp/bB09fH9mEJdyJlP4M5Du9Mb/agNqpMsmOFBBi+Oa40GLLAQKKEo3F44 6VQF5SPJsUZ76dAMJPK6/t6n5q23al/E79HtwEvjAtnOVjGbJCiNYnDZI5I2MGF62uOY2ej2rnBSl 7sa/0nVOCWiNi5m8ZYuo2ysrDk/XkM1ezq9vDgJhleZjs5T/3eOHiZwHOtYRdX4381rtkVufD+bH1 ETDKR97KHBHS8HJddmeF8wC/9ZMJGG9t4RkNUp4WSwDDuzfBB48NMaTvGyKkCH/+EEjBvmK+M9XPW 6+wQsTWAddzPJwt4yZ6wpw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIwsr-0001hO-Sf; Fri, 20 Jan 2023 14:17:06 -0500 In-Reply-To: <87v8l1p3bi.fsf@aol.com> (bug-gnu-emacs@gnu.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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253793 Archived-At: > Date: Fri, 20 Jan 2023 17:40:17 +0100 > From: Ergus via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Very recently I have built emacs on MS-Win...10 (please don't ask > why). I used msys2 and followed this guide which seems to be very clear > and simple: > > https://gist.github.com/nauhygon/f3b44f51b34e89bc54f8 > > After the build and installation, everything seemed > correctly. runemacs.exe works as expected... and in gui it works fine (a > bit slow to start... but maybe that is not so important now) > > However, when I tried: > > emacs -nw -Q > > I found that emacs was not clearing the terminal on startup. What is "the terminal" from which you invoke "emacs -nw"? You should invoke it from cmd.exe (a.k.a. "Command Prompt") window, not from the MSYS2 mintty terminal. > So, emacs is apparently starting correctly (status-line is visible > and cursos), but the previous text is still on the screen > overlapping with emacs and making it unusable. If opening a file, > the file content is inserted bellow the old text, truncating the > head of the file, but the cursor can move up to the top. > > Moving the cursor down (off the screen) the screen scrolls the file > content, but the old text stays fix. > > After C-x C-c, emacs exists "correctly" but in this case the terminal is > actually cleared (Like C-l usually do). Which somehow is not intended, > because the terminal is expected to be recovered to it's previous > status right? > > All this was with the current master and the emacs-29 branch. Emacs isn't that badly broken on Windows, including in -nw sessions. You should invoke it as a native Windows application, from the Command Prompt window, not as an MSYS2 application.