Subject: Re: bug#77095: 31.0.50; Using fill-region doesn't produce commented lines in yaml-ts-mode

From: the_wurfkreuz <[email-masked]>
Date: Sun, 23 Mar 2025 05:52:18 +0000

I cleared the scratch buffer and pasted this yaml:

```
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  # some comment aosiertn oairsetn oarisetn oarisetn oarisent oarisetn oa risetn oairsetn
  name: hostpath-pvc-reboot-test
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: manual-reboot-test
  resources:
    requests:
      storage: 500Mi
```

Then i enabled yaml-ts-mode.
I went to the commented line and did `back-to-indentation`, then `set-mark-command` followed by `move-end-of-line` and `fill-region`.
And this is the result i got:

```
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  # some comment aosiertn oairsetn oarisetn oarisetn oarisent oarisetn
    oa risetn oairsetn
  name: hostpath-pvc-reboot-test
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: manual-reboot-test
  resources:
    requests:
      storage: 500Mi
```

I expect it to be like this:

```
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  # some comment aosiertn oairsetn oarisetn oarisetn oarisent oarisetn
  # oa risetn oairsetn
  name: hostpath-pvc-reboot-test
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: manual-reboot-test
  resources:
    requests:
      storage: 500Mi
```

I use emacs from the master branch.

On Saturday, March 22nd, 2025 at 8:44 PM, Randy Taylor <[email-masked]> wrote:

> On Tuesday, March 18th, 2025 at 05:11, the_wurfkreuz via "Bug reports for GNU Emacs, the Swiss army knife of text editors" [email-masked] wrote:
> 
> > It's the same issue as in this bug report #75978, but for yaml-ts-mode. Do i need to provide reproduction steps still?
> 
> 
> I followed the instructions listed in #75978 and it works for me as
> expected.
> 
> I tried on master (commit 2658f4eab96aaad7f52245c2422bbfa51db9b207).
> 
> If you see otherwise, please post specific reproduction steps.