help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: semantic newlines?


From: Gavin Smith
Subject: Re: semantic newlines?
Date: Sat, 27 May 2023 14:45:07 +0100

On Sun, May 21, 2023 at 09:48:13PM +0200, Bruno Haible wrote:
> Hi,
> 
> Diffs of .texi files are often hard to review, because the committer has
> reformatted (refilled) the paragraph.
> 
> The Linux man-pages project has this guidance to avoid this problem (in
> groff -mandoc source, not in .texi files): [1]
> 
>     Use semantic newlines
>        In the source of a manual page, new sentences should be started
>        on new lines, and long sentences should be split into lines at
>        clause breaks (commas, semicolons, colons, and so on).  This
>        convention, sometimes known as "semantic newlines", makes it
>        easier to see the effect of patches, which often operate at the
>        level of individual sentences or sentence clauses.
> 
> Has anyone already used this convention for .texi files? Is it a
> good convention to follow?
> 
> Bruno
> 
> [1] https://man7.org/linux/man-pages/man7/man-pages.7.html

I think there is nothing wrong with using this convention if you want
to.  I have considered using this when making changes to Texinfo files
in the past but have felt I needed to "tidy up" the file to have even
line lengths.  It depends on whether you think other people working on
the file in the future will be happy with wildly varying line lengths.

This kind of line breaking may have been more useful when people were
using text editors such as "ed" where it was easier to edit single
lines at a time.  I have sometimes tried to reduce the size of diffs
by not reflowing the text in a paragraph after the affected
text.  For example, if the last line affected ends up as 60 columns
wide, it might look okay in the source to leave the paragraph after
it with a wider fill width, e.g. 72 columns.  This is kind of a
hybrid convention rather than filling everything to the same width
automatically.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]