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 #20 received at 68781 <at> debbugs.gnu.org (full text, mbox):

From: Graham Marlow <graham <at> mgmarlow.com>
To: Randy Taylor <dev <at> rjt.dev>, Rudolf Schlatte <rudi <at> constantly.at>
Cc: 68781 <at> debbugs.gnu.org
Subject: Re: bug#68781: [PATCH] Don't fill yaml except comments and block
 scalars.
Date: Mon, 29 Jan 2024 17:20:04 -0800
[Message part 1 (text/plain, inline)]
> 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.

For the record I'm also using this grammar.

Looking at the patch, what do you think about retaining the existing 
behavior (so block_scalars still fill correctly) while inhibiting 
fill_paragraph for everything else as suggested? Originally I retained 
the existing behavior of fill-paragraph just to limit the number of 
things changed by the patch, not because it was working properly. I 
think blocking the call to fill-paragraph for non-block/comment nodes 
makes sense.

I attached a patch w/ my edits, but it just swaps the when to and if, 
accepts the comment node type for filling, and returns t to avoid 
calling fill-paragraph for other nodes.
[0001-Inhibit-fill-paragraph-outside-of-blocks-comments.patch (text/plain, attachment)]

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

Previous Next


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