|
From: | Rudolf Schlatte |
Subject: | Re: Should yaml-ts-mode inherit from prog-mode? |
Date: | Tue, 21 Mar 2023 14:54:09 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) |
Eli Zaretskii <eliz@gnu.org> writes: > We should instead fix yaml-ts-mode by providing a proper > fill-paragraph-function for it. No one said that the default > text-mode one will do TRT. Quoting yaml.org: “YAML is a human-friendly data serialization language for all programming languages.” (See https://yaml.org/spec/1.2.2/ for all the gory details.) Both whitespace and line breaks are semantically meaningful. One meaningful behavior for `fill-paragraph' could be to allow it only within YAML flowed blocks and flow scalars (see https://yaml-multiline.info): script: | # this block cannot be refilled. apt-get -y update apt-get -y install my-necessary-package description: > The above script updates the system and installs a necessary package. This is a second line, where we give more information We had to leave an empty line in the yaml file to get a line break. comment: "This is a double-quoted flow scalar. We have to escape line breaks like this:\ All other line breaks in the string are read as spaces."
[Prev in Thread] | Current Thread | [Next in Thread] |