unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Randy Taylor <dev@rjt.dev>
To: Basil Contovounesios <contovob@tcd.ie>
Cc: Romanos Skiadas <rom.skiad@gmail.com>, emacs-devel@gnu.org
Subject: Re: Should yaml-ts-mode inherit from prog-mode?
Date: Wed, 01 Mar 2023 14:08:52 +0000	[thread overview]
Message-ID: <Gzj9Gg1HhvYRHFW7rS12F28VsNV-w-laKjEnMPmhQYDBHULyeztq4rTI39Js1a9SK6J5j71myDpun7m1AMSGQnMCjFZb5wneZfNe6V7SeyI=@rjt.dev> (raw)
In-Reply-To: <87r0u9wzwl.fsf@tcd.ie>

On Tuesday, February 28th, 2023 at 10:52, Basil Contovounesios <contovob@tcd.ie> wrote:
> 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. ]

Thanks.

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

I think the JSON modes are prog-modes just because they are attached to the javascript modes in some way (usually derived from it). I'm not sure how much weight we can assign to certain modes deriving from other modes and saying we should do the same (especially in the case of ELPA/MELPA modes); instead we should ask which mode makes the most sense to derive from. Although there is the argument for consistency that you mentioned...

Deriving from prog-mode feels weird since YAML is not a programming language.

A lot of people (per OP's linked GitHub issues) seem to think/expect it to derive from prog-mode, but I'm not sure how correct those assumptions are. It seems they just want their prog-mode hooks to work with it.

If everyone thinks it should derive from prog-mode and there are no bad consequences for doing so, then I'm not against it.

Do any Emacs maintainers have any thoughts on the matter?



  reply	other threads:[~2023-03-01 14:08 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 12:24 Should yaml-ts-mode inherit from prog-mode? Romanos Skiadas
2023-02-28 15:52 ` Basil Contovounesios
2023-03-01 14:08   ` Randy Taylor [this message]
2023-03-01 14:28     ` Lynn Winebarger
2023-03-01 16:35     ` Vasilij Schneidermann
2023-03-02 12:55       ` Lynn Winebarger
2023-03-02 13:44       ` Philip Kaludercic
2023-03-03  9:00         ` Rudolf Schlatte
2023-03-03 21:58           ` Yuan Fu
2023-03-04 18:45             ` Juri Linkov
2023-02-28 17:50 ` Daniel Fleischer
2023-02-28 17:56 ` Daniel Fleischer
2023-02-28 18:33   ` Dmitry Gutov
2023-03-01 13:35     ` Basil Contovounesios
2023-03-12  2:14   ` Ongaro
2023-03-12  9:20     ` Daniel Fleischer
2023-03-12 12:31       ` Rudolf Schlatte
2023-03-13  8:44       ` Yuri Khan
2023-03-14  1:45       ` David Ongaro
2023-03-01  7:46 ` Matthias Meulien
2023-03-01 13:45   ` Basil Contovounesios
2023-03-07 11:27     ` Jostein Kjønigsen
2023-03-07 14:28       ` Matthias Meulien
  -- strict thread matches above, loose matches on Subject: below --
2023-03-02 19:07 Romanos Skiadas
2023-03-03  4:23 ` Richard Stallman
2023-03-04 18:24   ` Romanos Skiadas
2023-03-20  1:52     ` Randy Taylor
2023-03-20 12:07       ` Eli Zaretskii
2023-03-20 14:37         ` Rudolf Schlatte
2023-03-20 16:20           ` Brian Cully via Emacs development discussions.
2023-03-20 16:53           ` Eli Zaretskii
2023-03-21 11:19           ` Jostein Kjønigsen
2023-03-21 13:26             ` Eli Zaretskii
2023-03-21 13:54               ` Rudolf Schlatte
2023-03-21 14:43                 ` Yuri Khan
2023-03-21 15:03                   ` Rudolf Schlatte
2023-03-22  6:04                     ` Yuri Khan
2023-03-22  2:37           ` David Ongaro
2023-03-21  3:13         ` Randy Taylor

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='Gzj9Gg1HhvYRHFW7rS12F28VsNV-w-laKjEnMPmhQYDBHULyeztq4rTI39Js1a9SK6J5j71myDpun7m1AMSGQnMCjFZb5wneZfNe6V7SeyI=@rjt.dev' \
    --to=dev@rjt.dev \
    --cc=contovob@tcd.ie \
    --cc=emacs-devel@gnu.org \
    --cc=rom.skiad@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).