GNU bug report logs - #68781
[PATCH] Don't fill yaml except comments and block scalars.

Previous Next

Package: emacs;

Reported by: Rudolf Schlatte <rudi <at> constantly.at>

Date: Sun, 28 Jan 2024 13:17:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Rudolf Schlatte <rudi <at> constantly.at>
To: 68781 <at> debbugs.gnu.org
Subject: bug#68781: [PATCH] Don't fill yaml except comments and block scalars.
Date: Sun, 28 Jan 2024 15:52:50 +0100
Rudolf Schlatte <rudi <at> constantly.at> writes:

> In my tests default fill-paragraph
> worked as expected both with and without justify, correctly detecting
> comment and block literal boundaries, so I did not preserve the previous
> code in `yaml-ts-mode--fill-paragraph'.

Actually there is a change in behavior: if the block scalar contains
empty lines, hence having multiple paragraphs, current master fills all
paragraphs, while after the patch only the current paragraph is filled.

I.e., in the following yaml file:
---
text_section: |
  This is a paragraph of text.

  This is a second paragraph.
some_numeric_value: 1
---
currently lines 2-4 get filled if point is inside these lines, whereas
after the patch only line 2 or line 4 are filled, depending on the
position of point.

I find that I prefer the new behavior, and hope that this change is
acceptable.




This bug report was last modified 1 year and 163 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.