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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60966 in the body.
You can then email your comments to 60966 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#60966; Package emacs. (Fri, 20 Jan 2023 16:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ergus <spacibba <at> aol.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 20 Jan 2023 16:41:02 GMT) Full text and rfc822 format available.

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

From: Ergus <spacibba <at> aol.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Emacs -nw on msys2 is not clearing the terminal
Date: Fri, 20 Jan 2023 17:40:17 +0100
Hi:

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. 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.

(I report this from a different emacs, so ignore the rest of the
auto-inserted information)


In GNU Emacs 30.0.50 (build 7, x86_64-pc-linux-gnu, GTK+ Version
 3.24.36, cairo version 1.17.6) of 2023-01-05 built on Ergus
Repository revision: 15fc7b3cde92e420f48dfe188251e6af4d832af5
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json
 --with-x-toolkit=gtk3 --with-xft --with-modules --with-cairo
 --with-harfbuzz --with-native-compilation
 '--program-transform-name=s/^ctags$/ctags.emacs/''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-auto-revert-mode: t
  electric-pair-mode: t
  flyspell-mode: t
  company-mode: t
  flycheck-mode: t
  diff-hl-margin-mode: t
  gtags-mode: t
  repeat-mode: t
  xterm-mouse-mode: t
  xclip-mode: t
  override-global-mode: t
  winner-mode: t
  save-place-mode: t
  delete-selection-mode: t
  savehist-mode: t
  global-display-fill-column-indicator-mode: t
  display-fill-column-indicator-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  which-key-mode: t
  eldoc-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/mnt/casa/gits/emacs_clones/gtags-mode/gtags-mode hides /home/ergo/.config/emacs/elpa/gtags-mode-1.0/gtags-mode
/home/ergo/.config/emacs/elpa/transient-20230107.1528/transient hides /home/ergo/.local/share/emacs/30.0.50/lisp/transient

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny rfc822
mml mml-sec epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils autorevert filenotify ffap
thingatpt url-parse auth-source password-cache url-vars elec-pair
flyspell-correct flyspell ispell company-semantic company-template
company-capf company flycheck ansi-color json map find-func dash pcase
diff-hl-margin diff-hl-dired dired-x dired dired-loaddefs diff-hl
log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode cape compat
comp comp-cstr warnings icons rx gtags-mode subr-x files-x xref project
term/tmux term/xterm xterm init repeat xt-mouse xclip edmacro kmacro
use-package-bind-key bind-key simple-16-theme winner ring saveplace
delsel savehist easy-mmode display-fill-column-indicator
display-line-numbers diminish which-key cl-extra help-mode
use-package-diminish use-package-core disp-table info
dumb-jump-autoloads highlight-indent-guides-autoloads
company-lua-autoloads systemd-autoloads yasnippet-snippets-autoloads
vundo-autoloads sudo-edit-autoloads cuda-mode-autoloads
nginx-mode-autoloads crdt-autoloads company-auctex-autoloads
groovy-mode-autoloads flycheck-rust-autoloads
string-inflection-autoloads company-c-headers-autoloads
protobuf-mode-autoloads lice-autoloads lorem-ipsum-autoloads
nasm-mode-autoloads web-mode-autoloads caml-autoloads popup-autoloads
magit-autoloads cmake-mode-autoloads company-nginx-autoloads
d-mode-autoloads i3wm-config-mode-autoloads languagetool-autoloads
request-autoloads ssh-config-mode-autoloads move-dup-autoloads
clang-format-autoloads esup-autoloads dired-sidebar-autoloads
gnuplot-autoloads phi-search-autoloads better-shell-autoloads
fancy-compilation-autoloads arduino-cli-mode-autoloads
flycheck-julia-autoloads which-key-autoloads evil-collection-autoloads
annalist-autoloads multiple-cursors-autoloads ibuffer-sidebar-autoloads
cape-autoloads git-commit-autoloads with-editor-autoloads
pkgbuild-mode-autoloads neotree-autoloads modern-cpp-font-lock-autoloads
company-reftex-autoloads dired-subtree-autoloads
dired-hacks-utils-autoloads git-modes-autoloads flymake-nasm-autoloads
arduino-mode-autoloads ede/auto eieio-base cl-seq eieio byte-opt
bytecomp byte-compile eieio-core cl-macs gv cl-loaddefs cl-lib
sphinx-mode-autoloads f-autoloads diff-hl-autoloads lua-mode-autoloads
gtags-mode-autoloads mutt-mode-autoloads xclip-autoloads
diminish-autoloads imenu-list-autoloads paradox-autoloads
avy-zap-autoloads nftables-mode-autoloads csv-mode-autoloads
ibuffer-vc-autoloads objed-autoloads iedit-autoloads
vterm-toggle-autoloads avy-autoloads git-timemachine-autoloads
transient-autoloads vterm-autoloads auctex-autoloads tex-site
slime-autoloads emamux-autoloads flymake-quickdef-autoloads
ibuffer-project-autoloads julia-mode-autoloads haskell-mode-autoloads
shell-command+-autoloads notmuch-autoloads e2ansi-autoloads
face-explorer-autoloads flycheck-autoloads tree-sitter-langs-autoloads
tree-sitter-autoloads tsc-autoloads pkg-info-autoloads flx-autoloads
opencl-mode-autoloads ptemplate-templates-autoloads ptemplate-autoloads
yasnippet-autoloads company-web-autoloads web-completion-data-autoloads
ibuffer-tramp-autoloads debbugs-autoloads cobol-mode-autoloads
company-autoloads macrostep-autoloads flyspell-correct-autoloads
epl-autoloads deadgrep-autoloads spinner-autoloads s-autoloads
evil-autoloads goto-chg-autoloads vdiff-autoloads hydra-autoloads
lv-autoloads magit-section-autoloads dash-autoloads compat-autoloads
early-init rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 200641 35160)
 (symbols 48 15619 0)
 (strings 32 50917 7549)
 (string-bytes 1 1785762)
 (vectors 16 27252)
 (vector-slots 8 498229 36899)
 (floats 8 114 1017)
 (intervals 56 948 0)
 (buffers 984 12))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60966; Package emacs. (Fri, 20 Jan 2023 19:18:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ergus <spacibba <at> aol.com>
Cc: 60966 <at> debbugs.gnu.org
Subject: Re: bug#60966: 30.0.50;
 Emacs -nw on msys2 is not clearing the terminal
Date: Fri, 20 Jan 2023 21:17:07 +0200
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60966; Package emacs. (Mon, 23 Jan 2023 22:46:01 GMT) Full text and rfc822 format available.

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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60966; Package emacs. (Tue, 24 Jan 2023 13:17:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ergus <spacibba <at> aol.com>
Cc: 60966 <at> debbugs.gnu.org
Subject: Re: bug#60966: 30.0.50; Emacs -nw on msys2 is not clearing the
 terminal
Date: Tue, 24 Jan 2023 15:16:46 +0200
> Date: Mon, 23 Jan 2023 22:45:15 +0000 (UTC)
> From: Ergus <spacibba <at> aol.com>
> Cc: "60966 <at> debbugs.gnu.org" <60966 <at> debbugs.gnu.org>
> 
> Thanks, now I understand the problem... it is a bit weird, but OK.

Please tell what you understood and what you think is weird.  I'd like
to make sure there's no misunderstanding here.

> 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

Please show the full compilation command, it sounds like some compiler
switches might be missing.  You can request display of full commands
during the build if you say

   make V=1

The configure script arranges for MinGW builds to add the -I../nt/inc
option to the compilation command line, which is where the ms-w32.h
header lives.

> Any idea? I am using the mingw64 terminal to build as the guide says... so maybe there is anything wrong in
> my envirnment?

If the above doesn't help, tell me how you configured the build: which
configure command you used and in whether your build is in the source
directory or outside of it.  Also, if you previously did another build
in the same tree, you need to clean the tree ("make extraclean").




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60966; Package emacs. (Tue, 24 Jan 2023 15:25:01 GMT) Full text and rfc822 format available.

Message #17 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
Subject: Re: bug#60966: 30.0.50; Emacs -nw on msys2 is not clearing the
 terminal
Date: Tue, 24 Jan 2023 16:24:29 +0100
On Tue, Jan 24, 2023 at 03:16:46PM +0200, Eli Zaretskii wrote:
>> Date: Mon, 23 Jan 2023 22:45:15 +0000 (UTC)
>> From: Ergus <spacibba <at> aol.com>
>> Cc: "60966 <at> debbugs.gnu.org" <60966 <at> debbugs.gnu.org>
>>
>> Thanks, now I understand the problem... it is a bit weird, but OK.
>
>Please tell what you understood and what you think is weird.  I'd like
>to make sure there's no misunderstanding here.
>
Hi Eli:

It is just a bit weird that emacs shouldn't be called from within the
msys terminal, maybe a warning message or something may help here. It is
not terrible, just a bit confusing.

>> 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
>
>Please show the full compilation command, it sounds like some compiler
>switches might be missing.  You can request display of full commands
>during the build if you say
>
>   make V=1
>
>The configure script arranges for MinGW builds to add the -I../nt/inc
>option to the compilation command line, which is where the ms-w32.h
>header lives.

I tried this and I see that the -I line is added correctly, but the
directory where I am building is inside 'Documents and Settings' which
has spaces and I don't see any quote or \ escape.

gcc -c -mtune=generic -DUSE_CRT_DLL=1 -I /c/Documents and
Settings/T008593/Downloads/emacs/build/../source/nt/inc -mtune=generic
-MMD -MF deps/fingerprint.d -MP -g3 -O2 -gdwarf-2 -I. -I../src
-I../../source/lib -I../../source/lib/../src -DGL_COMPILE_CRYPTO_STREAM
-o fingerprint.o ../../source/lib/fingerprint.c

So, probably is this the problem??

>> Any idea? I am using the mingw64 terminal to build as the guide says... so maybe there is anything wrong in
>> my envirnment?
>
>If the above doesn't help, tell me how you configured the build: which
>configure command you used and in whether your build is in the source
>directory or outside of it.  Also, if you previously did another build
>in the same tree, you need to clean the tree ("make extraclean").

Just to mention, the build is outside of sources. I made all the clean
as usual like on GNU/Linux.

Thanks,
Ergus




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60966; Package emacs. (Tue, 24 Jan 2023 16:58:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ergus <spacibba <at> aol.com>
Cc: 60966 <at> debbugs.gnu.org
Subject: Re: bug#60966: 30.0.50; Emacs -nw on msys2 is not clearing the
 terminal
Date: Tue, 24 Jan 2023 18:57:54 +0200
> Date: Tue, 24 Jan 2023 16:24:29 +0100
> From: Ergus <spacibba <at> aol.com>
> Cc: 60966 <at> debbugs.gnu.org
> 
> It is just a bit weird that emacs shouldn't be called from within the
> msys terminal, maybe a warning message or something may help here. It is
> not terrible, just a bit confusing.

Maybe you should ask mintty developers to look into this?  No one
never asked Emacs to support mintty on Windows.  But then almost no
one uses the -nw sessions on Windows (why would you want to?).

> gcc -c -mtune=generic -DUSE_CRT_DLL=1 -I /c/Documents and
> Settings/T008593/Downloads/emacs/build/../source/nt/inc -mtune=generic
> -MMD -MF deps/fingerprint.d -MP -g3 -O2 -gdwarf-2 -I. -I../src
> -I../../source/lib -I../../source/lib/../src -DGL_COMPILE_CRYPTO_STREAM
> -o fingerprint.o ../../source/lib/fingerprint.c
> 
> So, probably is this the problem??

Yes.  Feel free to suggest a patch for configure.ac that would quote
the names.  Better yet, don't build Emacs inside directories with
whitespace in their names ;-)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60966; Package emacs. (Tue, 31 Jan 2023 16:56:01 GMT) Full text and rfc822 format available.

Message #23 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
Subject: Re: bug#60966: 30.0.50; Emacs -nw on msys2 is not clearing the
 terminal
Date: Tue, 31 Jan 2023 17:55:22 +0100
Hi Eli:

1)

I think you can close this issue or just add a comment about it
somewhere in the documentation...

So, it is done from my side. (If I get some time I will try to fix the
build system script, but not now)

2)

I have another issue because rgrep + MS-Windows does not work for me, I
try to use it like usual, but I get this:

----------------------------------------

-*- mode: grep; default-directory: "e:/Repository/" -*-
Grep started at Tue Jan 31 17:25:49

find -H . -type d "(" -path "*/SCCS" -o -path "*/RCS" -o -path "*/CVS"
-o -path "*/MCVS" -o -path "*/.src" -o -path "*/.svn" -o -path "*/.git"
-o -path "*/.hg" -o -path "*/.bzr" -o -path "*/_MTN" -o -path "*/_darcs"
-o -path "*/{arch}" ")" -prune -o ^"^!^" -type d "(" -name ".#*" -o
-name "*.o" -o -name "*~" -o -name "*.bin" -o -name "*.bak" -o -name
"*.obj" -o -name "*.map" -o -name "*.ico" -o -name "*.pif" -o -name
"*.lnk" -o -name "*.a" -o -name "*.ln" -o -name "*.blg" -o -name "*.bbl"
-o -name "*.dll" -o -name "*.drv" -o -name "*.vxd" -o -name "*.386" -o
-name "*.elc" -o -name "*.lof" -o -name "*.glo" -o -name "*.idx" -o
-name "*.lot" -o -name "*.fmt" -o -name "*.tfm" -o -name "*.class" -o
-name "*.fas" -o -name "*.lib" -o -name "*.mem" -o -name "*.x86f" -o
-name "*.sparcf" -o -name "*.dfsl" -o -name "*.pfsl" -o -name "*.d64fsl"
-o -name "*.p64fsl" -o -name "*.lx64fsl" -o -name "*.lx32fsl" -o -name
"*.dx64fsl" -o -name "*.dx32fsl" -o -name "*.fx64fsl" -o -name
"*.fx32fsl" -o -name "*.sx64fsl" -o -name "*.sx32fsl" -o -name
"*.wx64fsl" -o -name "*.wx32fsl" -o -name "*.fasl" -o -name "*.ufsl" -o
-name "*.fsl" -o -name "*.dxl" -o -name "*.lo" -o -name "*.la" -o -name
"*.gmo" -o -name "*.mo" -o -name "*.toc" -o -name "*.aux" -o -name
"*.cp" -o -name "*.fn" -o -name "*.ky" -o -name "*.pg" -o -name "*.tp"
-o -name "*.vr" -o -name "*.cps" -o -name "*.fns" -o -name "*.kys" -o
-name "*.pgs" -o -name "*.tps" -o -name "*.vrs" -o -name "*.pyc" -o
-name "*.pyo" ")" -prune -o -type f "(" -iname "*" ")" -exec grep
--color=always -i -nH --null -e "protoc" "{}" ";"

FIND: Parameter format not correct

Grep exited abnormally with code 2 at Tue Jan 31 17:25:49

------------------------

I tried this simplified version of the command from the msys-mingw64
terminal and it actually does not work.

find -H . -type d "(" -path "*/.git" ")" -prune -o type -f "(" -iname "*" ")" -exec grep -e "protoc" "{}" ";"

Is this a known issue for you? Else, I can open a new issue if you
prefer.

3) Is it there a clean way I could migrate one emacs installation
(packages in the elpa directory) between machines? Because the machine I
am using now does not have access to internet from the terminal (the
system has some ldap proxy); so, emacs cannot access elpa/melpa or
github to download any package.

Is there some tool in emacs intended for this purpose?

Thanks in advance,
And sorry for the bother
Ergus



On Tue, Jan 24, 2023 at 06:57:54PM +0200, Eli Zaretskii wrote:
>> Date: Tue, 24 Jan 2023 16:24:29 +0100
>> From: Ergus <spacibba <at> aol.com>
>> Cc: 60966 <at> debbugs.gnu.org
>>
>> It is just a bit weird that emacs shouldn't be called from within the
>> msys terminal, maybe a warning message or something may help here. It is
>> not terrible, just a bit confusing.
>
>Maybe you should ask mintty developers to look into this?  No one
>never asked Emacs to support mintty on Windows.  But then almost no
>one uses the -nw sessions on Windows (why would you want to?).
>
>> gcc -c -mtune=generic -DUSE_CRT_DLL=1 -I /c/Documents and
>> Settings/T008593/Downloads/emacs/build/../source/nt/inc -mtune=generic
>> -MMD -MF deps/fingerprint.d -MP -g3 -O2 -gdwarf-2 -I. -I../src
>> -I../../source/lib -I../../source/lib/../src -DGL_COMPILE_CRYPTO_STREAM
>> -o fingerprint.o ../../source/lib/fingerprint.c
>>
>> So, probably is this the problem??
>
>Yes.  Feel free to suggest a patch for configure.ac that would quote
>the names.  Better yet, don't build Emacs inside directories with
>whitespace in their names ;-)




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Tue, 31 Jan 2023 18:06:01 GMT) Full text and rfc822 format available.

Notification sent to Ergus <spacibba <at> aol.com>:
bug acknowledged by developer. (Tue, 31 Jan 2023 18:06:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ergus <spacibba <at> aol.com>
Cc: 60966-done <at> debbugs.gnu.org
Subject: Re: bug#60966: 30.0.50; Emacs -nw on msys2 is not clearing the
 terminal
Date: Tue, 31 Jan 2023 20:04:52 +0200
> Date: Tue, 31 Jan 2023 17:55:22 +0100
> From: Ergus <spacibba <at> aol.com>
> Cc: 60966 <at> debbugs.gnu.org
> 
> I think you can close this issue or just add a comment about it
> somewhere in the documentation...
> 
> So, it is done from my side. (If I get some time I will try to fix the
> build system script, but not now)

OK, closing.

> I have another issue because rgrep + MS-Windows does not work for me, I
> try to use it like usual, but I get this:
> 
> ----------------------------------------
> 
> -*- mode: grep; default-directory: "e:/Repository/" -*-
> Grep started at Tue Jan 31 17:25:49
> 
> find -H . -type d "(" -path "*/SCCS" -o -path "*/RCS" -o -path "*/CVS"
> -o -path "*/MCVS" -o -path "*/.src" -o -path "*/.svn" -o -path "*/.git"
> -o -path "*/.hg" -o -path "*/.bzr" -o -path "*/_MTN" -o -path "*/_darcs"
> -o -path "*/{arch}" ")" -prune -o ^"^!^" -type d "(" -name ".#*" -o
> -name "*.o" -o -name "*~" -o -name "*.bin" -o -name "*.bak" -o -name
> "*.obj" -o -name "*.map" -o -name "*.ico" -o -name "*.pif" -o -name
> "*.lnk" -o -name "*.a" -o -name "*.ln" -o -name "*.blg" -o -name "*.bbl"
> -o -name "*.dll" -o -name "*.drv" -o -name "*.vxd" -o -name "*.386" -o
> -name "*.elc" -o -name "*.lof" -o -name "*.glo" -o -name "*.idx" -o
> -name "*.lot" -o -name "*.fmt" -o -name "*.tfm" -o -name "*.class" -o
> -name "*.fas" -o -name "*.lib" -o -name "*.mem" -o -name "*.x86f" -o
> -name "*.sparcf" -o -name "*.dfsl" -o -name "*.pfsl" -o -name "*.d64fsl"
> -o -name "*.p64fsl" -o -name "*.lx64fsl" -o -name "*.lx32fsl" -o -name
> "*.dx64fsl" -o -name "*.dx32fsl" -o -name "*.fx64fsl" -o -name
> "*.fx32fsl" -o -name "*.sx64fsl" -o -name "*.sx32fsl" -o -name
> "*.wx64fsl" -o -name "*.wx32fsl" -o -name "*.fasl" -o -name "*.ufsl" -o
> -name "*.fsl" -o -name "*.dxl" -o -name "*.lo" -o -name "*.la" -o -name
> "*.gmo" -o -name "*.mo" -o -name "*.toc" -o -name "*.aux" -o -name
> "*.cp" -o -name "*.fn" -o -name "*.ky" -o -name "*.pg" -o -name "*.tp"
> -o -name "*.vr" -o -name "*.cps" -o -name "*.fns" -o -name "*.kys" -o
> -name "*.pgs" -o -name "*.tps" -o -name "*.vrs" -o -name "*.pyc" -o
> -name "*.pyo" ")" -prune -o -type f "(" -iname "*" ")" -exec grep
> --color=always -i -nH --null -e "protoc" "{}" ";"
> 
> FIND: Parameter format not correct

This is find.exe which comes with Windows, and is an entirely
different program.  You need to tweak your PATH so that the ported GNU
find.exe from MinGW64 is found before the Windows one.

> 3) Is it there a clean way I could migrate one emacs installation
> (packages in the elpa directory) between machines? Because the machine I
> am using now does not have access to internet from the terminal (the
> system has some ldap proxy); so, emacs cannot access elpa/melpa or
> github to download any package.

Just prepare an archive and then unpack it on the other machine.  It
should work.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 01 Mar 2023 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 55 days ago.

Previous Next


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