[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warn on mid-input line sentence endings
From: |
Alejandro Colomar |
Subject: |
Re: Warn on mid-input line sentence endings |
Date: |
Tue, 2 May 2023 02:30:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 |
On 5/2/23 00:21, josh wrote:
> Hi, I'm here with a quick tangent.
Hi Josh,
>
> It turns out that there is a lot of discourse out there about "semantic
> newlines", under a few different names. So far the names I've seen are:
>
> - One Sentence Per Line (OSPL)
This forgets about clauses and phrases (see below).
> - Semantic Line Breaks (SemBr)
I like this one.
> - Semantic Linefeeds
Since we call ASCII LF the newline character (\n), I think newlines
would be a more common term under Unix. Linefeed is a term I rarely
see; and only in non-Unix contexts (e.g., IETF RFCs).
> - Ventilated Prose
What is ventilated in the context of prose? Not too clear to me just by
reading dict(1).
> - Semantic newlines (just on this list)
This one is in use in man-pages(7).
>
> Reading through the pages below was helpful in getting a better idea of
> what language people use to discuss this. They're mostly historical
> retrospectives or arguments for the merit of semantic newlines.
>
> https://rhodesmill.org/brandon/2012/one-sentence-per-line
> https://ramshankar.org/blog/posts/2019/semantic-line-breaks
> https://vanemden.wordpress.com/2009/01/01/ventilated-prose
> https://discuss.python.org/t/semantic-line-breaks/13874
> https://discuss.python.org/t/one-sentence-per-line-for-peps-and-more/13920
> https://sembr.org
> https://asciidoctor.org/docs/asciidoc-recommended-practices/#one-sentence-per-line
You can also read man-pages(7):
```
Use semantic newlines
In the source of a manual page, new sentences should be started
on new lines, long sentences should be split into lines at
clause breaks (commas, semicolons, colons, and so on), and long
clauses should be split at phrase boundaries. This convention,
sometimes known as "semantic newlines", makes it easier to see
the effect of patches, which often operate at the level of in‐
dividual sentences, clauses, or phrases.
```
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/man7/man-pages.7?id=6ff6f43d68164f99a8c3fb66f4525d145571310c>
>
> (Actually I think one-sentence-per-line denotes something slightly different
> from semantic-line-breaks, not that I know what that difference is).
Yeah, one-sentence-per-line only requires breaking at sentence
boundaries, while with semantic newlines, the intent is that all
newlines are well tought. Places for placing semantic newlines can be
(apart from sentence boundaries, of course) clause boundaries or phrase
boundaries (in the latter case, there's controversy in this list
regarding how strict one should be). I tend to be on the strictest
side, as it helps me considerably when reading patches.
Cheers,
Alex
>
> Hope this is interesting,
> Josh
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
OpenPGP_signature
Description: OpenPGP digital signature