From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.bugs Subject: bug#70383: Conf-mode[toml] badly set face property Date: Mon, 15 Apr 2024 08:43:59 +0200 Message-ID: <16B0031C-DFCA-42E3-9D76-26AC3D7BDA77@secure.kjonigsen.net> References: <45347c16-6e54-4598-8ac9-33f56f65e106@gmail.com> <868r1fnb8k.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_5F1A0708-79BD-4633-B17B-06F0B0626B1C" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1054"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70383@debbugs.gnu.org, Eli Zaretskii , "Mr. Jostein =?UTF-8?Q?Kj=C3=B8nigsen?=" , Yuan Fu To: Alastair Irving Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 15 08:45:13 2024 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 1rwG5X-000Abr-Gw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Apr 2024 08:45:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwG5G-0007n1-TT; Mon, 15 Apr 2024 02:44:54 -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 1rwG5F-0007m2-F2 for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2024 02:44:53 -0400 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 1rwG5F-0003Lg-6I for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2024 02:44:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rwG5Q-0006U9-7J for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2024 02:45:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Apr 2024 06:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70383 X-GNU-PR-Package: emacs Original-Received: via spool by 70383-submit@debbugs.gnu.org id=B70383.171316349324849 (code B ref 70383); Mon, 15 Apr 2024 06:45:03 +0000 Original-Received: (at 70383) by debbugs.gnu.org; 15 Apr 2024 06:44:53 +0000 Original-Received: from localhost ([127.0.0.1]:36497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwG58-0006Rj-Pn for submit@debbugs.gnu.org; Mon, 15 Apr 2024 02:44:53 -0400 Original-Received: from wfout8-smtp.messagingengine.com ([64.147.123.151]:33807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwG4t-0006OR-Jq for 70383@debbugs.gnu.org; Mon, 15 Apr 2024 02:44:43 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.west.internal (Postfix) with ESMTP id E8A511C00103; Mon, 15 Apr 2024 02:44:13 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 15 Apr 2024 02:44:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1713163453; x=1713249853; bh=b/b31cusY75b2T+7CNbCeHo0gXj7yYdwUf+anV/gLLE=; b= hHPsVZVBV9YS9MqApSvIcCw7b/xb3gnVUYbMlTIVozB0G9Lx2DwX9uOYsx/jMWUr A0NS6rtcavPgL+zAF6FOl5cy9j5SCQeILNZLOGOgmDxMk47/SiTbw670Nms2NNey I4FoqzZpeSIJdb3o6PJfVisGAlU8STAx7qMmFXYOWnKNK5KQFnrYvfr4I2fFwz9Z ME4pCYkrUoEpYRHeCec7V2z+F8qhSvcRK/Mf3WusR2DYuGWndqgf+8fvD38guTan lJw9IC/aT90i81xJJN05xKMqpzs9QXS9AhVHPPLkptzucy4lIIJEKjRgl84CG2z1 usFUzGeSnfI5C9p3CLJOmA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1713163453; x=1713249853; bh=b/b31cusY75b2T+7CNbCeHo0gXj7 yYdwUf+anV/gLLE=; b=YZFpdvm5C5NNnDbLmAL+LW/56jS66mwO18i/1GTx+sbU +T794xmCKKaNYdoTN8nIf3SQlyfvtklMSsNA7KYfI+FEt7GIhllL4IWEbQuNva0Q zFgd0nfxV0UtRrD/MKUh95xefDqHk/N9veT30wkjnz4vGKDx0rZDDfZtPLlWxJwm uxCov5+VV3Wv9RYRZi7nihHGLBvTsaIH/ejpAPAATjkbVqjfDrXHjQECeaFMsO7A OAVpBQdHNQ8KZHzI40JGXMWYIOwlhmUTVnGpYLGja0Czv+Ri2s9GN5KKw0PWvfbI ZsemJid9GDm4pLr/W28FP49t5Yq0GU0w7ski55bHHQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejuddgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffktgggufffjgevvfhfofesrgdtmherhhdtjeenucfhrhhomheplfhoshht vghinhcumfhjpphnihhgshgvnhcuoehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnih hgshgvnhdrnhgvtheqnecuggftrfgrthhtvghrnheptdfhfefgfeeijeffveeludevveev tedtteeiveeifffhhfetieeijeejvdekgfegnecuffhomhgrihhnpehruhhsthdqlhgrnh hgrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepjhhoshhtvghinhesshgvtghurhgvrdhkjhhonhhighhsvghnrdhnvght X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 15 Apr 2024 02:44:11 -0400 (EDT) In-Reply-To: X-Mailer: Apple Mail (2.3774.300.61.1.2) 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:283339 Archived-At: --Apple-Mail=_5F1A0708-79BD-4633-B17B-06F0B0626B1C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 =46rom what I can tell Alastair is using conf-mode, not toml-ts-mode. Alastait: toml-ts-mode is a new builtin tree-sitter based major-mode for = working with TOML files. If you have issues with conf-mode and certain TOML files, you could try = that instead. I just tried it with your test-files and I don't see any = incorrect fontification, so it seems to work fairly well. Eli: If there's a bug to fix in conf-mode, I'm going to assume it would = be better to CC the conf-mode maintainer than the toml-ts-mode = maintainer. It might gain more traction. =E2=80=94 Kind Regards Jostein Kj=C3=B8nigsen > On 14 Apr 2024, at 21:59, Alastair Irving = wrote: >=20 >=20 > On 14/04/2024 17:46, Eli Zaretskii wrote: >>> Date: Sun, 14 Apr 2024 11:25:08 +0100 >>> From: Alastair Irving >>>=20 >>> When editting TOML files with conf-mode[toml] the face property is = being >>> set badly on certain characters. This occurs in Emacs 29.3 (running >>> with -q) but has been present in older versions. Steps to = reproduce: >>>=20 >>> 1. Create a file test.toml containing the following: >>>=20 >>>=20 >>> [package] >>> name =3D "test" >>> # See more keys and their definitions at >>> https://doc.rust-lang.org/cargo/reference/manifest.html >>> [dependencies] >>>=20 >>> 2. Navigate to the d in dependencies and evaluate >>>=20 >>> (text-properties-at (point)) >>>=20 >>> The output for me looks like >>>=20 >>> (face (font-lock-type-face font-lock-type-face font-lock-type-face >>> font-lock-type-face font-lock-type-face font-lock-ty\ >>> pe-face font-lock-type-face font-lock-type-face font-lock-type-face >>> font-lock-type-face >>>=20 >>>=20 >>> It looks like something is wrong in the font-lock setup and the same >>> face is being applied very many times. >> I cannot reproduce this here, neither in Emacs 29 nor in Emacs 30. >> What version of the TOML grammar library are you using? > I don't think it's using a TOML grammar library, just conf-mode = bundled with EMACS "The major mode is Conf[TOML] mode defined in = conf-mode.el". I think an extra newline was inserted in the TOML I = pasted (in the comment before the URL), it should be 4 lines total. I've = attached the exact file. >>=20 >> Jostein and Yuan, can you please look into this? > --Apple-Mail=_5F1A0708-79BD-4633-B17B-06F0B0626B1C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 =46rom what I = can tell Alastair is using conf-mode, not = toml-ts-mode.

Alastait: toml-ts-mode is a new builtin = tree-sitter based major-mode for working with TOML = files.

If you have issues with conf-mode and = certain TOML files, you could try that instead. I just tried it with = your test-files and I don't see any incorrect fontification, so it seems = to work fairly well.

Eli: If there's a bug to = fix in conf-mode, I'm going to assume it would be better to CC the = conf-mode maintainer than the toml-ts-mode maintainer. It might gain = more traction.

=E2=80=94
Kind Regards
Jostein = Kj=C3=B8nigsen

On 14 Apr 2024, at 21:59, = Alastair Irving <alastair.j.irving@gmail.com> wrote:


On 14/04/2024 17:46, Eli Zaretskii = wrote:
Date: Sun, 14 Apr 2024 = 11:25:08 +0100
From: Alastair Irving = <alastair.j.irving@gmail.com>

When editting TOML files with = conf-mode[toml] the face property is being
set badly on certain = characters.  This occurs in Emacs 29.3 (running
with -q) but has = been present in older versions.  Steps to reproduce:

1. = Create a file test.toml containing the = following:


[package]
name =3D "test"
# See more keys = and their definitions = at
https://doc.rust-lang.org/cargo/reference/manifest.html
[dependen= cies]

2. Navigate to the d in dependencies and = evaluate

(text-properties-at (point))

The output for me = looks like

(face (font-lock-type-face font-lock-type-face = font-lock-type-face
font-lock-type-face font-lock-type-face = font-lock-ty\
pe-face font-lock-type-face font-lock-type-face = font-lock-type-face
font-lock-type-face


It looks like = something is wrong in the font-lock setup and the same
face is being = applied very many times.
I cannot reproduce this here, = neither in Emacs 29 nor in Emacs 30.
What version of the TOML grammar = library are you using?
I don't = think it's using a TOML grammar library, just conf-mode bundled with = EMACS "The major mode is Conf[TOML] mode defined in conf-mode.el".  = I think an extra newline was inserted in the TOML I pasted (in the = comment before the URL), it should be 4 lines total. I've attached the = exact file.

Jostein and Yuan, can you please look into = this?
<test.toml>

= --Apple-Mail=_5F1A0708-79BD-4633-B17B-06F0B0626B1C--