Subject: bug#68781: [PATCH] Don't fill yaml except comments and block scalars.

From: Randy Taylor <[email-masked]>
Date: Mon, 29 Jan 2024 14:08:01 +0000

On Monday, January 29th, 2024 at 03:20, Rudolf Schlatte <[email-masked]> wrote:
> 
> Hello Randy, thanks for having a look! Could you tell me which
> tree-sitter grammar you are using? I'm asking because with the grammar
> from https://github.com/ikatyang/tree-sitter-yaml I don't see what you
> describe.

That's the one I'm using.

Here are some examples I see when using emacs -Q:

a:
    b: 4
foo: |
  l<POINT>ine-one

  line-two

Place point where <POINT> is (and remove that text of course). Then run M-x fill-paragraph. This is what I see as a result:

a: b: 4 foo: | line-one

  line-two

And with the example from bug#68226:
foo: |
  l<POINT>ine-one
  line-two

After M-x fill-paragraph I see:
foo: | line-one line-two

Hopefully these reproduce for you too.

> 
> Needless to say, please don't install the patch before I have debugged
> this. :)
> 
> Best, Rudi