emacs-devel
[Top][All Lists]
Advanced

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

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


From: Eli Zaretskii
Subject: Re: Should yaml-ts-mode inherit from prog-mode?
Date: Tue, 21 Mar 2023 15:26:28 +0200

> Date: Tue, 21 Mar 2023 12:19:31 +0100
> From: Jostein Kjønigsen <jostein@secure.kjonigsen.net>
> 
> On 3/20/23 15:37, Rudolf Schlatte wrote:
> >
> > 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
> >
> Following up on this exact use-case, due to my text-mode hooks, using 
> yaml-ts-mode many times ended up with causing invalid YAML or breaking 
> existing YAML-files.
> 
> I was pretty sure yaml-ts-mode itself was buggy and actually started 
> using fundamental-mode to edit yaml-files instead, until I realized what 
> was going on.
> 
> == Yes. The user-experience was literally that bad. ==
> 
> Lots of people are going to have lots of problems and breakage when 
> using yaml-ts-mode as it is today, deriving from text-mode.
> 
> I plea from the bottom of my heart that we allow a change to prog-mode.

We should instead fix yaml-ts-mode by providing a proper
fill-paragraph-function for it.  No one said that the default
text-mode one will do TRT.



reply via email to

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