* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
@ 2024-04-06 9:14 Dan Jacobson
2024-04-06 11:01 ` Eli Zaretskii
2024-04-07 1:31 ` Phil Sainty
0 siblings, 2 replies; 12+ messages in thread
From: Dan Jacobson @ 2024-04-06 9:14 UTC (permalink / raw)
To: 70236
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-06 9:14 bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer Dan Jacobson
@ 2024-04-06 11:01 ` Eli Zaretskii
2024-04-07 6:28 ` Dan Jacobson
2024-04-07 1:31 ` Phil Sainty
1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-04-06 11:01 UTC (permalink / raw)
To: Dan Jacobson; +Cc: 70236
> From: Dan Jacobson <jidanni@jidanni.org>
> 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?
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-06 9:14 bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer Dan Jacobson
2024-04-06 11:01 ` Eli Zaretskii
@ 2024-04-07 1:31 ` Phil Sainty
2024-04-07 9:10 ` Eli Zaretskii
1 sibling, 1 reply; 12+ messages in thread
From: Phil Sainty @ 2024-04-07 1:31 UTC (permalink / raw)
To: 70236
This will generate the same output as that perl:
(cl-loop for n from 100 to 1500 by 100 do
(insert (number-to-string n)
" [\"" (make-string n (string-to-char
(format "%X" (/ n 100))))
"\"]\n\n"))
If you write that to a file "test" in some temp dir and have
a Makefile like this:
foo:
cat test
Then the suggested command will demonstrate the issue:
emacs -Q -f compile
What you're looking at is the difference between the "900" line
(which gets truncated) and all the other lines (which do not).
compilation-max-output-line-length is 400
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-06 11:01 ` Eli Zaretskii
@ 2024-04-07 6:28 ` Dan Jacobson
0 siblings, 0 replies; 12+ messages in thread
From: Dan Jacobson @ 2024-04-07 6:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70236
OK, sorry. I cleaned it up. Please give it another (two) runs. Thanks!
On Sat, Apr 06, 2024 at 02:01:15PM +0300, Eli Zaretskii wrote:
> > https://emacs.stackexchange.com/questions/80941/what-truncates-lines-at-the-400th-character-in-the-compilation-buffer/80949
> 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?
You'll see that it doesn't happen on the shorter lines, or longer lines, but only on that line!
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-07 1:31 ` Phil Sainty
@ 2024-04-07 9:10 ` Eli Zaretskii
2024-04-13 9:06 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-04-07 9:10 UTC (permalink / raw)
To: Phil Sainty; +Cc: 70236
> Date: Sun, 07 Apr 2024 13:31:28 +1200
> From: Phil Sainty <psainty@orcon.net.nz>
>
> This will generate the same output as that perl:
>
> (cl-loop for n from 100 to 1500 by 100 do
> (insert (number-to-string n)
> " [\"" (make-string n (string-to-char
> (format "%X" (/ n 100))))
> "\"]\n\n"))
>
> If you write that to a file "test" in some temp dir and have
> a Makefile like this:
>
> foo:
> cat test
>
> Then the suggested command will demonstrate the issue:
>
> emacs -Q -f compile
>
> What you're looking at is the difference between the "900" line
> (which gets truncated) and all the other lines (which do not).
>
> compilation-max-output-line-length is 400
Thanks, should be fixed now on the master branch.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-07 9:10 ` Eli Zaretskii
@ 2024-04-13 9:06 ` Eli Zaretskii
2024-04-13 11:06 ` Phil Sainty
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-04-13 9:06 UTC (permalink / raw)
To: Dan Jacobson; +Cc: psainty, 70236-done
> Cc: 70236@debbugs.gnu.org
> Date: Sun, 07 Apr 2024 12:10:22 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> > Date: Sun, 07 Apr 2024 13:31:28 +1200
> > From: Phil Sainty <psainty@orcon.net.nz>
> >
> > This will generate the same output as that perl:
> >
> > (cl-loop for n from 100 to 1500 by 100 do
> > (insert (number-to-string n)
> > " [\"" (make-string n (string-to-char
> > (format "%X" (/ n 100))))
> > "\"]\n\n"))
> >
> > If you write that to a file "test" in some temp dir and have
> > a Makefile like this:
> >
> > foo:
> > cat test
> >
> > Then the suggested command will demonstrate the issue:
> >
> > emacs -Q -f compile
> >
> > What you're looking at is the difference between the "900" line
> > (which gets truncated) and all the other lines (which do not).
> >
> > compilation-max-output-line-length is 400
>
> Thanks, should be fixed now on the master branch.
No further comments, so I presume the bug is indeed fixed, and I'm
therefore closing it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-13 9:06 ` Eli Zaretskii
@ 2024-04-13 11:06 ` Phil Sainty
2024-04-13 12:04 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Phil Sainty @ 2024-04-13 11:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70236-done, Dan Jacobson
On 2024-04-13 21:06, Eli Zaretskii wrote:
> No further comments, so I presume the bug is indeed fixed,
> and I'm therefore closing it.
Thanks Eli. I presumed Dan would have tested, but I've just
given that a whirl and it looks like there's an off-by-one
bug in the fix.
Apart from the "900" line (which seems to remain special for
whatever reason the truncation was working there in the first
place), all the lines > 400 chars are getting two buttons:
one with the ellipsis, followed by a second button which is
"hiding" only the final character in the line (but also using
that character as the button text, so it's not "hidden", and
selecting that button just has the effect of that character
no longer looking like a button.
So in that test file the end of the lines looks like "[…]]"
but the two "]" chars are not related -- it's just that "]"
is the last character of each long line in that test file.
Selecting the […] button eliminates both buttons, but
selecting the "final character" button only eliminates that
button (as in both cases the button callback acts through to
the `line-end-position'.
I *think* commenting out this addition is the solution?
You'd already called `backward-char' earlier, so it looks
like this was doubling-up on that.
(put-text-property
start ;; (if ends-in-nl
;; ;; Don't hide the final newline.
;; (1- (point))
(point);; )
'display (if (char-displayable-p ?…) "[…]" "[...]"))
-Phil
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-13 11:06 ` Phil Sainty
@ 2024-04-13 12:04 ` Eli Zaretskii
2024-04-13 13:09 ` Phil Sainty
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-04-13 12:04 UTC (permalink / raw)
To: Phil Sainty; +Cc: 70236-done, jidanni
> Date: Sat, 13 Apr 2024 23:06:32 +1200
> From: Phil Sainty <psainty@orcon.net.nz>
> Cc: Dan Jacobson <jidanni@jidanni.org>, 70236-done@debbugs.gnu.org
>
> On 2024-04-13 21:06, Eli Zaretskii wrote:
> > No further comments, so I presume the bug is indeed fixed,
> > and I'm therefore closing it.
>
> Thanks Eli. I presumed Dan would have tested, but I've just
> given that a whirl and it looks like there's an off-by-one
> bug in the fix.
Feel free to fix as you see fit, and thanks in advance.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-13 12:04 ` Eli Zaretskii
@ 2024-04-13 13:09 ` Phil Sainty
2024-04-13 14:31 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Phil Sainty @ 2024-04-13 13:09 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70236-done, jidanni
On 2024-04-14 00:04, Eli Zaretskii wrote:
> Feel free to fix as you see fit, and thanks in advance.
I've pushed commit f950621e6a177fc3110f3dec7c92b7d499fd25d6 to
resolve that. It's working correctly for the reported test case
so far as I can see.
-Phil
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-13 13:09 ` Phil Sainty
@ 2024-04-13 14:31 ` Eli Zaretskii
2024-04-13 15:45 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-04-13 14:31 UTC (permalink / raw)
To: Phil Sainty; +Cc: 70236-done, jidanni
> Date: Sun, 14 Apr 2024 01:09:58 +1200
> From: Phil Sainty <psainty@orcon.net.nz>
> Cc: jidanni@jidanni.org, 70236-done@debbugs.gnu.org
>
> On 2024-04-14 00:04, Eli Zaretskii wrote:
> > Feel free to fix as you see fit, and thanks in advance.
>
> I've pushed commit f950621e6a177fc3110f3dec7c92b7d499fd25d6 to
> resolve that. It's working correctly for the reported test case
> so far as I can see.
Thanks!
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-13 14:31 ` Eli Zaretskii
@ 2024-04-13 15:45 ` Eli Zaretskii
2024-04-13 23:08 ` Dan Jacobson
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-04-13 15:45 UTC (permalink / raw)
To: psainty; +Cc: 70236, jidanni
> Cc: 70236-done@debbugs.gnu.org, jidanni@jidanni.org
> Date: Sat, 13 Apr 2024 17:31:27 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> > Date: Sun, 14 Apr 2024 01:09:58 +1200
> > From: Phil Sainty <psainty@orcon.net.nz>
> > Cc: jidanni@jidanni.org, 70236-done@debbugs.gnu.org
> >
> > On 2024-04-14 00:04, Eli Zaretskii wrote:
> > > Feel free to fix as you see fit, and thanks in advance.
> >
> > I've pushed commit f950621e6a177fc3110f3dec7c92b7d499fd25d6 to
> > resolve that. It's working correctly for the reported test case
> > so far as I can see.
>
> Thanks!
Btw, wrt the issue of "magic 900 characters": I think it was just
sheer luck: the process filter got called when the process output did
not include the newline, and thus the bug was not triggered. IOW,
this has something to do with buffering.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer
2024-04-13 15:45 ` Eli Zaretskii
@ 2024-04-13 23:08 ` Dan Jacobson
0 siblings, 0 replies; 12+ messages in thread
From: Dan Jacobson @ 2024-04-13 23:08 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: psainty, 70236
[-- Attachment #1: Type: text/html, Size: 182 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-04-13 23:08 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06 9:14 bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer Dan Jacobson
2024-04-06 11:01 ` Eli Zaretskii
2024-04-07 6:28 ` Dan Jacobson
2024-04-07 1:31 ` Phil Sainty
2024-04-07 9:10 ` Eli Zaretskii
2024-04-13 9:06 ` Eli Zaretskii
2024-04-13 11:06 ` Phil Sainty
2024-04-13 12:04 ` Eli Zaretskii
2024-04-13 13:09 ` Phil Sainty
2024-04-13 14:31 ` Eli Zaretskii
2024-04-13 15:45 ` Eli Zaretskii
2024-04-13 23:08 ` Dan Jacobson
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.