[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should yaml-ts-mode inherit from prog-mode?
From: |
Basil Contovounesios |
Subject: |
Re: Should yaml-ts-mode inherit from prog-mode? |
Date: |
Tue, 28 Feb 2023 15:52:26 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Romanos Skiadas [2023-02-28 14:24 +0200] wrote:
> I was using yaml-ts-mode in Emacs 30, and to my surprise I found it inherits
> from text-mode.
>
> Now, a case can be made for that for sure. The existing rather widely used
> mode uses text-mode, although that seems like an arbitrary
> decision by a single maintainer:
> https://github.com/yoshiki/yaml-mode/issues/17
> https://github.com/yoshiki/yaml-mode/issues/27
> https://github.com/yoshiki/yaml-mode/issues/52
> https://github.com/yoshiki/yaml-mode/pull/85
>
> (I'm not sure Emacs maintainers are beholden to a decision made some jumps
> away and whether this is a strong enough argument to
> keep yaml-ts-mode as is.)
>
> However, and here is where things kind of break down a bit: I would
> personally argue that YAML has a code feel to it, what with all the
> bash scripts that end up in it. Personally, I feel that YAML is more of a
> prog language than JSON (whatever that means), and according to
> the spec it is a superset of JSON. In fact, the JSON mode shipped with Emacs
> inherits from prog-mode!
>
> So, what do people think? Should yaml-ts-mode be changed?
[ Copying in Randy, yaml-ts-mode's author/maintainer. ]
FWIW, my vote is for treating YAML and JSON consistently: if all three
JSON modes in Emacs and GNU ELPA are prog-modes, then so should
yaml-ts-mode; or if yaml-ts-mode is a text-mode, then so should all
three JSON modes.
I suspect most of that ship if not the entire thing has already sailed,
especially in the case of the more established json-mode, but there's
always hope ;).
Thanks,
--
Basil