From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#70236: Truncating only happening on 900 character long lines in *compilation* buffer Date: Sat, 13 Apr 2024 23:06:32 +1200 Message-ID: <4037e3d2bad9584f9c350345cff302f6@webmail.orcon.net.nz> References: <87msq64zvd.5.fsf@jidanni.org> <865xwt1qtd.fsf@gnu.org> <864jc5r5qx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="383"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Orcon Webmail Cc: 70236-done@debbugs.gnu.org, Dan Jacobson To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 13 13:07:07 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rvbDv-000AMC-Fv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Apr 2024 13:07:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvbDk-0002wF-0G; Sat, 13 Apr 2024 07:06:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvbDi-0002w7-Uo for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2024 07:06:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rvbDi-0003tW-Kb for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2024 07:06:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rvbDs-00070o-Sh for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2024 07:07:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Apr 2024 11:07:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70236 X-GNU-PR-Package: emacs Original-Received: via spool by 70236-done@debbugs.gnu.org id=D70236.171300641626869 (code D ref 70236); Sat, 13 Apr 2024 11:07:04 +0000 Original-Received: (at 70236-done) by debbugs.gnu.org; 13 Apr 2024 11:06:56 +0000 Original-Received: from localhost ([127.0.0.1]:60229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvbDj-0006z5-0P for submit@debbugs.gnu.org; Sat, 13 Apr 2024 07:06:56 -0400 Original-Received: from smtp-3.orcon.net.nz ([60.234.4.44]:55353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvbDf-0006yC-0K for 70236-done@debbugs.gnu.org; Sat, 13 Apr 2024 07:06:53 -0400 Original-Received: from [10.253.37.70] (port=47902 helo=webmail.orcon.net.nz) by smtp-3.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1rvbDN-0001GX-4y; Sat, 13 Apr 2024 23:06:33 +1200 Original-Received: from ip-139-180-86-108.kinect.net.nz ([139.180.86.108]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Sat, 13 Apr 2024 23:06:32 +1200 In-Reply-To: <864jc5r5qx.fsf@gnu.org> X-Sender: psainty@orcon.net.nz X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283201 Archived-At: 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