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.devel Subject: Re: Initial fontification in sh-mode with tree-sittter Date: Tue, 1 Nov 2022 01:35:25 -0700 Message-ID: <03309451-1AEB-458C-88FD-9715CECC27A2@gmail.com> References: <6C8B0F8E-DF61-4BC3-B0D0-56DBB66BE637@gmail.com> <7AE71CCA-6F18-4DE6-8608-7D9B3E9E52FB@gmail.com> <9BA853EA-8B7F-41A0-A174-D86DF5CE7788@gmail.com> <83sfj3cfl0.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11683"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Daniel_Mart=C3=ADn?= , =?utf-8?Q?Jo=C3=A3o_Paulo_Labegalini_de_Carvalho?= , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 01 09:35:59 2022 Return-path: Envelope-to: ged-emacs-devel@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 1opmkY-0002gL-Mt for ged-emacs-devel@m.gmane-mx.org; Tue, 01 Nov 2022 09:35:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opmkF-0002mJ-RA; Tue, 01 Nov 2022 04:35:39 -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 1opmkD-0002l3-EZ for emacs-devel@gnu.org; Tue, 01 Nov 2022 04:35:37 -0400 Original-Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opmk8-0001Bg-3n; Tue, 01 Nov 2022 04:35:37 -0400 Original-Received: by mail-pj1-x102d.google.com with SMTP id c15-20020a17090a1d0f00b0021365864446so12334349pjd.4; Tue, 01 Nov 2022 01:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=ts/7g5GvRbw9bHqdBWnKi/RXasymf+4OOveRIlZTFSA=; b=JfOFX+vuWOFYT7o1Qftab3h3kQFcImbh7+VqiK3Vwgwl/8DMuYKnSH8LXrSHbIliyd BphLn3exRj9PPT9Qns8X6DFPBEWT/wc1r647zb5AKhGku0D/xyKnBI6lbxx+DXPRNEuK AUIi3i39fD1DVPW25qFipM6gfwud7WGcuf+ZG9VPtbYfTgMr/k2s3HJeBQ+cUKMRFHoc U8tbaWPq3RAEabttadOnmk80ySHsme24KQbZPy8Ib8sJNzalifzyAL7w2o6UGoegbPA0 jagYBCrQyvTC9lmJfLXPalBH76NIMnaTPAp6UAYrHIodj3w7Zcz0QY7ZfrWM3hSu6tig qHIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ts/7g5GvRbw9bHqdBWnKi/RXasymf+4OOveRIlZTFSA=; b=SG+jk4MDCHpGCf3XTVeyotoQiPC+uEpi5rStfbTQ1iAdYoGj0FlfakQiQQQlo198Bq s5eNrT0v5UQGUaGR3q/wkYo936oA42c3C/jESEenE1Wx5931bjtYphTlQ1kkO7h3gFgT SBlfqWRrz8kpk2B/AtpQVlbzMxt+/HM1ohEuoLR8BCdpR+11FCQhBW10c2Xf5E81jVV7 xRSpIxqOR9uSwGA9XR/FYthtui6GH+cOPmNDm3D5IAtb7b3xx38I/W0M8maIiVuMVql7 l59S/EmpWO8WsPR1uETQRrksTcMWfP0htBqwTqalRgrroHumdZMILeA2UrgjjK58nbUY fwTQ== X-Gm-Message-State: ACrzQf3ElPx7BOdmPV5NFj3Zd2M6dreT70Kg+S3o5g3LQ3pUcJg55qH6 OX94takydWXUG15KLYk2L4BXAt9nldw= X-Google-Smtp-Source: AMsMyM6HUGMxS4jGlQX+Jh9yAzDlyVD9ESjLw8hKHtFkKUXIoWvwockll419XDzWU4H4Fx3OSqMqsg== X-Received: by 2002:a17:902:f786:b0:186:7a6b:217c with SMTP id q6-20020a170902f78600b001867a6b217cmr18601578pln.55.1667291728328; Tue, 01 Nov 2022 01:35:28 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id c29-20020a056a00009d00b0056bb7d90f0fsm5951424pfj.182.2022.11.01.01.35.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Nov 2022 01:35:27 -0700 (PDT) In-Reply-To: <83sfj3cfl0.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=casouri@gmail.com; helo=mail-pj1-x102d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298917 Archived-At: > On Nov 1, 2022, at 12:13 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Mon, 31 Oct 2022 17:25:01 -0700 >> Cc: Jo=C3=A3o Paulo Labegalini de Carvalho ,=20 >> emacs-devel@gnu.org >>=20 >>> Curiously, as soon as I press C-l, the text gets fontified with the >>> string face. >>=20 >> I think that=E2=80=99s just jit-lock & redisplay doing funny stuff. = If you set treesit--font-lock-verbose to t, it should log that = appropriate faces are applied when you insert the quote. >=20 > Which means you don't play by redisplay's rules in this case. When > Lisp code changes faces, it should remove the 'fontified' property > from the text where faces changed. Does your code do that? I thought 'fontified should be set to t, and it is done by jit-lock? I = also thought changing the =E2=80=98face property should be enough to = trigger redisplay, is that true? Yuan=