From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably Date: Sat, 23 Dec 2023 15:07:15 -0800 Message-ID: <09F5F567-2BFD-4B27-ADF5-131F950C9CAC@gmail.com> References: <878r7s5cdf.fsf@honnef.co> <2ce274aa-6d01-4d0a-b10c-07f821343fed@gmail.com> <50920549-006c-0153-2471-02e41a3dada7@gutov.dev> <8c7cd429-bdc3-4fac-ad1c-fbad793bf1a0@gmail.com> <231ebcd1-ec30-0432-82e7-d63e11cd65f7@gutov.dev> <765D713E-9923-4F66-9044-9D69C104C9B0@gmail.com> <33fe5d61-5022-67c5-6a65-babde4fb7f91@gutov.dev> <92CACD38-9534-4A07-8DE3-CE8408272FB6@gmail.com> <59CC46F7-867E-4C74-83EC-49B41DF0FAB8@gmail.com> <8fa0e506-6efc-57d4-6034-e938f97b1fb0@gutov.dev> <83plz3i9vv.fsf@gnu.org> <83o7emj2qd.fsf@gnu.org> <83il4uicux.fsf@gnu.org> <838r5ldxyy.fsf@gnu.org> <4ACAC616-6491-4CAC-876B-DD8E33D5C23B@gmail.com> <0d20d395-7211-4731-8bea-a27db41a7f86@gutov.dev> <16f10884-538c-4158-b1dd-f016d85a996c@gutov.dev> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7439"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 66732@debbugs.gnu.org, Stefan Monnier , dominik@honnef.co To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 24 00:08:25 2023 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 1rHB6X-0001ix-15 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Dec 2023 00:08:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHB68-0003Sf-Tn; Sat, 23 Dec 2023 18:08:00 -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 1rHB66-0003SP-Gh for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 18:07:58 -0500 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 1rHB64-0000vf-Hj for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 18:07:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rHB69-0005u4-L1 for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 18:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Dec 2023 23:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66732 X-GNU-PR-Package: emacs Original-Received: via spool by 66732-submit@debbugs.gnu.org id=B66732.170337286722671 (code B ref 66732); Sat, 23 Dec 2023 23:08:01 +0000 Original-Received: (at 66732) by debbugs.gnu.org; 23 Dec 2023 23:07:47 +0000 Original-Received: from localhost ([127.0.0.1]:51454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rHB5u-0005ta-KC for submit@debbugs.gnu.org; Sat, 23 Dec 2023 18:07:46 -0500 Original-Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]:51433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rHB5s-0005tN-SB for 66732@debbugs.gnu.org; Sat, 23 Dec 2023 18:07:45 -0500 Original-Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-35d725ac060so13382075ab.2 for <66732@debbugs.gnu.org>; Sat, 23 Dec 2023 15:07:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703372853; x=1703977653; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iZJA/6maaXvF4D9OXRzXprZs4ILabANLuhhx4bbywpM=; b=ZUXVAJ61P73Ck6+zDL0jPK+vNXbt8PqOSc9WrPK0rcjUWZPH+Hv7qiokMjuBUq7iCa ZI/I6kmAf46WFPcgOmUSKwIBsQ/7Ro2yFDZTEw1/zrRfoOVUgMN9bIbZHJqyWWl1VeUP osYE2RttsECFL27Fm1ZY0CWWagciiBGyLbYsKVElQr9/5ygeuUw8CYJafjvWhOdYNNIb 9m2FIlqEeUzpBdQ/pPF8MNIqao1VPgfoyGgtYwFaA1qM2Q6N3H6omOKgtdIYH6AO3JaW 0WA+qb45UBP8wAaGeTQ43uGs2JCI7vSiIhqKpJVZGzVMOs61zY9+DY3XiERaNTEf1GTE 6tSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703372853; x=1703977653; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iZJA/6maaXvF4D9OXRzXprZs4ILabANLuhhx4bbywpM=; b=RjhSMabJmZOqcHRYuq3Zuk65cOx3xm+OgYy8/QEIu6msuLEB4zd/kn9NXtdDEiixAE oIpvMkfRsmC/shA2D0EOhIrKqAYkr1FmoHp8MyUtMjz64HDZzft9c8pwIgdzFBY9/mGc o/x0PzGncmLXJIZaiz3GGdmxKH1uK5BRxgFE2wjxAtIViEx0LEYL7PWUDl7ImoVJZjwT FQK9TuZ9WJc6IbAM1EvfVYLV583VnM9eN7wHl5tj28llh09VhhPkgfR0oTjhxXjTQLMy 62ENmrDhqTJVmjiSYEJSapY4GRdaz4sueEjIuuA+Pq6rIoDAIb31f44hAayo9cZSorm6 7ikA== X-Gm-Message-State: AOJu0YyfYCRgU62Pt4k1T750dEmDLQx514/W9AIx5Q2i7wUd4nxycboV PwQg8Ry7QAcX77bbUeW9bns= X-Google-Smtp-Source: AGHT+IFAVQCUqTRCBxNGTxnLLmvprFbT0RlFlJvrnCG4khg5UhVw+jXQBuVODm/ggFXLjErZiZlFEQ== X-Received: by 2002:a05:6e02:194d:b0:35f:d7d7:c216 with SMTP id x13-20020a056e02194d00b0035fd7d7c216mr5435876ilu.41.1703372853622; Sat, 23 Dec 2023 15:07:33 -0800 (PST) Original-Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id b33-20020a630c21000000b005cd7dd8708dsm5369202pgl.52.2023.12.23.15.07.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Dec 2023 15:07:33 -0800 (PST) In-Reply-To: <16f10884-538c-4158-b1dd-f016d85a996c@gutov.dev> X-Mailer: Apple Mail (2.3731.700.6) 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:276775 Archived-At: > On Dec 23, 2023, at 12:51 PM, Dmitry Gutov wrote: >=20 > On 23/12/2023 22:46, Dmitry Gutov wrote: >> On 23/12/2023 20:02, Yuan Fu wrote: >>> I have a patch. Dmitry, WDYT? >> Looks good! I haven't had a chance to test it yet, but it's probably = not necessary to do before the checkin. I tested with C block comments and python triple quotes and they both = work fine. >=20 > Speaking of pre-redisplay-functions, though, Stefan mentioned that it = could be beneficial to do a debounce (based on = buffer-chars-modified-tick?) because they can be called several times = per user command. >=20 > Although if the parser short-circuits when the buffer is unchanged = since last time, perhaps it's not necessary. Cool. I added debounce and removed ruby-ts-mode code, and pushed to = emacs-29. Yuan=