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


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rudolf Schlatte <rudi <at> constantly.at>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Don't fill yaml except comments and block scalars.
Date: Sun, 28 Jan 2024 14:15:58 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

Hi,

Currently, yaml-ts-mode fills comments and block scalars (multi-line
text literals) as expected, but re-fills the whole file when point is
outside of either of these constructs.  Since yaml line breaks and
whitespace are significant, I'd say that this is never the correct
behavior.

This patch against current master inhibits M-q (fill-paragraph) outside
of comments and block scalars.  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'.

[0001-Don-t-fill-yaml-except-comments-and-block-scalars.patch (text/patch, attachment)]

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.