Subject: bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer

From: Eli Zaretskii <[email-masked]>
Date: Sat, 06 Apr 2024 14:01:15 +0300

> From: Dan Jacobson <[email-masked]>
> Date: Sat, 06 Apr 2024 17:14:14 +0800
> 
> In
> https://emacs.stackexchange.com/questions/80941/what-truncates-lines-at-the-400th-character-in-the-compilation-buffer/80949
> I have reproduced truncating triggered on 900 character lines only,
> when one would expect it happening on other lines too.

When I try to reproduce, I get an error:

  make -k
  perl -MJSON -we 'for(1..9, q(A)..q(F)){$n=$_ x (hex ($_) * 100); @k=($n); print\
   length $n, " ", encode_json \@k, $/ x 2;}'
  Can't locate JSON.pm in @INC (you may need to install the JSON module) (@INC co\
  ntains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/\
  perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_\
  64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34\
   /usr/local/lib/site_perl).
  BEGIN failed--compilation aborted.
  make: *** [Makefile:2: k] Error 2

So please post a recipe which mere mortals can follow without the need
to go down the rabbit hole if installing Perl modules and whatnot.
Surely, investigating an Emacs issue shouldn't require any Perl modules.

I also don't understand what exactly is a bug here.  Is it the fact
that truncation happens at the 900th character, or is it about the
need of a nosy user to understand how the extra characters are hidden?