On Sun, Sep 05, 2021 at 09:51:44AM +0100, ropers wrote:
> I.
> 
> Not to engage in pointless bikeshedding, but I find this clearer and
> --if I understand things correctly-- also more technically accurate:
> 
> Index: sed.1
> ===================================================================
> RCS file: /cvs/src/usr.bin/sed/sed.1,v
> retrieving revision 1.60
> diff -C8 -u -r1.60 sed.1
> cvs server: conflicting specifications of output style
> --- sed.1     8 Mar 2021 02:47:28 -0000       1.60
> +++ sed.1     5 Sep 2021 08:23:25 -0000
> @@ -141,19 +141,19 @@
>  Normally,
>  .Nm
>  cyclically copies a line of input, not including its terminating newline
>  character, into a
>  .Em pattern space ,
>  (unless there is something left after a
>  .Ic D
>  function),
> -applies all of the commands with addresses that select that pattern space,
> -copies the pattern space to the standard output, appending a newline, and
> -deletes the pattern space.
> +applies all of the commands with addresses that select that pattern,

An address does not select a pattern, it selects the pattern space.

> +copies the pattern space contents to the standard output, appending a

The word "contents" is not needed.

> +newline, and deletes them from the pattern space.

It's unclear what "them" refers to here (possibly "the contents"?).

The proposed text seems to want to separate "the pattern space" from
"the contents of the pattern space".  I don't think this distinction
is helpful, just like it's not helpful ta make a distinction between
"a string" and "the contents of a string".  The manual (and the POSIX
standard text) refers to the data that is read from the input and
currently subject to the commands of the editing script as "the pattern
space" throughout, not just in this introductory paragraph.


>  .Pp
>  Some of the functions use a
>  .Em hold space
>  to save all or part of the pattern space for subsequent retrieval.
>  .Sh SED ADDRESSES
>  An address is not required, but if specified must be a number (that counts
>  input lines
>  cumulatively across input files), a dollar character
> 
> (I used the diff -C 8 option to show a little more context.)
> 
> 
> II.
> 
> [Link for easier reading: <https://man.openbsd.org/sed#pattern>]
> 
> Also, does the "(unless there is something left after a D function)"
> part really relate to the preceding parenthetical clause of "not
> including its terminating newline character"?  Should it be moved to
> directly follow that instead of following the "into a pattern space"
> part?
> Alternatively, would it be better to move the "(...)" part to a
> separate subsequent sentence like this:
> > (A newline character may be present in the pattern space
> > if left behind after a
> > .Ic D
> > function.)
> Is it even important to include that information in the man page?  Is
> it ever relevant that there may technically be some string and a
> newline left in the pattern space?
> 
> 
> Thank you,
> Ian

-- 
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden

.

Reply via email to