[Top][All Lists]

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

Re: Should yaml-ts-mode inherit from prog-mode?

From: David Ongaro
Subject: Re: Should yaml-ts-mode inherit from prog-mode?
Date: Mon, 13 Mar 2023 18:45:23 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Daniel Fleischer <danflscr@gmail.com> writes:

> If we look at font lock definitions, org-mode also highlights various
> constructs; it doesn't mean it's a programming language. 

But that's what I mean, the classification as programming language is
independent of if something has keywords. It's neither a necessary nor
sufficient condition (even if we see it as an indicator).

> Please point out where in the YAML spec "yes" is used as a boolean.

I probably can skip that since others did this already.

> And again, usefulness of highlighting different objects does not mean
> it's a programming language.

Again, I don't think anyone argues that YAML is a programming language,
(even if one can easily produce documents much larger than the original
code via anchors and refs and even if one can do pretty crazy things via
tags*). The question is if prog-mode may be a better fit for yaml-mode.
Since JSON is prog-mode and YAML is a superset of JSON the logical
answer appears to be 'yes'.

* E.g. try this in Python

import yaml
y = b'!!python/object/apply:time.sleep [10]'


PS: Unrelated to the topic, but since this header is appearing in every
mail I probably could ask this question anywhere:

> Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/304358>

Isn't the gmane.org domain down since years now? I suppose this header
may be included due to an outdated Mailman configuration? In any case my
actual question is: what is the easiest way to get the corresponding
https://lists.gnu.org/archive/ permalink of an article? Is there a magic
key-combination in Gnus?

reply via email to

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