GNU bug report logs - #66666
30.0.50; Feedback on treesit-font-lock-level

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Augusto Stoffel <arstoffel@HIDDEN>; dated Sat, 21 Oct 2023 14:17:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 66666 <at> debbugs.gnu.org:


Received: (at 66666) by debbugs.gnu.org; 21 Oct 2023 18:19:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 21 14:19:44 2023
Received: from localhost ([127.0.0.1]:45000 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1quGZc-0007Cb-Fx
	for submit <at> debbugs.gnu.org; Sat, 21 Oct 2023 14:19:44 -0400
Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:45338)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1quGZZ-0007CL-LL
 for 66666 <at> debbugs.gnu.org; Sat, 21 Oct 2023 14:19:43 -0400
Received: by mail-pf1-x430.google.com with SMTP id
 d2e1a72fcca58-6b36e1fcee9so1700308b3a.3
 for <66666 <at> debbugs.gnu.org>; Sat, 21 Oct 2023 11:19:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1697912348; x=1698517148; 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=xPX93ViIMDvof7+jk0UxcXN8XUSEV5kSrZ5PKkJxPIM=;
 b=lWAaeHf8ZWxcopUAy0SLw0IEMn1Ezslom6gSr2LASNx7xUvs4rimIMN+LpbPe0lpVB
 MH/Mv5zm/2q2Ex9SiKV+FG1LBGQ6Yd6AeLkHTlgBlWPxYFse9KR6Oxaf2/hGB4DlnuOb
 TgkY10zNB7l35Jq7AN5nTxCBz4vugtwlP5Qd2s0OOmJE4InCNp0YimrBGNFHRg5M10bO
 r2K0YQ874WTykBfxeH4CSowyoVg0TlnuXD2sNX/3K0kkWaH6/EttbwThZ7oJoIBT5jUC
 UEDqrJCRIJA0X3FBMuJod3nwxkzqUAdeP58T8ktZUjemHq7goRRpCq0FZqKY0NmmM/og
 B84g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1697912348; x=1698517148;
 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=xPX93ViIMDvof7+jk0UxcXN8XUSEV5kSrZ5PKkJxPIM=;
 b=bVHVQ/MOyPDBJVnog0ELCHwsr8+9OafyCdTQ/PVKHeBEnkBJbpOz+RMkkonw1DeLNj
 6cU6JNi5KbisWxnDtFgquzCOXuXI/lYCiWQXBOxzGP3iXevzqZUAnfXGvDaHT+ODonph
 Jd/kLJbnE44MjpN0ih8adN8XaxFZaCigxI379VGYHVN/WnWKpe7ddyZFPR1axFK2YO2r
 Nlb0cXqTo+/UnzkcBvsouCFhx81OMx2ghzVUgdJfmSbyizvnV4LpMlz3MEDajjsPlZy7
 deA9/JhcGZtrXoIaiP3i0KQUq4B2I8OUZBbcHBMk+1M5ZPPY5S6fZcBsqfFKFbEQy6O6
 Fd0Q==
X-Gm-Message-State: AOJu0YwTJAyXnG33IXOLjSB1k6V+ru6aXRZFWMSXggjhYduac0z2SrhA
 8KRqK3SakNzZor74LTol0XM=
X-Google-Smtp-Source: AGHT+IFYLivVHsiShZ1+nhYrutxP8SKrjIdnHHbgZpSzY8OBfOhWiEbSO+K9X21VVk5pTu3gILOmKg==
X-Received: by 2002:a05:6a00:194c:b0:6bb:8982:411c with SMTP id
 s12-20020a056a00194c00b006bb8982411cmr4422340pfk.8.1697912347732; 
 Sat, 21 Oct 2023 11:19:07 -0700 (PDT)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 w5-20020a626205000000b0066a31111cc5sm3679884pfb.152.2023.10.21.11.19.07
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 21 Oct 2023 11:19:07 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\))
Subject: Re: bug#66666: 30.0.50; Feedback on treesit-font-lock-level
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <87il70vz6c.fsf@HIDDEN>
Date: Sat, 21 Oct 2023 11:18:56 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <F6EBC7EB-8CDA-41F8-A070-4550BA183A77@HIDDEN>
References: <87il70vz6c.fsf@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 66666
Cc: 66666 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Oct 21, 2023, at 7:16 AM, Augusto Stoffel <arstoffel@HIDDEN> =
wrote:
>=20
> The docstring of treesit-font-lock-level says:
>=20
>  Level 1 usually contains only comments and definitions.
>=20
> As a user of minimal fontification, I don't find this very appealing.
> IMO, the lowest fontification level should allow distinguishing code
> from non-code, and therefore fontify comments and strings, and nothing
> else.


That=E2=80=99s a fair point, and I don=E2=80=99t have strong opinions of =
what minimal level of font-lock should include. The default value is =
derived from my observation of the (few) existing major modes that =
support font-lock levels.

Since this isn=E2=80=99t a technical issue but rather a subjective one, =
perhaps you can bring it up to emacs-devel and have a discussion there. =
If the consensus agrees with you, then we can change the default value.

If you just want to make it work for yourself, you can use =
treesit-font-lock-recompute-features to add/remove features you desire.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66666; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Oct 2023 14:16:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 21 10:16:55 2023
Received: from localhost ([127.0.0.1]:44790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1quCmd-00056y-CA
	for submit <at> debbugs.gnu.org; Sat, 21 Oct 2023 10:16:55 -0400
Received: from lists.gnu.org ([2001:470:142::17]:36726)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1quCmZ-00056d-OC
 for submit <at> debbugs.gnu.org; Sat, 21 Oct 2023 10:16:53 -0400
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 <arstoffel@HIDDEN>)
 id 1quCm2-0008RE-Gr
 for bug-gnu-emacs@HIDDEN; Sat, 21 Oct 2023 10:16:18 -0400
Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1quCm0-0008La-D5
 for bug-gnu-emacs@HIDDEN; Sat, 21 Oct 2023 10:16:18 -0400
Received: by mail-ej1-x633.google.com with SMTP id
 a640c23a62f3a-98377c5d53eso262698366b.0
 for <bug-gnu-emacs@HIDDEN>; Sat, 21 Oct 2023 07:16:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1697897773; x=1698502573; darn=gnu.org;
 h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc
 :subject:date:message-id:reply-to;
 bh=+W46Vs+Yl6698+yX4fEU46xjkgC+8txv80yh2oekmGg=;
 b=ipcES6Ewa9Oq92590lsgXNTvRczMo+5C6kEYCaTVr3vwRHLFTz87pZm6iRGS/CpH9M
 ahl8kV4CpGUZYbIfKLNq/RNGCg9aC6gZuSeA1/tCuNm/o7uHBToPnz353dK5kNYshMIa
 ZeG4tJLnH4m35ao2kOrYJyxBLLQAOw5t4uYHtHiG0EtsKJUCYECcptQU0rEcbUNvG65G
 qjtG82hUxVlykS2+SLK02KajTKCks+iQk+k1XZbQ0uaz/OaMFVaSV9BMwXgTuZLa80rS
 mvuSY+VFemgMXVnqi+TdD4BEC8dDuGyeZzq9sUHJQTy+biJSmYFnBtGBhovhP4FToR9p
 3IDA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1697897773; x=1698502573;
 h=mime-version:user-agent:message-id:date:subject:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=+W46Vs+Yl6698+yX4fEU46xjkgC+8txv80yh2oekmGg=;
 b=sMgi5osAyI1JdrvsFuVSJJDgDOxKssYTU1HHmeqEj/7PoHsYlNC5yQngAwjOlmrjys
 ya4H5Q7p+bRP5dDb9T+27rxaTpnJCCc/JnBO1mXkJXHXEF0s6BafAAQJx+jL3/Xp9g7p
 gFE6u2qqLO1HPgNP6Iz64J5HZTO3NKagXWHgcVjA5k99W6v1W5E/SZahO5EZmcrr77Iq
 T/mDbWMMs5L4D2GFYOiOSyjbYKgLutt0AhLQOLIBy1/Hgui6DVe8u7a2dEQxjHTzalup
 h+QJIP8HpG1soI1BpbbxITzsyu1gsToANXOPqrrBGR6PKPQDcpzt7PT4ZxnpeL9xjgwa
 bKTA==
X-Gm-Message-State: AOJu0Yy9UkvqrI5VZ6CvfPFIVXuSri0YeB9XRPahUzBSLWBqeL4O0g5N
 PWBJJufcboguRY344pBAYqqA87J8sQ0=
X-Google-Smtp-Source: AGHT+IFNx2vrPrJK6JJ6aahL9NOCcW8bHOX4e5u99VfObLXhwtz7r4Q2rpgGVM11qcSiId+G26+07Q==
X-Received: by 2002:a17:907:3d94:b0:9ba:fe6:225 with SMTP id
 he20-20020a1709073d9400b009ba0fe60225mr3544031ejc.55.1697897773475; 
 Sat, 21 Oct 2023 07:16:13 -0700 (PDT)
Received: from ars3 ([2a02:8109:8ace:5100::e57c])
 by smtp.gmail.com with ESMTPSA id
 m19-20020a1709066d1300b0099bd453357esm3627057ejr.41.2023.10.21.07.16.12
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 21 Oct 2023 07:16:12 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; Feedback on treesit-font-lock-level
X-Debbugs-Cc: Yuan Fu <casouri@HIDDEN>
Date: Sat, 21 Oct 2023 16:16:11 +0200
Message-ID: <87il70vz6c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::633;
 envelope-from=arstoffel@HIDDEN; helo=mail-ej1-x633.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-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

The docstring of treesit-font-lock-level says:

  Level 1 usually contains only comments and definitions.

As a user of minimal fontification, I don't find this very appealing.
IMO, the lowest fontification level should allow distinguishing code
from non-code, and therefore fontify comments and strings, and nothing
else.




Acknowledgement sent to Augusto Stoffel <arstoffel@HIDDEN>:
New bug report received and forwarded. Copy sent to casouri@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to casouri@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#66666; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 22 Oct 2023 19:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.