GNU bug report logs - #70236
Truncating only happening on 900 character long lines in *compilation* buffer

Previous Next

Package: emacs;

Reported by: Dan Jacobson <jidanni <at> jidanni.org>

Date: Sat, 6 Apr 2024 09:15:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


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

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70236-done <at> debbugs.gnu.org, Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#70236: Truncating only happening on 900 character long
 lines in *compilation* buffer
Date: Sat, 13 Apr 2024 23:06:32 +1200
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





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

Previous Next


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