From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_Paulo_Labegalini_de_Carvalho?= Newsgroups: gmane.emacs.devel Subject: Re: Initial fontification in sh-mode with tree-sittter Date: Thu, 27 Oct 2022 17:40:57 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ed104c05ec0cac01" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32003"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 28 01:42:41 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 1ooCWH-00085U-IV for ged-emacs-devel@m.gmane-mx.org; Fri, 28 Oct 2022 01:42:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooCUs-0005SE-Mo; Thu, 27 Oct 2022 19:41:14 -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 1ooCUq-0005Rw-3m for emacs-devel@gnu.org; Thu, 27 Oct 2022 19:41:12 -0400 Original-Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ooCUo-0008UG-4E for emacs-devel@gnu.org; Thu, 27 Oct 2022 19:41:11 -0400 Original-Received: by mail-oo1-xc34.google.com with SMTP id i25-20020a4a8d99000000b0047fa712fc6dso564453ook.2 for ; Thu, 27 Oct 2022 16:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=ybdqa3tab9dEx/0euqOdNQkQdKqcSykvvIEXYGH0Q4Y=; b=cJBX4qD/Smi/4BvEJZVRIH2gUSkshPYEV64FUO0mXHkV+lnBHpOyl4efWeprTvdFZG J6e/8q9PM/h+5aCpXViRPRYyIfZ5bSLcDgjO0o/mPXky1fvrsjrqWVabfCUr+FbsC9lP 2t6XLZwZTdvhcLbLqoR+1+Mlq1pkgWOStjiT/5giQyWf7z54mHyndn0Xb1Gd3xq71Ze1 RP/U7mh+Whz5N8k1FLLAWSWbiWrbj8t0EliPmTSkPYjT9NzNN7WriW/pqOeFA7bQdkvD ztFmS4vQZMr6kFec7scJzRn/iBvoVTeTiNz5gNaTZehYP6JrP0LJuy4RLUH6fPuPvgYz 8loQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ybdqa3tab9dEx/0euqOdNQkQdKqcSykvvIEXYGH0Q4Y=; b=yImsJ6KEJ5PhMCuLlhWcIpxovSN8iLt7BQp2MCQa29Z0v8OyVwDcLVpA4j2SWsGHvY WrD8rnRDes3BzqcCyCKydG+upeJ6rjHlBv4zGpwW7Axid7HFks3Xg8UN2VYbO6kjCK0v i3kb8CxlaonNQ6qc5rhjoOy9Ubuv5gvPUFJSr6K0qlPpTtTXG8P3XDuJLfE3uwtJMZFm 2mAV8NpaVVqQyGoKDxp8hDFpYj+Mu9jZvMEGoxZvHcbhSyvxOxTb3mgTA9byubUAzGDq kcALNI+6iWf4/4V6MsvUNigMbvbGJfY2UyBZgMtBnpj2zbdMAk9XRiAAR9ExBlf06jcj K+Og== X-Gm-Message-State: ACrzQf3SEEPkobgSBj+bhItCL4aOqGc0oerT86P/FavZrP4my24UXaat aL4pO5eHFMm6j37JVfHtmQc1QG04N2n+KrqSpK8KmUSg8B0= X-Google-Smtp-Source: AMsMyM42GCgwInDZHMhYwV1na/w/wQapBiaurdYXeS1DEAaN2ijdLWXo5t8YlBIVZpoQtNjMqvtVzV4cfOH3+PQnORM= X-Received: by 2002:a4a:9c2:0:b0:481:134b:fb50 with SMTP id 185-20020a4a09c2000000b00481134bfb50mr13611090ooa.90.1666914068532; Thu, 27 Oct 2022 16:41:08 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::c34; envelope-from=jaopaulolc@gmail.com; helo=mail-oo1-xc34.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, HTML_MESSAGE=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@gnu.org Xref: news.gmane.io gmane.emacs.devel:298647 Archived-At: --000000000000ed104c05ec0cac01 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable A similar thing happens on python-mode with tree-sitter enabled. Given a buffer with the following code: defun foo(): return 42 If a multi-line comment is inserted as in: """ defun foo(): return 42 """ The function definition does not get fontified as part of a comment. But if I execute C-x x f, then everything looks good. Now If one of the markers is deleted, nothing changes until I execute C-x x f, which then makes everything look correct again. It seems that an auto "refreshing" is missing. On Thu, Oct 27, 2022 at 5:09 PM Jo=C3=A3o Paulo Labegalini de Carvalho < jaopaulolc@gmail.com> wrote: > A similar behavior happens if tree-sitter is not enabled, if the heredoc >> is empty then all subsequent commands are fontified as heredoc. However,= as >> soon as anything is added to the heredoc, then everything goes back to t= he >> correct fontification. >> > > Please ignore the above comment. The "no refresh" bug only happens with > tree-sitter enabled. > > -- > Jo=C3=A3o Paulo L. de Carvalho > Ph.D Computer Science | IC-UNICAMP | Campinas , SP - Brazil > Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - > Canada > joao.carvalho@ic.unicamp.br > joao.carvalho@ualberta.ca > --=20 Jo=C3=A3o Paulo L. de Carvalho Ph.D Computer Science | IC-UNICAMP | Campinas , SP - Brazil Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canad= a joao.carvalho@ic.unicamp.br joao.carvalho@ualberta.ca --000000000000ed104c05ec0cac01 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
A similar thing happens on python-mode with tree-sitter en= abled.

Given a buffer with the following code:

defun foo():
=C2=A0 =C2=A0 r= eturn 42

If a multi-line comment is inserte= d as in:

"""
defun foo():
=C2=A0 =C2=A0 return 42
"&q= uot;"

The function defi= nition=C2=A0does not get fontified as part of a comment. But if I execute <= /font>C-x x f, then everything looks good. Now If one of the markers is deleted, noth= ing changes until I execute C-x x f<= font face=3D"arial, sans-serif">, which then makes everything look correct = again.

It seems that an auto "refreshing" is missing.=C2= =A0

On Thu, Oct 27, 2022 at 5:09 PM Jo=C3=A3o Paulo Labeg= alini de Carvalho <jaopaulolc@gmail.com> wrote:
A similar beha= vior happens if tree-sitter is not enabled, if the heredoc is empty then al= l subsequent commands are fontified as heredoc. However, as soon as anythin= g is added to the heredoc, then everything goes back to the correct fontifi= cation.=C2=A0

Please ignore the a= bove comment. The "no refresh" bug only happens with tree-sitter = enabled.=C2=A0

--
Jo=C3=A3o Paulo L. de Carvalho
Ph.= D Computer Science | =C2=A0IC-UNICAMP | Campinas , SP - Brazil
Postdocto= ral Research Fellow | University of Alberta | Edmonton, AB - Canada
<= /div>


--
Jo=C3=A3o Paulo L. de Carval= ho
Ph.D Computer Science | =C2=A0IC-UNICAMP | Campinas , SP - Brazil
= Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canad= a
--000000000000ed104c05ec0cac01--