emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An anonymous IRC user's opinion


From: Dmitry Gutov
Subject: Re: An anonymous IRC user's opinion
Date: Sun, 13 Oct 2024 12:37:38 +0300
User-agent: Mozilla Thunderbird

On 13/10/2024 07:41, Eli Zaretskii wrote:

The proposal I'm quoting is straightforward: if Emacs is compiled with
tree-sitter support, enable the modes and warn when the grammars are not
available. If Emacs is not compiled with tree-sitter, do neither.

That kind of rule has predictability: for example if the grammar was not
installed originally but the user did that while Emacs was running, the
corresponding major mode will start working the next time the user tries
to enable it. That wouldn't be the case if we conditionally alter
auto-mode-alist based on grammar availability.

The above approach should be quite easy to implement, if there's
agreement to it. Otherwise, the issue is about choosing the details of
the UI first.

It is not clear which modes you suggest that should behave like that.
Surely, not all of them, i.e. including those for which non-TS modes
are part of Emacs?

I don't have a strong opinion on which set should be enabled - maybe just all TS modes which we don't have built-in counterparts. Maybe not even toml-ts-mode, since there is conf-toml-mode.

Maybe make some exceptions for TS modes that provide significantly better functionality than the classic ones. Not sure which ones.

What I think is important, though, is avoiding major mode functions modiying auto-mode-alist at runtime.

And yes, I would like to hear from more people what they think about
the possible behaviors in these cases, including how to handle missing
grammar libraries.

Everybody's welcome to chime in.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]