public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "Günther Noack" <gnoack3000@gmail.com>
To: Jared Finder <jared@finder.org>
Cc: Alejandro Colomar <alx@kernel.org>, linux-man@vger.kernel.org
Subject: Re: [PATCH man v2 1/2] TIOCLINUX.2const: Restructure documentation for TIOCL_SETSEL selection modes
Date: Sun, 2 Mar 2025 20:00:02 +0100	[thread overview]
Message-ID: <20250302.9100c52d15e5@gnoack.org> (raw)
In-Reply-To: <1094ef00ff08bbede90c01f7a36df293@finder.org>

Hello Jared!

On Sun, Feb 23, 2025 at 03:13:35PM -0800, Jared Finder wrote:
> I'm not a regular kernel developer, so feel free to ignore my
> recommendations if they are not aligned with the level of documentation
> usually provided.

Thank you! No, it's absolutely appreciated.

You are right that the console IOCTLs are generally under-documented.
I do not have the time to fix that all up, but I am happy to fix it
for the pieces that I'm touching.

> On 2025-02-23 13:36, Günther Noack wrote:
> > * Indent the documented selection modes into tagged paragraphs.
> > * Document constants from the header file (tiocl.h) instead of numbers.
> > 
> > Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> > ---
> >  man/man2const/TIOCLINUX.2const | 23 ++++++++++++++++++-----
> >  1 file changed, 18 insertions(+), 5 deletions(-)
> > 
> > diff --git a/man/man2const/TIOCLINUX.2const
> > b/man/man2const/TIOCLINUX.2const
> > index c0acdd0ea..5db3f6ea6 100644
> > --- a/man/man2const/TIOCLINUX.2const
> > +++ b/man/man2const/TIOCLINUX.2const
> > @@ -65,11 +65,24 @@ are the ending
> >  column and row.
> >  (Upper left corner is row=column=1.)
> >  .I sel_mode
> > -is 0 for character-by-character selection,
> > -1 for word-by-word selection,
> > -or 2 for line-by-line selection.
> > -The indicated screen characters are highlighted and saved
> > -in a kernel buffer.
> > +may be one of the following operations:
> > +.RS
> > +.TP
> > +.B TIOCL_SELCHAR
> > +Select character-by-character.
> > +The indicated screen characters are highlighted
> > +and saved in a kernel buffer.
> 
> I would recommend also saying

This sentence is truncated, and there is no special expansion logic in
this case.  I left it as it is for now, unless there is something
better to say here.

> > +.TP
> > +.B TIOCL_SELWORD
> > +Select word-by-word.
> > +The indicated screen characters are highlighted
> > +and saved in a kernel buffer.
> 
> I would recommend also saying something like "The start is expanded backward
> and the end is expanded forwards to select entire words."

Changing it to

  Select word-by-word,
  expanding the selection outwards to align with word boundaries.

Does it sound reasonable to you?

> > +.TP
> > +.B TIOCL_SELLINE
> > +Select line-by-line.
> > +The indicated screen characters are highlighted
> > +and saved in a kernel buffer.
> > +.RE
> 
> Similarly, mention how the start / end is expanded here too.

Made it

  Select line-by-line,
  expanding the selection outwards to select full lines.

–Günther

  parent reply	other threads:[~2025-03-02 19:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-23 21:36 [PATCH man v2 0/2] TIOCLINUX.2const: Document TIOCL_SETSEL selection modes Günther Noack
2025-02-23 21:36 ` [PATCH man v2 1/2] TIOCLINUX.2const: Restructure documentation for " Günther Noack
2025-02-23 23:13   ` Jared Finder
2025-03-02  7:06     ` Alejandro Colomar
2025-03-02 19:45       ` Günther Noack
2025-03-02 19:00     ` Günther Noack [this message]
2025-02-23 21:36 ` [PATCH man v2 2/2] TIOCLINUX.2const: Document missing " Günther Noack
2025-02-23 23:19   ` Jared Finder
2025-03-02 19:23     ` Günther Noack

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250302.9100c52d15e5@gnoack.org \
    --to=gnoack3000@gmail.com \
    --cc=alx@kernel.org \
    --cc=jared@finder.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox