From unknown Sun Aug 17 04:19:00 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#59455 <59455@debbugs.gnu.org> To: bug#59455 <59455@debbugs.gnu.org> Subject: Status: 29.0.50; Treesit font lock changes unrelated code Reply-To: bug#59455 <59455@debbugs.gnu.org> Date: Sun, 17 Aug 2025 11:19:00 +0000 retitle 59455 29.0.50; Treesit font lock changes unrelated code reassign 59455 emacs submitter 59455 Theodor Thornhill severity 59455 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 21 15:13:10 2022 Received: (at submit) by debbugs.gnu.org; 21 Nov 2022 20:13:10 +0000 Received: from localhost ([127.0.0.1]:48924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxDAE-0005MQ-10 for submit@debbugs.gnu.org; Mon, 21 Nov 2022 15:13:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:55652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxDAB-0005MF-Qw for submit@debbugs.gnu.org; Mon, 21 Nov 2022 15:13:08 -0500 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 1oxDAA-0002yz-GR for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 15:13:07 -0500 Received: from out0.migadu.com ([94.23.1.103]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxDA7-00024P-Or for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 15:13:06 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1669061578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=AQGkEDEXZJMGtrD2EAp7yD5jT69RC9nunHR8zGwjn2E=; b=waboW6mqm4EvDidJHiqj+COui2S5+6nxymmM1+EkGklg9mhqEYEFCCSKPw/WI03l/uoDuE IQE4LMpUWZUN/YGmt0BmseVoS7Xleecd9+ZZ5DYGwmINrzV4/kSNhirUiwOFFcQuBaXvbY R1IfIQ+UaX/nPEpj27oXaNPL8gECcWEk1XOUKWjM7uc4JGTiqpdh63yDwScV62FT9edj0l P9nIvPCXxUfJWE8m1kUSdFsnPekRfyU1+675TadMo+5xDF4sDUJMrLoPy0qU1wMxCMQtdX IKQgZPu41f4psHuYldq5LWPAGKy1hLbnBsWdUToMLamEwy7fPx43N91GgPhhLQ== From: Theodor Thornhill To: bug-gnu-emacs@gnu.org Subject: 29.0.50; Treesit font lock changes unrelated code X-Debbugs-CC: casouri@gmail.com Date: Mon, 21 Nov 2022 21:12:51 +0100 Message-ID: <87k03onk1o.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=94.23.1.103; envelope-from=theo@thornhill.no; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi Yuan! I've noticed some strange behavior with font-lock lately in c-ts-mode, and also in all the other ts modes. to reproduce: emacs -Q C-x C-f foo.c RET Insert this: ``` /* lol lol lol lol lol lol lol lol lol lol */ /* lol lol lol lol lol lol lol lol lol lol */ /* lol lol lol lol lol lol lol lol lol lol */ /* lol lol lol lol lol lol lol lol lol lol */ /* lol lol lol lol lol lol lol lol lol lol */ /* lol lol lol lol lol lol lol lol lol lol */ /* lol lol lol lol lol lol lol lol lol lol */ /* lol lol lol lol lol lol lol lol lol lol */ /* lol lol lol lol lol lol lol lol lol lol */ int foo (void) { return 5; } int foo (void) { if (x) { return 5; } } int foo (void) { return 5; } ``` M-x c-ts-mode RET Now on the first line, repeatedly press 'M-c' (capitalize-word) and watch the highlights of the rest of the file jump around. Then try undoing the changes by repeatedly pressing 'C-/' until you are back at the state right after the first insert. Now highlights are messed up. I'm not sure where to start looking for this, but I do remember there being some issues in Eglot with these "multi-edit" commands. If you have some pointers for where to look I can dig around :) Theo From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 06:06:42 2022 Received: (at 59455) by debbugs.gnu.org; 22 Nov 2022 11:06:42 +0000 Received: from localhost ([127.0.0.1]:50007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxR6w-0000x4-19 for submit@debbugs.gnu.org; Tue, 22 Nov 2022 06:06:42 -0500 Received: from out2.migadu.com ([188.165.223.204]:12553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxR6t-0000ws-D5 for 59455@debbugs.gnu.org; Tue, 22 Nov 2022 06:06:40 -0500 Date: Tue, 22 Nov 2022 12:03:48 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1669115197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yi5sJuMCrPOtY4kqsczv2ITXHbwNk/fBQmzwlswR23s=; b=Df4xyfBi/AUNllLv8b/ujbfBAx1fuowO27oNbk9q13Ol78Lnl/fJIxr+JGSfCoFJrjLW52 hBWA3KOuX+IL4jsye/HFCW4AEXgQ2ABa+ooxRnr47+g+VAxXGFXILG9mHmbe23WvjBq5Zi 2UlPRiWydpp98M1F02xgZOLgU6rivycE9wGS/8Jh6uHMUcSP0t+R4zx7xlIbb98rKPdmH7 P5EU0GTK+fJoGyi80wE1kg0O2k7Do4vOnAOsRk3OgWHIwlsRGdYiQCwSaxbT+IegHUfXnU /Vfo792yWV+sBinnrP97yYCE8wE4/FsdPIjVlT6ZX28T1zWpEMMdSSKHF+CE0Q== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Theodor Thornhill To: Yuan Fu Subject: Re: bug#59455: 29.0.50; Treesit font lock changes unrelated code In-Reply-To: References: Message-ID: <3D78650B-ADAC-4BC9-A3D1-1C0E08273888@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59455 Cc: 59455@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 22 November 2022 11:05:50 CET, Yuan Fu wrote: > >Theodor Thornhill writes: > >> Hi Yuan! >> >> I've noticed some strange behavior with font-lock lately in c-ts-mode, >> and also in all the other ts modes=2E >> >> to reproduce: >> >> emacs -Q >> >> C-x C-f foo=2Ec RET >> >> Insert this: >> >> ``` >> /* lol lol lol lol lol lol lol lol lol lol */ >> /* lol lol lol lol lol lol lol lol lol lol */ >> /* lol lol lol lol lol lol lol lol lol lol */ >> /* lol lol lol lol lol lol lol lol lol lol */ >> /* lol lol lol lol lol lol lol lol lol lol */ >> /* lol lol lol lol lol lol lol lol lol lol */ >> /* lol lol lol lol lol lol lol lol lol lol */ >> /* lol lol lol lol lol lol lol lol lol lol */ >> /* lol lol lol lol lol lol lol lol lol lol */ >> >> int >> foo (void) >> { >> return 5; >> } >> >> int >> foo (void) >> { >> if (x) >> { >> return 5; >> } >> } >> >> int >> foo (void) >> { >> return 5; >> } >> ``` >> >> M-x c-ts-mode RET >> >> Now on the first line, repeatedly press 'M-c' (capitalize-word) and >> watch the highlights of the rest of the file jump around=2E Then try >> undoing the changes by repeatedly pressing 'C-/' until you are back at >> the state right after the first insert=2E Now highlights are messed up= =2E >> >> I'm not sure where to start looking for this, but I do remember there >> being some issues in Eglot with these "multi-edit" commands=2E >> >> If you have some pointers for where to look I can dig around :) > >Thanks for the catch! It is due to tree-sitter not correctly recording >changes in casefiddle=2Ec=2E I=E2=80=99ve fixed it now=2E=20 > Now you can Lol as much as your heart desire=2E Don't you always capitalize lols at the top of your files?=20 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 06:37:30 2022 Received: (at 59455) by debbugs.gnu.org; 22 Nov 2022 11:37:30 +0000 Received: from localhost ([127.0.0.1]:50040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxRaj-0001pt-Pt for submit@debbugs.gnu.org; Tue, 22 Nov 2022 06:37:30 -0500 Received: from mx0a-0016e101.pphosted.com ([148.163.145.30]:52826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxQA6-0007rJ-OJ for 59455@debbugs.gnu.org; Tue, 22 Nov 2022 05:05:56 -0500 Received: from pps.filterd (m0151355.ppops.net [127.0.0.1]) by mx0a-0016e101.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AMA34p1029952 for <59455@debbugs.gnu.org>; Tue, 22 Nov 2022 02:05:53 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsd.edu; h=from : content-type : content-transfer-encoding : mime-version : subject : message-id : date : cc : to; s=campus; bh=1HPK9/19kvemWqdCKIvHEVzV5GmlTYh8nDedSlUeBTE=; b=avcwRLs7u0Ezfh6ZgqJdrFzUYce3ChflD+zr/A7lpMcBrlgFtHqGW7hWUIfVrBljiFO3 YUp7lhamCCuSUMATC8Yw5JU90GtjL7vOl91t43UiZxQtadnynMkl1S+s8JBrpqOLVtSj nXD+nPjNK15LLWiWeC4YU23Mbh+qhkAdKYsgAak4DdWEmcM1sto0sxmgB6mg1bu2Sj2D NBXjvw0LJj4EJXt8g8dKY8zoOKTEKN1ltuGVsCMohStYC7QSSZA4S+c+tCkjWNUb45iW NB/cCqtx5qrTjf+YrvJyEkioiti+uwQXVekqi50uxRBqGFHSy2sXVwIG6tzOtcZzBbZ6 Dw== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0016e101.pphosted.com (PPS) with ESMTPS id 3kxy8jfqd8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for <59455@debbugs.gnu.org>; Tue, 22 Nov 2022 02:05:53 -0800 Received: by mail-pl1-f198.google.com with SMTP id u9-20020a170902e80900b0018939ccbeedso29467plg.20 for <59455@debbugs.gnu.org>; Tue, 22 Nov 2022 02:05:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsd.edu; s=google; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=1HPK9/19kvemWqdCKIvHEVzV5GmlTYh8nDedSlUeBTE=; b=AaGG1SUk4vH/56DqeUZwNo64W06sjSKBUGxLnZUJ5VU+RRUa4N9Z6f2qshW+1R78Qg y2XKUDE/b4ztmw6JMtpv0w5+1u9O9Yyz8VohRplh3wYwP2oDgBRfOVVehg6+CUC9y2Be Q30ZwkAFSYzl9g5HVR6kJnJIx3q1UmD0gSzf4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1HPK9/19kvemWqdCKIvHEVzV5GmlTYh8nDedSlUeBTE=; b=vbZuQG5eHf7OjbctegP5ce+4RMx9I5+xDmNfbHMdkC/YvGP7qcYAqJXSI+/zASyJc3 b0T2znOqgZIX1CYGocxUy4EWnhf3wuGzVO9Lta+PWLkMXRpNlbkkFSKL/XGXQJ6mcrrm g1kckYfsEWFSAvP7K2FE8vhcewlq9039omR+p9ldSroqmt8iVlGofJ3qtmo/Aywr6DNU A/II3A4uq+AVMcEY6azadXz98MwY9Q91fVpJk3FvlYEewFiF9MR6yFUYqeKIXjtfVPYh /+DwvJVm0elP0zs+eQmb//qrG8D2uTesAkCS/hGIMrSKzJ1b93E0r+nG/7cAuT7CY8jH tPzQ== X-Gm-Message-State: ANoB5pne18lAuwSwB5J2+sc/PYpFLDzDKTtfmlVKrPCU5MGLdJcdaMKh 8nPupxSxI9aJzl6cOtfxPC+9JJnJOqNzNqKQndgGVCHxlAeCE3V27Y5c1VJFcjF0vSYOxF/4kpg itvR6zcCTL9KXdw== X-Received: by 2002:a17:90b:3d0d:b0:1fd:5b5d:f09d with SMTP id pt13-20020a17090b3d0d00b001fd5b5df09dmr25326549pjb.69.1669111552468; Tue, 22 Nov 2022 02:05:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf5nPJAIy9jzgHjRoQrjHg0w65TvGnkFGImIgMbAYn/qwJLwjnsE2Ex3fMrhqv0PIZPwg6SQrg== X-Received: by 2002:a17:90b:3d0d:b0:1fd:5b5d:f09d with SMTP id pt13-20020a17090b3d0d00b001fd5b5df09dmr25326526pjb.69.1669111552104; Tue, 22 Nov 2022 02:05:52 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id c14-20020aa7952e000000b00573a9d13e9esm3987896pfp.36.2022.11.22.02.05.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2022 02:05:51 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: bug#59455: 29.0.50; Treesit font lock changes unrelated code Message-Id: Date: Tue, 22 Nov 2022 02:05:50 -0800 To: Theodor Thornhill X-Mailer: Apple Mail (2.3696.120.41.1.1) X-campus_gsuite: gsuite_33445511 X-Proofpoint-GUID: GUADIQE5nceoS_t7xueuhZx0HzJvmHXb X-Proofpoint-ORIG-GUID: GUADIQE5nceoS_t7xueuhZx0HzJvmHXb pp_allow_relay: proofpoint_allowed X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-22_04,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=910 priorityscore=1501 bulkscore=0 malwarescore=0 suspectscore=0 mlxscore=0 spamscore=0 clxscore=1011 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220073 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59455 X-Mailman-Approved-At: Tue, 22 Nov 2022 06:37:29 -0500 Cc: 59455@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Theodor Thornhill writes: > Hi Yuan! > > I've noticed some strange behavior with font-lock lately in c-ts-mode, > and also in all the other ts modes. > > to reproduce: > > emacs -Q > > C-x C-f foo.c RET > > Insert this: > > ``` > /* lol lol lol lol lol lol lol lol lol lol */ > /* lol lol lol lol lol lol lol lol lol lol */ > /* lol lol lol lol lol lol lol lol lol lol */ > /* lol lol lol lol lol lol lol lol lol lol */ > /* lol lol lol lol lol lol lol lol lol lol */ > /* lol lol lol lol lol lol lol lol lol lol */ > /* lol lol lol lol lol lol lol lol lol lol */ > /* lol lol lol lol lol lol lol lol lol lol */ > /* lol lol lol lol lol lol lol lol lol lol */ > > int > foo (void) > { > return 5; > } > > int > foo (void) > { > if (x) > { > return 5; > } > } > > int > foo (void) > { > return 5; > } > ``` > > M-x c-ts-mode RET > > Now on the first line, repeatedly press 'M-c' (capitalize-word) and > watch the highlights of the rest of the file jump around. Then try > undoing the changes by repeatedly pressing 'C-/' until you are back at > the state right after the first insert. Now highlights are messed up. > > I'm not sure where to start looking for this, but I do remember there > being some issues in Eglot with these "multi-edit" commands. > > If you have some pointers for where to look I can dig around :) Thanks for the catch! It is due to tree-sitter not correctly recording changes in casefiddle.c. I=E2=80=99ve fixed it now. Now you can Lol as = much as your heart desire. Yuan From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 13:33:46 2022 Received: (at 59455-done) by debbugs.gnu.org; 23 Nov 2022 18:33:46 +0000 Received: from localhost ([127.0.0.1]:56183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxuZ8-0001qj-8M for submit@debbugs.gnu.org; Wed, 23 Nov 2022 13:33:46 -0500 Received: from mail-pj1-f47.google.com ([209.85.216.47]:39739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxuZ4-0001qS-HX for 59455-done@debbugs.gnu.org; Wed, 23 Nov 2022 13:33:44 -0500 Received: by mail-pj1-f47.google.com with SMTP id e7-20020a17090a77c700b00216928a3917so2873568pjs.4 for <59455-done@debbugs.gnu.org>; Wed, 23 Nov 2022 10:33:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=Gu4j1ped1zGHsnnnmDHDZxpLDtEJiN8qi1t0EUD0XRo=; b=PjEyKbNV1oEWKARuteytPCKSCdpQIODxM1dFW9B7LYKozuyrcQkVKGtke92/b/fEOg W4LMuqmuCDLu+/FDF8GuQcuv2Z5o6SDT55oGBaesUhxgSFrFnTVq3QOO05WaEwrf5jxu RoRF5VuBhryp9o4UlU2vTfsXXmLKjIpnzOeM9NlbO0TVo6ku5wiLGBr1Q/30N0Zr0Azp 7wErgUu7axJgk4HF8zvhDDlvZTDohC5m/IxsaYugwrqO7bWhrWT+rV789JY/qdcypFiX eQef9tdoKzYAaWJKJlvTC6CLd0UBBn/2MXa2/lj905kqTOvMYR50P2GPE6bM0aCbVbm+ sZdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gu4j1ped1zGHsnnnmDHDZxpLDtEJiN8qi1t0EUD0XRo=; b=eIfIG4HoHAOsLyo62/HMNiiq4PehUd2bCXF4HW6TIck3HgFHtZXMq5pYJO3HSWUZYP ocPni2mYZDxXOI6mCJDYkSO1nxKO2w8fPUQzXHyDs6uAC9ghc/WJmv+xHBtwTp26ISBL gZlDJyPd82lbPvzVe5wzKB53I8z2mHnt52XbW6zUf5Vfz5+0rbj+Wko41GfAJDtr3Vlb d6nGHxPQtL0G5qk6l0G8omQAXIOD6TggSgHoxp1m0fhQbXKYBoUsRf4SnWvaOPj/q4Dm gfJZU80fgM0NYYeK8iz/u3MkII6/E11LTTAp2yeOGrhpJmjopYHCwLyzHb7KRFsL8ewj Eq0g== X-Gm-Message-State: ANoB5pk1bJGdbdAcFh+/5c6dYGuO5gi+Kwi53N0Fueq7hOy8/UoKrQOP qph8VDNPt29HqlbfCkK9HMU= X-Google-Smtp-Source: AA0mqf5H1FEVzXERV1AG5kw1J9AfQrwZVaAV8qW9oPxV+ldVa8uhYAOLWC9FUfmmrotoPgW5uwNoeQ== X-Received: by 2002:a17:90a:8c82:b0:218:77d2:8c30 with SMTP id b2-20020a17090a8c8200b0021877d28c30mr29945546pjo.226.1669228416770; Wed, 23 Nov 2022 10:33:36 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id t5-20020a170902e1c500b00187197c499asm14562620pla.164.2022.11.23.10.33.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Nov 2022 10:33:36 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: bug#59455: 29.0.50; Treesit font lock changes unrelated code Message-Id: <81762C61-20E4-45C9-849D-178E3912171F@gmail.com> Date: Wed, 23 Nov 2022 10:33:35 -0800 To: Theodor Thornhill X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59455-done Cc: 59455-done@debbugs.gnu.org, yuf011@ucsd.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Theodor Thornhill writes: > On 22 November 2022 11:05:50 CET, Yuan Fu wrote: >> >>Theodor Thornhill writes: >> >>> Hi Yuan! >>> >>> I've noticed some strange behavior with font-lock lately in = c-ts-mode, >>> and also in all the other ts modes. >>> >>> to reproduce: >>> >>> emacs -Q >>> >>> C-x C-f foo.c RET >>> >>> Insert this: >>> >>> ``` >>> /* lol lol lol lol lol lol lol lol lol lol */ >>> /* lol lol lol lol lol lol lol lol lol lol */ >>> /* lol lol lol lol lol lol lol lol lol lol */ >>> /* lol lol lol lol lol lol lol lol lol lol */ >>> /* lol lol lol lol lol lol lol lol lol lol */ >>> /* lol lol lol lol lol lol lol lol lol lol */ >>> /* lol lol lol lol lol lol lol lol lol lol */ >>> /* lol lol lol lol lol lol lol lol lol lol */ >>> /* lol lol lol lol lol lol lol lol lol lol */ >>> >>> int >>> foo (void) >>> { >>> return 5; >>> } >>> >>> int >>> foo (void) >>> { >>> if (x) >>> { >>> return 5; >>> } >>> } >>> >>> int >>> foo (void) >>> { >>> return 5; >>> } >>> ``` >>> >>> M-x c-ts-mode RET >>> >>> Now on the first line, repeatedly press 'M-c' (capitalize-word) and >>> watch the highlights of the rest of the file jump around. Then try >>> undoing the changes by repeatedly pressing 'C-/' until you are back = at >>> the state right after the first insert. Now highlights are messed = up. >>> >>> I'm not sure where to start looking for this, but I do remember = there >>> being some issues in Eglot with these "multi-edit" commands. >>> >>> If you have some pointers for where to look I can dig around :) >> >>Thanks for the catch! It is due to tree-sitter not correctly recording >>changes in casefiddle.c. I=E2=80=99ve fixed it now.=20 > > >> Now you can Lol as much as your heart desire. > > Don't you always capitalize lols at the top of your files?=20 I should do it more, heard that it=E2=80=99s a good warm-up for = programming :-) Closing. Yuan From unknown Sun Aug 17 04:19:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 22 Dec 2022 12:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator