GNU bug report logs - #60966
30.0.50; Emacs -nw on msys2 is not clearing the terminal

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Fri, 20 Jan 2023 16:41:02 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Ergus <spacibba <at> aol.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "60966 <at> debbugs.gnu.org" <60966 <at> debbugs.gnu.org>
Subject: Re: bug#60966: 30.0.50; Emacs -nw on msys2 is not clearing the
 terminal
Date: Mon, 23 Jan 2023 22:45:15 +0000 (UTC)
[Message part 1 (text/plain, inline)]
 Hi Eli:

Thanks, now I understand the problem... it is a bit weird, but OK.
Today I also tried the nt/INSTALL.64 steps and somehow I got an issue about #include <ms-w32.h>: No such file or directory.
I repeated the steps in the guide carefully but I only get the same error after make.
---------------------------------
In file included from ../src/config.h 3043
../../source/lib/../src/conf_post.h:38:11: fatal error: ms-w32.h: No such file or directory   38 | # include <ms-w32.h>        |compilation terminated
----------------------------------
Any idea? I am using the mingw64 terminal to build as the guide says... so maybe there is anything wrong in my envirnment?
Thanks in advance,Ergus


    On Friday, January 20, 2023 at 08:17:23 PM GMT+1, Eli Zaretskii <eliz <at> gnu.org> wrote:  
 
 > Date: Fri, 20 Jan 2023 17:40:17 +0100
> From:  Ergus via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 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.
  
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 109 days ago.

Previous Next


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