From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59455: 29.0.50; Treesit font lock changes unrelated code Date: Mon, 21 Nov 2022 21:12:51 +0100 Message-ID: <87k03onk1o.fsf@thornhill.no> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1940"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com To: 59455@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 21 21:14:31 2022 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 1oxDBW-0000FE-Nl for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Nov 2022 21:14:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxDB9-00037v-1A; Mon, 21 Nov 2022 15:14:07 -0500 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 1oxDB4-00035l-P4 for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 15:14:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxDB4-0002Gl-FE for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 15:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxDB4-0005Nu-8U; Mon, 21 Nov 2022 15:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: casouri@gmail.com, bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2022 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59455 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: casouri@gmail.com Original-Received: via spool by submit@debbugs.gnu.org id=B.166906159020614 (code B ref -1); Mon, 21 Nov 2022 20:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Nov 2022 20:13:10 +0000 Original-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 Original-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 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 1oxDAA-0002yz-GR for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 15:13:07 -0500 Original-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== 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-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:248572 Archived-At: 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