GNU bug report logs -
#77095
31.0.50; Using fill-region doesn't produce commented lines in yaml-ts-mode
Previous Next
Reported by: the_wurfkreuz <the_wurfkreuz <at> proton.me>
Date: Tue, 18 Mar 2025 09:13:04 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 77095 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sunday, March 23rd, 2025 at 01:52, the_wurfkreuz <the_wurfkreuz <at> proton.me> wrote:
>
>
> 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.
>
Thanks, and sorry for the delay.
I've attached a patch that fixes it for me.
[0001-Fix-yaml-ts-mode-comment-filling-Bug-77095.patch (text/x-patch, attachment)]
This bug report was last modified 21 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.