From unknown Thu Aug 14 18:39:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#68781 <68781@debbugs.gnu.org> To: bug#68781 <68781@debbugs.gnu.org> Subject: Status: [PATCH] Don't fill yaml except comments and block scalars. Reply-To: bug#68781 <68781@debbugs.gnu.org> Date: Fri, 15 Aug 2025 01:39:56 +0000 retitle 68781 [PATCH] Don't fill yaml except comments and block scalars. reassign 68781 emacs submitter 68781 Rudolf Schlatte severity 68781 normal tag 68781 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 28 08:16:27 2024 Received: (at submit) by debbugs.gnu.org; 28 Jan 2024 13:16:27 +0000 Received: from localhost ([127.0.0.1]:56842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rU51P-0004Sx-2g for submit@debbugs.gnu.org; Sun, 28 Jan 2024 08:16:27 -0500 Received: from lists.gnu.org ([2001:470:142::17]:44848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rU51N-0004Sk-K9 for submit@debbugs.gnu.org; Sun, 28 Jan 2024 08:16:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rU518-0006Uo-Ob for bug-gnu-emacs@gnu.org; Sun, 28 Jan 2024 08:16:10 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rU513-0008UL-7s for bug-gnu-emacs@gnu.org; Sun, 28 Jan 2024 08:16:09 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.nyi.internal (Postfix) with ESMTP id 2404A5C0260 for ; Sun, 28 Jan 2024 08:16:03 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 28 Jan 2024 08:16:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1706447763; x=1706534163; bh=/GROhgdWe95xG5q3CrqnDNIVD0anWq+Cgx7 e6npP0Fo=; b=bS2xqy5lyFLUMRKxt4TXh+m3/hWBCY9EYtKGtTPY+iI4r0eD9DK zDQ2hWJ3qap51cDUPEILZKlI5Gq7f9ZFP6WfH0KHvLOZAclH6k8KX3nj0WN/XoXZ dGADXgUAZccb3KyPq2FE4rkxAklpBF1IKzzwWlLtii35NEYTSY7BwVj9GZX7w+t8 fuKzx4a2qK93YHg+uwLPYGAUVG1/551Z49fKEKB0Q1ZooR5XRLAHETZd+b2FVlNu 7yZcR1mbcSDBJc9vm0GNoO5q+EJ3JojV1W6aIXErnDjOsI8etnvbA/qlP5Syz1bb /M+ng9JBbzmdaJQ7KzupvU5rWveZh3AGu9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedtvddggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehmtderredttd dtnecuhfhrohhmpeftuhguohhlfhcuufgthhhlrghtthgvuceorhhuughisegtohhnshht rghnthhlhidrrghtqeenucggtffrrghtthgvrhhnpeefkeekuefhheehtddtueekheffve elieeifeekveeihfelveetgfekgeehieffleenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehruhguihestghonhhsthgrnhhtlhihrdgrth X-ME-Proxy: Feedback-ID: i5b4840b3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 28 Jan 2024 08:16:02 -0500 (EST) From: Rudolf Schlatte To: bug-gnu-emacs@gnu.org Subject: [PATCH] Don't fill yaml except comments and block scalars. Date: Sun, 28 Jan 2024 14:15:58 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: none client-ip=66.111.4.29; envelope-from=rudi@constantly.at; helo=out5-smtp.messagingengine.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain 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'. --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Don-t-fill-yaml-except-comments-and-block-scalars.patch >From 003e9f0dbd20059dbf49761a7537658947a98d55 Mon Sep 17 00:00:00 2001 From: Rudolf Schlatte Date: Sun, 28 Jan 2024 13:54:35 +0100 Subject: [PATCH] Don't fill yaml except comments and block scalars. Indentation and line breaks are significant syntax, so only fill reflowable nodes. * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode--fill-paragraph): Check if point is inside a comment or block scalar, do not fill otherwise. --- lisp/textmodes/yaml-ts-mode.el | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/lisp/textmodes/yaml-ts-mode.el b/lisp/textmodes/yaml-ts-mode.el index c0185457bc2..301d7ba03a9 100644 --- a/lisp/textmodes/yaml-ts-mode.el +++ b/lisp/textmodes/yaml-ts-mode.el @@ -120,25 +120,17 @@ yaml-ts-mode--font-lock-settings '((ERROR) @font-lock-warning-face)) "Tree-sitter font-lock settings for `yaml-ts-mode'.") -(defun yaml-ts-mode--fill-paragraph (&optional justify) +(defun yaml-ts-mode--fill-paragraph (&optional _justify) "Fill paragraph. -Behaves like `fill-paragraph', but respects block node -boundaries. JUSTIFY is passed to `fill-paragraph'." - (interactive "*P") - (save-restriction - (widen) - (let ((node (treesit-node-at (point)))) - (when (string= "block_scalar" (treesit-node-type node)) - (let* ((start (treesit-node-start node)) - (end (treesit-node-end node)) - (start-marker (point-marker)) - (fill-paragraph-function nil)) - (save-excursion - (goto-char start) - (forward-line) - (move-marker start-marker (point)) - (narrow-to-region (point) end)) - (fill-region start-marker end justify)))))) +Hand over to `fill-paragraph' if point is inside a comment or +block scalar; do nothing otherwise." + (let ((node (treesit-node-at (point))) + (fillable-types '("block_scalar" "comment"))) + (if (member (treesit-node-type node) fillable-types) + ;; Explicitly return these two specific values; see + ;; `fill-paragraph-function' documentation. + nil + t))) ;;;###autoload (define-derived-mode yaml-ts-mode text-mode "YAML" -- 2.43.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 28 09:53:12 2024 Received: (at 68781) by debbugs.gnu.org; 28 Jan 2024 14:53:12 +0000 Received: from localhost ([127.0.0.1]:56913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rU6X2-00073c-H0 for submit@debbugs.gnu.org; Sun, 28 Jan 2024 09:53:12 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:57601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rU6Wz-00073L-Le for 68781@debbugs.gnu.org; Sun, 28 Jan 2024 09:53:10 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5B4955C01DE for <68781@debbugs.gnu.org>; Sun, 28 Jan 2024 09:52:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 28 Jan 2024 09:52:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706453575; x=1706539975; bh=3W6cG9JX/es/PiXYGK4/pgnjV/Zr RG797d34TZFWR5c=; b=H1xzd0zoGIjANNM8/otTGvugNuARuS1dh7sgUKCelSJW Rbld8ltvB5emFB4my8Mtg+G6NTmrEsrGLqZFVwvYQrQHZ/mZy6kQ8yecb4z0lmmf NEaNqfLDjlNIAQ/ZtfKMlv9Bgxe5q0z6jwdXnevbUG+AZFfG1+h64NU/KuzidQ3U 6b3o7lqeBjWACao74/cPZ4lnCRrpL85yPn6h4LoBfSQmWkjCRrDkWIkEsNmhvS3m zQn5syq7vxWJL5dI7lins12qegRhh6usN1QvyY6yDKDQRimGngyXKwXelDEZWVKN OA7ecrdjy2hI7S2TooXOBOIEmh4SupWXapnoCXp1Yw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedtvddgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffffkfgggtgesthdtre dttdertdenucfhrhhomheptfhuugholhhfucfutghhlhgrthhtvgcuoehruhguihestgho nhhsthgrnhhtlhihrdgrtheqnecuggftrfgrthhtvghrnhepiefgudeljedttdetieevie fhvdejieehlefhieeikeegieefleffffeltddukeeunecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheprhhuughisegtohhnshhtrghnthhlhidrrg ht X-ME-Proxy: Feedback-ID: i5b4840b3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <68781@debbugs.gnu.org>; Sun, 28 Jan 2024 09:52:54 -0500 (EST) From: Rudolf Schlatte To: 68781@debbugs.gnu.org Subject: Re: bug#68781: [PATCH] Don't fill yaml except comments and block scalars. In-Reply-To: (Rudolf Schlatte's message of "Sun, 28 Jan 2024 14:15:58 +0100") References: Date: Sun, 28 Jan 2024 15:52:50 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68781 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Rudolf Schlatte 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 28 22:48:32 2024 Received: (at 68781) by debbugs.gnu.org; 29 Jan 2024 03:48:32 +0000 Received: from localhost ([127.0.0.1]:58743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUIdM-0004LR-0G for submit@debbugs.gnu.org; Sun, 28 Jan 2024 22:48:32 -0500 Received: from mail-4323.proton.ch ([185.70.43.23]:36605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUIdE-0004Js-1R for 68781@debbugs.gnu.org; Sun, 28 Jan 2024 22:48:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail; t=1706500088; x=1706759288; bh=bPwE6U4TL3Q6Zdt8J5pzfteYhsine9ZVrierTzJvelE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=H5YWya4uEQ6vpaS55+5Q+lcP7kQXFv3OrWIyiZISjDeUHoXS6Xm2fF/M1G0+JGb51 dnfREhMJAPXZY0bDrCp8r3dHMyo7oirzVGoR/NUJG2w+GKehlskguwbisfEmmU0pdA zu5MNvk6hZZfWiBS4g7kAQs5aBap0U0332jGDgeZllNyWB5UNHzUYS2O79bnJ1Xv1O OsWZSEvcGDmGPnythvatpEzgE4iBMpy8pDPmkVgiGaFP2M+mI9OOCmcKCK/MaYXigk ew4SZT79RJM6Mswhd1TpLNIJFvWjtixQaOOZ9giUYyzJSPETr6D76JA2CD+aqiJ12M 1HwFYr9VZ+6SA== Date: Mon, 29 Jan 2024 03:47:53 +0000 To: Rudolf Schlatte From: Randy Taylor Subject: Re: bug#68781: [PATCH] Don't fill yaml except comments and block scalars. Message-ID: In-Reply-To: References: Feedback-ID: 44397038:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68781 Cc: "graham@mgmarlow.com" , 68781@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sunday, January 28th, 2024 at 08:15, Rudolf Schlatte wrote: >=20 >=20 > Tags: patch >=20 > Hi, >=20 > 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. >=20 > 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'. Thanks for working on this. The previous implementation (see bug#68226) provided an example where: foo: | line-one line-two Would become: foo: | line-one line-two When it should be: foo: | line-one line-two Your patch undoes this fix. I think I also ran into another bug using your patch: when inside a block s= calar, for example, running fill-paragraph will re-fill the whole file (or = parts of it at least). I agree that we shouldn't try to fill anything that isn't a comment or bloc= k scalar, and I also like the change in your other message where only the p= aragraph that point is on gets filled. BTW would it be possible to add tests for these? See `c-ts-mode-tests.el', = specifically `c-ts-mode-test-filling', for inspiration. Graham, you added `yaml-ts-mode--fill-paragraph' - what are your thoughts? = See also Rudolf's other message. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 29 03:20:25 2024 Received: (at 68781) by debbugs.gnu.org; 29 Jan 2024 08:20:25 +0000 Received: from localhost ([127.0.0.1]:59017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUMsT-0006Fj-Dj for submit@debbugs.gnu.org; Mon, 29 Jan 2024 03:20:25 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:55509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUMsQ-0006FT-Rl for 68781@debbugs.gnu.org; Mon, 29 Jan 2024 03:20:24 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.nyi.internal (Postfix) with ESMTP id D2E2F5C0121; Mon, 29 Jan 2024 03:20:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 29 Jan 2024 03:20:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706516408; x=1706602808; bh=oJRsUehJrQgQgJ5Vu4Vy23CNnvDr 2Hw4HK/QWEEUj3M=; b=NUqjEBHF6AdxG4Z0mug+SwUITpEo58j5nhtNNQ18NtqW 4OSotFXFxUxyNhUmk/i3QMOp0d5pukWtxUllWKoD0XWUNKMnOtimE5iOCYEBASFc g4pk22HO0zEUtzI8Ciba4OtbpOKO+xAL19A2pCkerDOlJGIoDiX3KwfqIHE2TQNK MITnhS8tQYxORgmof4av5x8YCJnOpynCkgQSew7ad6DzGzflEDyrt7JNeJNVyRkl /HTMgZKIexsMmZT6UoDqt/twHz6aG8vEZW27DKVVVUwJh1YfxNXgKggsHMz7wcH4 ZxAzPLGy8Fgrv0M4mgkH+GDw39uFrdUicaxTWc08nQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedtfedgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefujghffffkfgggtgesth dtredttdertdenucfhrhhomheptfhuugholhhfucfutghhlhgrthhtvgcuoehruhguihes tghonhhsthgrnhhtlhihrdgrtheqnecuggftrfgrthhtvghrnhepledvhfeftddtudehue dvveeguedvheejudeugfevhfejhffhgeeljeeuheeffefhnecuffhomhgrihhnpehgihht hhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehruhguihestghonhhsthgrnhhtlhihrdgrth X-ME-Proxy: Feedback-ID: i5b4840b3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Jan 2024 03:20:07 -0500 (EST) From: Rudolf Schlatte To: Randy Taylor Subject: Re: bug#68781: [PATCH] Don't fill yaml except comments and block scalars. In-Reply-To: (Randy Taylor's message of "Mon, 29 Jan 2024 03:47:53 +0000") References: Date: Mon, 29 Jan 2024 09:20:04 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68781 Cc: "graham@mgmarlow.com" , 68781@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Randy Taylor writes: > On Sunday, January 28th, 2024 at 08:15, Rudolf Schlatte wrote: >> >> 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'. > > Thanks for working on this. > > The previous implementation (see bug#68226) provided an example where: > foo: | > line-one > line-two > > Would become: > foo: | line-one line-two > > When it should be: > foo: | > line-one line-two > > Your patch undoes this fix. > > I think I also ran into another bug using your patch: when inside a block > scalar, for example, running fill-paragraph will re-fill the whole file (or > parts of it at least). > > I agree that we shouldn't try to fill anything that isn't a comment or block > scalar, and I also like the change in your other message where only the > paragraph that point is on gets filled. > > BTW would it be possible to add tests for these? See `c-ts-mode-tests.el', > specifically `c-ts-mode-test-filling', for inspiration. > > Graham, you added `yaml-ts-mode--fill-paragraph' - what are your thoughts? See also Rudolf's other message. 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. Needless to say, please don't install the patch before I have debugged this. :) Best, Rudi From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 29 09:08:31 2024 Received: (at 68781) by debbugs.gnu.org; 29 Jan 2024 14:08:31 +0000 Received: from localhost ([127.0.0.1]:59347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUSJL-0007cn-3i for submit@debbugs.gnu.org; Mon, 29 Jan 2024 09:08:31 -0500 Received: from mail-4022.proton.ch ([185.70.40.22]:27079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUSJH-0007cV-Hm for 68781@debbugs.gnu.org; Mon, 29 Jan 2024 09:08:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail; t=1706537290; x=1706796490; bh=ks9bGXPMPUGFg8XKQ44Ww5t+hJYijonG2JyXz62PXuc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=TRlT20E9qpukOG+InpK2C8acshavmSmr8dl7dKhmbVueTTrnnjZWu/EF/6Yfrqmry Z5VffQFzV/MLDtUnPWpuINg818Y6Y8Bl+QIZxikHujFQmYV24cAQD5i5kUUo5cTzVq EJwk5v9sqhOIlWEwYFhVyk86odVSTouWeM4vq1UZwFZ2o0hntQcntTn3JxOgxSc8GH jPpk2B9I6ieuHM5eouKYPjTHPlj42UBjhk4KPCIp3fdATisAwhVBoqh0T6X5kF66aD Sx/mI3ntzlDWvc7ueoNkcPEhQqUrl3MtDYhpDNsBdoUg/X92zeY/Vi7uLSP2XN8EJy iTFjdB9+jWFiQ== Date: Mon, 29 Jan 2024 14:08:01 +0000 To: Rudolf Schlatte From: Randy Taylor Subject: Re: bug#68781: [PATCH] Don't fill yaml except comments and block scalars. Message-ID: In-Reply-To: References: Feedback-ID: 44397038:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68781 Cc: "graham@mgmarlow.com" , 68781@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Monday, January 29th, 2024 at 03:20, Rudolf Schlatte wrote: >=20 > 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. That's the one I'm using. Here are some examples I see when using emacs -Q: a: b: 4 foo: | line-one line-two Place point where is (and remove that text of course). Then run M-x= fill-paragraph. This is what I see as a result: a: b: 4 foo: | line-one line-two And with the example from bug#68226: foo: | line-one line-two After M-x fill-paragraph I see: foo: | line-one line-two Hopefully these reproduce for you too. >=20 > Needless to say, please don't install the patch before I have debugged > this. :) >=20 > Best, Rudi From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 29 20:20:22 2024 Received: (at 68781) by debbugs.gnu.org; 30 Jan 2024 01:20:22 +0000 Received: from localhost ([127.0.0.1]:34057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUcnW-00045n-1k for submit@debbugs.gnu.org; Mon, 29 Jan 2024 20:20:22 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:35529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUcnT-00045W-3M for 68781@debbugs.gnu.org; Mon, 29 Jan 2024 20:20:20 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 26FFA5C0160; Mon, 29 Jan 2024 20:20:05 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 29 Jan 2024 20:20:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgmarlow.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1706577605; x=1706664005; bh=En65nAcREf YsxXa0zy0bZD9vM9dYm5fpbaguIX228nk=; b=n6899qmzUAfrQ/Ny76JX3/tOGM yUvlhsfbUlgBB6IbFzlgC9oxiB6sFuaHOY6wzl1wlzFqTsRWArhc32ADC59kaFBo 8Pav3xleCGCFpV2qNb0SSMtW4hyTpfWYM8SD91R14VqW1AM2MC2ASBaznwloF19C ICLZmhqCMuABG48+2z3kfkfMZMNQN09kP424/xUv/R52bU2KqwP8TTAHx8gh8bRM AMNmUU0+gS+oW2038Z+1YSRmkGsC3UHK4BQjubgqAlgAi3A0gzxds2Uur1waFR5F /z3BK4fiFLC7pZ1+/80p8ufz5LwGXh5PweXJUEi5GC3voVGxoqDY9eNYQPQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706577605; x=1706664005; bh=En65nAcREfYsxXa0zy0bZD9vM9dY m5fpbaguIX228nk=; b=bo0dXcDmBQxkhIdUrwO+hhf3slL308lZp7TfukleEOmk 6OwESdXwUFJwSUf2DV8WitWaA7AffOQp9klnG9a99XkifRVRCrFrJn6SmA3uEyw0 8U+vYerCH1aYQciWQmYAhiQynizE/ULu0K3Nx9G/hjdGH/wf4Xz2fQOKcNxA2+FY MR6bjw+3LO4/jMRonGRG1cJABSqOFZkbw5xF7EuWRD+SDoGjTw5NzMaA6iM+YNum OaAjnkxh6QjURbIxEl8tswx7ypdsgOiKOK+HCGj7FagVeXhHyTzCXm+wd5DNKSFV uk7gzRN2BQuT+mxDEq+dcVeIgKAPW4eDPnnbZz4UdA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedthedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegtkfffgggfuffvvehfhfgjsehmtd erredtvdejnecuhfhrohhmpefirhgrhhgrmhcuofgrrhhlohifuceoghhrrghhrghmsehm ghhmrghrlhhofidrtghomheqnecuggftrfgrthhtvghrnhepgeekieffjeekgeeikeetge egudehudfhgfejvdejieeiveefhfeiledthfetteefnecuffhomhgrihhnpehgihhthhhu sgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehgrhgrhhgrmhesmhhgmhgrrhhlohifrdgtohhm X-ME-Proxy: Feedback-ID: i9bd1467a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Jan 2024 20:20:04 -0500 (EST) Content-Type: multipart/mixed; boundary="------------lpRgLdO6zOND21bvRgBA6nZS" Message-ID: <216ddb7b-e02d-4e68-9dbb-68fa1202d198@mgmarlow.com> Date: Mon, 29 Jan 2024 17:20:04 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#68781: [PATCH] Don't fill yaml except comments and block scalars. To: Randy Taylor , Rudolf Schlatte References: Content-Language: en-US From: Graham Marlow In-Reply-To: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68781 Cc: 68781@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This is a multi-part message in MIME format. --------------lpRgLdO6zOND21bvRgBA6nZS Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > 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. --------------lpRgLdO6zOND21bvRgBA6nZS Content-Type: text/plain; charset=UTF-8; name="0001-Inhibit-fill-paragraph-outside-of-blocks-comments.patch" Content-Disposition: attachment; filename*0="0001-Inhibit-fill-paragraph-outside-of-blocks-comments.patch" Content-Transfer-Encoding: base64 RnJvbSA1Y2M1NjhmNmNjN2IyMzczMzdiOTczYWE5ZjY0ZjZjOTdhYjdiY2E4IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBHcmFoYW0gTWFybG93IDxncmFoYW1AbWdtYXJsb3cu Y29tPgpEYXRlOiBNb24sIDI5IEphbiAyMDI0IDE3OjE2OjA0IC0wODAwClN1YmplY3Q6IFtQ QVRDSF0gSW5oaWJpdCBmaWxsLXBhcmFncmFwaCBvdXRzaWRlIG9mIGJsb2Nrcy9jb21tZW50 cwoKKiBsaXNwL3RleHRtb2Rlcy95YW1sLXRzLW1vZGUuZWwgKHlhbWwtdHMtbW9kZS0tZmls bC1wYXJhZ3JhcGgpOiBBdm9pZAogIGZpbGwtcGFyYWdyYXBoIHdoZW4gb3V0c2lkZSBvZiBi bG9ja19zY2FsYXIgb3IgY29tbWVudCBub2Rlcy4KLS0tCiBsaXNwL3RleHRtb2Rlcy95YW1s LXRzLW1vZGUuZWwgfCA1ICsrKy0tCiAxIGZpbGUgY2hhbmdlZCwgMyBpbnNlcnRpb25zKCsp LCAyIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xpc3AvdGV4dG1vZGVzL3lhbWwtdHMt bW9kZS5lbCBiL2xpc3AvdGV4dG1vZGVzL3lhbWwtdHMtbW9kZS5lbAppbmRleCBjMDE4NTQ1 N2JjMi4uYThjYjUwNGVmMDMgMTAwNjQ0Ci0tLSBhL2xpc3AvdGV4dG1vZGVzL3lhbWwtdHMt bW9kZS5lbAorKysgYi9saXNwL3RleHRtb2Rlcy95YW1sLXRzLW1vZGUuZWwKQEAgLTEyOCw3 ICsxMjgsNyBAQCBib3VuZGFyaWVzLiAgSlVTVElGWSBpcyBwYXNzZWQgdG8gYGZpbGwtcGFy YWdyYXBoJy4iCiAgIChzYXZlLXJlc3RyaWN0aW9uCiAgICAgKHdpZGVuKQogICAgIChsZXQg KChub2RlICh0cmVlc2l0LW5vZGUtYXQgKHBvaW50KSkpKQotICAgICAgKHdoZW4gKHN0cmlu Zz0gImJsb2NrX3NjYWxhciIgKHRyZWVzaXQtbm9kZS10eXBlIG5vZGUpKQorICAgICAgKGlm IChtZW1iZXIgKHRyZWVzaXQtbm9kZS10eXBlIG5vZGUpICcoImJsb2NrX3NjYWxhciIgImNv bW1lbnQiKSkKICAgICAgICAgKGxldCogKChzdGFydCAodHJlZXNpdC1ub2RlLXN0YXJ0IG5v ZGUpKQogICAgICAgICAgICAgICAgKGVuZCAodHJlZXNpdC1ub2RlLWVuZCBub2RlKSkKICAg ICAgICAgICAgICAgIChzdGFydC1tYXJrZXIgKHBvaW50LW1hcmtlcikpCkBAIC0xMzgsNyAr MTM4LDggQEAgYm91bmRhcmllcy4gIEpVU1RJRlkgaXMgcGFzc2VkIHRvIGBmaWxsLXBhcmFn cmFwaCcuIgogICAgICAgICAgICAgKGZvcndhcmQtbGluZSkKICAgICAgICAgICAgIChtb3Zl LW1hcmtlciBzdGFydC1tYXJrZXIgKHBvaW50KSkKICAgICAgICAgICAgIChuYXJyb3ctdG8t cmVnaW9uIChwb2ludCkgZW5kKSkKLSAgICAgICAgICAoZmlsbC1yZWdpb24gc3RhcnQtbWFy a2VyIGVuZCBqdXN0aWZ5KSkpKSkpCisgICAgICAgICAgKGZpbGwtcmVnaW9uIHN0YXJ0LW1h cmtlciBlbmQganVzdGlmeSkpCisgICAgICAgIHQpKSkpCiAKIDs7OyMjI2F1dG9sb2FkCiAo ZGVmaW5lLWRlcml2ZWQtbW9kZSB5YW1sLXRzLW1vZGUgdGV4dC1tb2RlICJZQU1MIgotLSAK Mi40Mi4wLndpbmRvd3MuMQoK --------------lpRgLdO6zOND21bvRgBA6nZS-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 30 05:16:08 2024 Received: (at submit) by debbugs.gnu.org; 30 Jan 2024 10:16:08 +0000 Received: from localhost ([127.0.0.1]:34250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUlA0-0003zA-Fv for submit@debbugs.gnu.org; Tue, 30 Jan 2024 05:16:08 -0500 Received: from lists.gnu.org ([2001:470:142::17]:39214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUl9x-0003ye-Tm for submit@debbugs.gnu.org; Tue, 30 Jan 2024 05:16:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUl9j-0003BK-4d for bug-gnu-emacs@gnu.org; Tue, 30 Jan 2024 05:15:51 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUl9h-00051p-5j for bug-gnu-emacs@gnu.org; Tue, 30 Jan 2024 05:15:50 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1rUl9d-0003fP-6p for bug-gnu-emacs@gnu.org; Tue, 30 Jan 2024 11:15:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Rudolf Schlatte Subject: Re: bug#68781: [PATCH] Don't fill yaml except comments and block scalars. Date: Tue, 30 Jan 2024 11:15:34 +0100 Message-ID: References: <216ddb7b-e02d-4e68-9dbb-68fa1202d198@mgmarlow.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:yf8Iw8LBUb/HzQpcMHIvG7FVcS0= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Graham Marlow writes: >> 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'm suddenly a bit stressed for time and can't investigate properly for the next few days why my proposed patch misbehaves under some circumstances.. And your patch fixes the misbehavior with a minimum of changes, so I think it's the one that should go in. Thanks to both of you for working on this! From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 30 14:25:33 2024 Received: (at 68781) by debbugs.gnu.org; 30 Jan 2024 19:25:33 +0000 Received: from localhost ([127.0.0.1]:36796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUtjh-0002yF-Ff for submit@debbugs.gnu.org; Tue, 30 Jan 2024 14:25:33 -0500 Received: from mail-4323.proton.ch ([185.70.43.23]:50399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUtje-0002xv-TS for 68781@debbugs.gnu.org; Tue, 30 Jan 2024 14:25:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail; t=1706642714; x=1706901914; bh=MnvGiMkJj6KQIB2F4BHG5k9UNdGdEn5uUu66hvOrM+I=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=ES+i4vU9bObgoGSvHuVjKmqR0/A7lh46FkS1hwZKjopgj9yMP1f9n98DJaCvXm+3/ LIALDIlOJbZGnS0RpZbkClnpEG97loJow+bcoWjuN1olGeSWfZngZKVnkpeFG0QaS8 4EtxaTfVHwjXMOYv/Aq/L8tYJ0QOVU5uVREtKwvkflEO5a1QUfamLEQnCSoYksdsho qZ4p+FnigwrpLUHPSFtAaPrIxDYryezmpezlqfbMngudmG8lKhgpZoZYi2wHfCyYrI eEaPkrUVtmhPm90m2XnuRVD40IgdG61pQuYPW+7M6N+Zje2wcCfMnORnjljmr8kyAl PiO5O9dXOmtmw== Date: Tue, 30 Jan 2024 19:25:07 +0000 To: Graham Marlow From: Randy Taylor Subject: Re: bug#68781: [PATCH] Don't fill yaml except comments and block scalars. Message-ID: In-Reply-To: <216ddb7b-e02d-4e68-9dbb-68fa1202d198@mgmarlow.com> References: <216ddb7b-e02d-4e68-9dbb-68fa1202d198@mgmarlow.com> Feedback-ID: 44397038:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68781 Cc: Rudolf Schlatte , 68781@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Monday, January 29th, 2024 at 20:20, Graham Marlow = wrote: >=20 >=20 > > Hello Randy, thanks for having a look! Could you tell me which >=20 > > 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. >=20 >=20 > For the record I'm also using this grammar. >=20 > 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. >=20 > 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. Thanks Graham, the patch looks good to me. Would someone please install it on master? Thanks in advance. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 01 05:31:53 2024 Received: (at 68781-done) by debbugs.gnu.org; 1 Feb 2024 10:31:53 +0000 Received: from localhost ([127.0.0.1]:40312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVUML-0000MI-17 for submit@debbugs.gnu.org; Thu, 01 Feb 2024 05:31:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVUMI-0000M5-SO for 68781-done@debbugs.gnu.org; Thu, 01 Feb 2024 05:31:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVUM2-0004HF-HH; Thu, 01 Feb 2024 05:31:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=yl3mbqU5FF8Z0KhDpWAPJfsb+SXwA82hjwte101uyng=; b=It7cjTwllPuE 61wixk8w1ktnXMxHLb4HVDTJQ0/6Ths0x4UsDllltk65+iKKAykkIFao8GGU/ePBnlGecG+kASUje bqdLGBLTLwkkD+p+K1sA7Jn45WMgylkoGJhF2KiLQBk184076jTsXCAem9IEg5V/ZHs72BKZbQZao Dp3u8Q3oK03QdDBSwPlnKC/8qBvdV4Lo30O+Hi3cG+UMomRHlI3PuYMT3gVMEcZZ2yNQO99AF0ql2 dnBZCwT+xaLFmyrEojg9x6R5kf7ssu9kRU08NkoHyLcA732PkBd9rPxuizBTuSy9n0IQVRwXBV6yj 4bp8k2Xs5CyrMisAiaVGqA==; Date: Thu, 01 Feb 2024 12:31:30 +0200 Message-Id: <86r0hwzda5.fsf@gnu.org> From: Eli Zaretskii To: Randy Taylor In-Reply-To: (message from Randy Taylor on Tue, 30 Jan 2024 19:25:07 +0000) Subject: Re: bug#68781: [PATCH] Don't fill yaml except comments and block scalars. References: <216ddb7b-e02d-4e68-9dbb-68fa1202d198@mgmarlow.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68781-done Cc: 68781-done@debbugs.gnu.org, rudi@constantly.at, graham@mgmarlow.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: Rudolf Schlatte , 68781@debbugs.gnu.org > Date: Tue, 30 Jan 2024 19:25:07 +0000 > From: Randy Taylor > > On Monday, January 29th, 2024 at 20:20, Graham Marlow wrote: > > > > > > > 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. > > Thanks Graham, the patch looks good to me. > > Would someone please install it on master? Thanks in advance. Thanks, done, and closing the bug. From unknown Thu Aug 14 18:39:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Feb 2024 12:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator