all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: Alastair Irving <alastair.j.irving@gmail.com>
Cc: 70383@debbugs.gnu.org, "Eli Zaretskii" <eliz@gnu.org>,
	"Mr. Jostein Kjønigsen" <jostein@kjonigsen.net>,
	"Yuan Fu" <casouri@gmail.com>
Subject: bug#70383: Conf-mode[toml] badly set face property
Date: Mon, 15 Apr 2024 08:43:59 +0200	[thread overview]
Message-ID: <16B0031C-DFCA-42E3-9D76-26AC3D7BDA77@secure.kjonigsen.net> (raw)
In-Reply-To: <b380858c-de65-41d2-91d2-51f65d5e5091@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2311 bytes --]

From 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.

—
Kind Regards
Jostein Kjønigsen

> 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 = "test"
>>> # See more keys and their definitions at
>>> https://doc.rust-lang.org/cargo/reference/manifest.html
>>> [dependencies]
>>> 
>>> 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>


[-- Attachment #2: Type: text/html, Size: 5275 bytes --]

  reply	other threads:[~2024-04-15  6:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14 10:25 bug#70383: Conf-mode[toml] badly set face property Alastair Irving
2024-04-14 16:46 ` Eli Zaretskii
2024-04-14 19:59   ` Alastair Irving
2024-04-15  6:43     ` Jostein Kjønigsen [this message]
2024-04-15 11:35       ` Eli Zaretskii
2024-04-15 14:34     ` Eli Zaretskii
2024-04-17 18:17       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-17 18:31         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-18 17:26           ` Alastair Irving
2024-04-18 18:29             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16B0031C-DFCA-42E3-9D76-26AC3D7BDA77@secure.kjonigsen.net \
    --to=jostein@secure.kjonigsen.net \
    --cc=70383@debbugs.gnu.org \
    --cc=alastair.j.irving@gmail.com \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=jostein@kjonigsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.