unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Rudolf Schlatte <rudi@constantly.at>
To: emacs-devel@gnu.org
Subject: Re: Should yaml-ts-mode inherit from prog-mode?
Date: Mon, 20 Mar 2023 15:37:05 +0100	[thread overview]
Message-ID: <m2zg87bib2.fsf@eduroam-193-157-164-7.wlan.uio.no> (raw)
In-Reply-To: 83mt478w48.fsf@gnu.org

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Mon, 20 Mar 2023 01:52:47 +0000
>> From: Randy Taylor <dev@rjt.dev>
>> Cc: rms@gnu.org, Romanos Skiadas <rom.skiad@gmail.com>, philipk@posteo.net, emacs-devel@gnu.org
>> 
>> Eli, do you have any comments?
>
> Nothing substantial, no.
>
>> The general consensus seems to be that yaml-ts-mode should inherit from prog-mode instead of
>> text-mode.
>> The arguments in favour make sense to me.
>
> That's not my impression.  My impression is that there are arguments
> both ways, and therefore the original decision of having it in
> textmodes still stands.  The arguments to the contrary were not strong
> enough to justify the move, IMO.

Let me try one last argument for making the switch to prog-mode.  Put
the following yaml fragment into a file and hit M-q ("fill-paragraph").
This destroys the yaml structure:

Before fill-paragraph:

    jobs:
      check:
        runs-on: ubuntu-latest
        strategy:
          fail-fast: false
          matrix:
            emacs_version:
              - 27.1
              - 27.2
              - 28.1
              - 28.2

After fill-paragraph:

    jobs: check: runs-on: ubuntu-latest strategy: fail-fast: false matrix:
      emacs_version: - 27.1 - 27.2 - 28.1 - 28.2

I'd argue that many commands offered by text-mode would have to be
audited or adapted to be meaningful in a yaml file; for example, what is
`forward-sentence' supposed to do in the context of yaml?

Most yaml files "in the wild" are configuration files (for Kubernetes,
ansible, and other "modern" tools), so in practice yaml-mode is much
closer to json-mode and lisp-data-mode, both of which derive from
prog-mode.

From memory, my (probably unfair) impression of the arguments against
the change were "I checked the spec, and it isn't a programming language
and has no keywords, so it's clearly text", with the arguments for the
change were more like "these are the things I'd have to adjust to make
it more like prog-mode"; in my case, this would be changing to a
fixed-width font, turning off flyspell, and unbinding (for safety) lots
of text-mode keybindings as I run afoul of them.




  reply	other threads:[~2023-03-20 14:37 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 19:07 Should yaml-ts-mode inherit from prog-mode? 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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2023-02-28 12:24 Romanos Skiadas
2023-02-28 15:52 ` Basil Contovounesios
2023-03-01 14:08   ` Randy Taylor
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

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=m2zg87bib2.fsf@eduroam-193-157-164-7.wlan.uio.no \
    --to=rudi@constantly.at \
    --cc=emacs-devel@gnu.org \
    /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).