NetBSD Problem Report #53091

From www@NetBSD.org  Mon Mar 12 06:55:12 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D69347A180
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 12 Mar 2018 06:55:11 +0000 (UTC)
Message-Id: <20180312065510.E33A17A227@mollari.NetBSD.org>
Date: Mon, 12 Mar 2018 06:55:10 +0000 (UTC)
From: ray.phillips@gmail.com
Reply-To: ray.phillips@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Web page refers to non-existent directory
X-Send-Pr-Version: www-1.0

>Number:         53091
>Category:       misc
>Synopsis:       Web page refers to non-existent directory
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    leot
>State:          closed
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 12 07:00:00 +0000 2018
>Closed-Date:    Sun Jul 05 09:21:33 +0000 2020
>Last-Modified:  Sun Jul 05 09:21:33 +0000 2020
>Originator:     Ray
>Release:        7.1.1
>Organization:
>Environment:
NetBSD b2.home 7.1.1 NetBSD 7.1.1 (GENERIC.201712222334Z) amd64
>Description:
Section 6.2.2 on this Web page:

https://www.netbsd.org/docs/guide/en/chap-edit.html

says NetBSD's src.tgz file contains a directory with documentation about vi (usr/src/usr.bin/vi/docs).  However, that's not right as far as I can tell.  I checked by downloading this file:

http://mirror.aarnet.edu.au/pub/netbsd/NetBSD-7.1.1/source/sets/src.tgz

Given that, what follows is probably irrelevant, but in case you decide to put that directory back into src.tgz, one if its files might contain a mistake, judging by this...

I found a copy of "An Introduction to Display Editing with Vi" here:

http://ex-vi.sourceforge.net/viin/paper-7.html

and its section 7.4 has an error:

[str]    	matches any single character not in str

which of course should be:

[^str]    	matches any single character not in str
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: misc-bug-people->leot
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Mon, 12 Mar 2018 08:52:31 +0000
Responsible-Changed-Why:
Take (possible patch for `The NetBSD Guide' will be shared soon...)


From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/53091: Web page refers to non-existent directory
Date: Mon, 12 Mar 2018 10:50:20 +0100

 Hello Ray,

 ray.phillips@gmail.com writes:
 > >Number:         53091
 > >Category:       misc
 > >Synopsis:       Web page refers to non-existent directory
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    misc-bug-people
 > >State:          open
 > >Class:          doc-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Mon Mar 12 07:00:00 +0000 2018
 > >Originator:     Ray
 > >Release:        7.1.1
 > >Organization:
 > >Environment:
 > NetBSD b2.home 7.1.1 NetBSD 7.1.1 (GENERIC.201712222334Z) amd64
 > >Description:
 > Section 6.2.2 on this Web page:
 >
 > https://www.netbsd.org/docs/guide/en/chap-edit.html
 >
 > says NetBSD's src.tgz file contains a directory with documentation about=
  vi (usr/src/usr.bin/vi/docs).  However, that's not right as far as I can =
 tell.  I checked by downloading this file:
 >
 > http://mirror.aarnet.edu.au/pub/netbsd/NetBSD-7.1.1/source/sets/src.tgz
 >

 Nice catch! IMHO it is probably better to redirect the reader directly
 to files installed as part as the misc.tgz installation set.
 While here I have also updated the suggested documentation according the
 ones installed in /usr/share/doc, a patch to address that for htdocs is
 available in:

  <https://www.NetBSD.org/~leot/htdocs-patches/chap-edit-adjust-vi-docs.pat=
 ch>

 ...and if you directly would like to just take a look the chap-edit.html
 regenerated HTML with this patch is available here:

  <https://www.NetBSD.org/~leot/htdocs-patches/chap-edit-pr-53091.html>

 > Given that, what follows is probably irrelevant, but in case you decide =
 to put that directory back into src.tgz, one if its files might contain a =
 mistake, judging by this...
 >
 > I found a copy of "An Introduction to Display Editing with Vi" here:
 >
 > http://ex-vi.sourceforge.net/viin/paper-7.html
 >
 > and its section 7.4 has an error:
 >
 > [str]    	matches any single character not in str
 >
 > which of course should be:
 >
 > [^str]    	matches any single character not in str
 > [...]

 Mmh, this is nowdays available in
 `/usr/share/doc/usd/vi/vitut.{ps.gz,txt}'. I guess that maybe the
 HTML version just messed up the `^' character. The one in the `.txt'
 seems okay while the one in `.ps.gz' is a bit more confusing but seems
 documented in `2.1 Scrolling and paging' in order to clarify the `^' in
 e.g. [^str] or `^' (to go to the first non-white on line) and ^<char>
 (e.g. ^W to erase a word during an insert) used as a `Control + <char>'
 notation.
 So, I would prefer to leave them as-is.


 I will wait several days and if there will be no feedback I will commit
 the proposed patch to htdocs.


 Thank you Ray for the PR!

State-Changed-From-To: open->feedback
State-Changed-By: leot@NetBSD.org
State-Changed-When: Mon, 12 Mar 2018 10:03:03 +0000
State-Changed-Why:
Problem analyzed and candidate patch shared in the PR.


From: Ray Phillips <ray.phillips@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Fwd: misc/53091: Web page refers to non-existent directory
Date: Wed, 14 Mar 2018 03:13:32 +1000

 ---------- Forwarded message ----------
 From: Ray Phillips <ray.phillips@gmail.com>
 Date: 13 March 2018 at 02:01
 Subject: Re: misc/53091: Web page refers to non-existent directory
 To: leot@netbsd.org


 Thanks for replying Leonardo.

 That's curious, when I read /usr/share/doc/usd/vi/summary.txt and
 vitut.txt using less(1) neither has the ^ character in the "not in"
 line:

 sumary.txt:

             [str]      any char in str
             [str]      ... not in str

 vitut.txt:

      [str]   matches any single character in str
      [str]   matches any single character not in str

 I checked by viewing those lines using od(1) with its -c option as
 well, for example summary.txt:

 0013140            [  \b   [   _  \b   s   _  \b   t   _  \b   r   ]  \b
 0013160    ]                           a   n   y       c   h   a   r
 0013200    i   n       _  \b   s   _  \b   t   _  \b   r  \n
 0013220                                        [  \b   [   _  \b   s   _
 0013240   \b   t   _  \b   r   ]  \b   ]                           .   .
 0013260    .       n   o   t       i   n       _  \b   s   _  \b   t   _
 0013300   \b   r  \n                                                   [

 So there's not a hidden ^ character on the "not in" line.

 However, ^ is shown in summary.ps.gz and vitut.ps.gz (when
 uncompressed using 7-Zip and viewed with PS View on a Windows PC).

 I see that the ^ is also not showing up in this paragraph (section
 8.3) in /usr/share/doc/reference/ref1/ex/reference.txt :

 [string]       Matches  any  (single)  character  in  the   class
                defined  by  string.   Most  characters  in string
                define themselves.  A pair of characters separated
                by  `-'  in  string  defines the set of characters
                collating between the specified  lower  and  upper
                bounds,  thus  `[a-z]'  as  a  regular  expression
                matches any (single) lower-case  letter.   If  the
                first  character  of string is an `' then the con-
                struct matches those characters which it otherwise
                would  not;  thus  `[a-z]'  matches anything but a
                lower-case letter (and of course a  newline).   To
                place  any  of  the  characters `', `[', or `-' in
                string you must escape them with a preceding  `\'.

 but it is present in reference.ps.gz


 Ray


 On 12 March 2018 at 19:55, Leonardo Taccari <leot@netbsd.org> wrote:
 > The following reply was made to PR misc/53091; it has been noted by GNATS.
 >
 > From: Leonardo Taccari <leot@NetBSD.org>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: misc/53091: Web page refers to non-existent directory
 > Date: Mon, 12 Mar 2018 10:50:20 +0100
 >
 >  Hello Ray,
 >
 >  ray.phillips@gmail.com writes:
 >  > >Number:         53091
 >  > >Category:       misc
 >  > >Synopsis:       Web page refers to non-existent directory
 >  > >Confidential:   no
 >  > >Severity:       non-critical
 >  > >Priority:       low
 >  > >Responsible:    misc-bug-people
 >  > >State:          open
 >  > >Class:          doc-bug
 >  > >Submitter-Id:   net
 >  > >Arrival-Date:   Mon Mar 12 07:00:00 +0000 2018
 >  > >Originator:     Ray
 >  > >Release:        7.1.1
 >  > >Organization:
 >  > >Environment:
 >  > NetBSD b2.home 7.1.1 NetBSD 7.1.1 (GENERIC.201712222334Z) amd64
 >  > >Description:
 >  > Section 6.2.2 on this Web page:
 >  >
 >  > https://www.netbsd.org/docs/guide/en/chap-edit.html
 >  >
 >  > says NetBSD's src.tgz file contains a directory with documentation about=
 >   vi (usr/src/usr.bin/vi/docs).  However, that's not right as far as I can =
 >  tell.  I checked by downloading this file:
 >  >
 >  > http://mirror.aarnet.edu.au/pub/netbsd/NetBSD-7.1.1/source/sets/src.tgz
 >  >
 >
 >  Nice catch! IMHO it is probably better to redirect the reader directly
 >  to files installed as part as the misc.tgz installation set.
 >  While here I have also updated the suggested documentation according the
 >  ones installed in /usr/share/doc, a patch to address that for htdocs is
 >  available in:
 >
 >   <https://www.NetBSD.org/~leot/htdocs-patches/chap-edit-adjust-vi-docs.pat=
 >  ch>
 >
 >  ...and if you directly would like to just take a look the chap-edit.html
 >  regenerated HTML with this patch is available here:
 >
 >   <https://www.NetBSD.org/~leot/htdocs-patches/chap-edit-pr-53091.html>
 >
 >  > Given that, what follows is probably irrelevant, but in case you decide =
 >  to put that directory back into src.tgz, one if its files might contain a =
 >  mistake, judging by this...
 >  >
 >  > I found a copy of "An Introduction to Display Editing with Vi" here:
 >  >
 >  > http://ex-vi.sourceforge.net/viin/paper-7.html
 >  >
 >  > and its section 7.4 has an error:
 >  >
 >  > [str]        matches any single character not in str
 >  >
 >  > which of course should be:
 >  >
 >  > [^str]       matches any single character not in str
 >  > [...]
 >
 >  Mmh, this is nowdays available in
 >  `/usr/share/doc/usd/vi/vitut.{ps.gz,txt}'. I guess that maybe the
 >  HTML version just messed up the `^' character. The one in the `.txt'
 >  seems okay while the one in `.ps.gz' is a bit more confusing but seems
 >  documented in `2.1 Scrolling and paging' in order to clarify the `^' in
 >  e.g. [^str] or `^' (to go to the first non-white on line) and ^<char>
 >  (e.g. ^W to erase a word during an insert) used as a `Control + <char>'
 >  notation.
 >  So, I would prefer to leave them as-is.
 >
 >
 >  I will wait several days and if there will be no feedback I will commit
 >  the proposed patch to htdocs.
 >
 >
 >  Thank you Ray for the PR!
 >

From: Ray Phillips <ray.phillips@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: misc/53091: Web page refers to non-existent directory
Date: Wed, 14 Mar 2018 03:14:54 +1000

 On 14 March 2018 at 00:46, Leonardo Taccari <leot@netbsd.org> wrote:
 > Hello Ray,
 >
 > Ray Phillips writes:
 >> Thanks for replying Leonardo.
 >>
 >
 > Thank you for reporting the problem!
 >
 >> That's curious, when I read /usr/share/doc/usd/vi/summary.txt and
 >> vitut.txt using less(1) neither has the ^ character in the "not in"
 >> line:
 >>
 >> sumary.txt:
 >>
 >>             [str]      any char in str
 >>             [str]      ... not in str
 >>
 >> vitut.txt:
 >>
 >>      [str]   matches any single character in str
 >>      [str]   matches any single character not in str
 >>
 >> I checked by viewing those lines using od(1) with its -c option as
 >> well, for example summary.txt:
 >>
 >> 0013140            [  \b   [   _  \b   s   _  \b   t   _  \b   r   ]  \b
 >> 0013160    ]                           a   n   y       c   h   a   r
 >> 0013200    i   n       _  \b   s   _  \b   t   _  \b   r  \n
 >> 0013220                                        [  \b   [   _  \b   s   _
 >> 0013240   \b   t   _  \b   r   ]  \b   ]                           .   .
 >> 0013260    .       n   o   t       i   n       _  \b   s   _  \b   t   _
 >> 0013300   \b   r  \n                                                   [
 >>
 >> So there's not a hidden ^ character on the "not in" line.
 >>
 >
 > That's interesting! Here I can see it via (but I'm on a NetBSD/amd64
 > -current machine):
 >
 >  | % grep -E '(\.\.\. not)|(any char) in' < summary.txt
 >  |            [str]       any char in str
 >  |            [^str]      ... not in str
 >
 > ...and:
 >
 >  | % grep 'any single character' < vitut.txt
 >  |     [str]    matches any single character in str
 >  |     [^str]   matches any single character not in str
 >
 > When I'll be back at home I'll check on another machine that I have with
 > NetBSD/i386 7.1.1.
 >
 >> However, ^ is shown in summary.ps.gz and vitut.ps.gz (when
 >> uncompressed using 7-Zip and viewed with PS View on a Windows PC).
 >>
 >> I see that the ^ is also not showing up in this paragraph (section
 >> 8.3) in /usr/share/doc/reference/ref1/ex/reference.txt :
 >>
 >> [string]       Matches  any  (single)  character  in  the   class
 >>                defined  by  string.   Most  characters  in string
 >>                define themselves.  A pair of characters separated
 >>                by  `-'  in  string  defines the set of characters
 >>                collating between the specified  lower  and  upper
 >>                bounds,  thus  `[a-z]'  as  a  regular  expression
 >>                matches any (single) lower-case  letter.   If  the
 >>                first  character  of string is an `' then the con-
 >>                struct matches those characters which it otherwise
 >>                would  not;  thus  `[a-z]'  matches anything but a
 >>                lower-case letter (and of course a  newline).   To
 >>                place  any  of  the  characters `', `[', or `-' in
 >>                string you must escape them with a preceding  `\'.
 >>
 >> but it is present in reference.ps.gz
 >
 > It seems that here I can see it:
 >
 >  | % grep -A 12 'Matches   any  ' < reference.txt
 >  | [string]       Matches   any  (single)  character  in  the  class
 >  |                defined by  string.   Most  characters  in  string
 >  |                define themselves.  A pair of characters separated
 >  |                by `-' in string defines  the  set  of  characters
 >  |                collating  between  the  specified lower and upper
 >  |                bounds,  thus  `[a-z]'  as  a  regular  expression
 >  |                matches  any  (single)  lower-case letter.  If the
 >  |                first character of string is an `^' then the  con-
 >  |                struct matches those characters which it otherwise
 >  |                would not; thus `[^a-z]' matches  anything  but  a
 >  |                lower-case  letter  (and of course a newline).  To
 >  |                place any of the characters `^', `[',  or  `-'  in
 >  |                string  you must escape them with a preceding `\'.
 >
 > Feel free and please forward your email and my reply to gnats-bugs@
 > appending these information on PR misc/53091 so the entire community
 > can help with investigating this problem! :)
 >
 >
 > Thanks again Ray!

From: "Leonardo Taccari" <leot@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53091 CVS commit: htdocs/docs/guide/en
Date: Mon, 19 Mar 2018 09:03:55 +0000

 Module Name:	htdocs
 Committed By:	leot
 Date:		Mon Mar 19 09:03:55 UTC 2018

 Modified Files:
 	htdocs/docs/guide/en: chap-edit.xml

 Log Message:
 Sync vi/ex and editors documentation with current reality.

  - Most suggested documentation (except for vi(1) man page) is available in
    misc.tgz installation set, adjust the suggestion accordingly
  - Instead of pointing the reader to src, point to documentation in
    /usr/share/doc and add the *.{ps.gz,txt} paths in the list
  - `Vi tutorial' is no longer available, adjust that in the list and suggests
    `An Introduction to Display Editing with Vi' as a starting point for vi(1).
  - `Vi Command & Function Reference' is no longer available, suggests
    `Ex/Vi Quick Reference' as a useful reference instead.

 Should address htdocs bits of PR misc/53091 by Ray Phillips
 (possible `^' problem in vi `.txt' documentation still need further
 investigations).


 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 htdocs/docs/guide/en/chap-edit.xml

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->open
State-Changed-By: leot@NetBSD.org
State-Changed-When: Tue, 03 Apr 2018 22:22:56 +0000
State-Changed-Why:
All htdocs bits for relevant paragraphs in
The NetBSD Guide should be addressed.

However, for src bits in `.txt' documentation the
`^' sometimes does not appear. At least 7.1.1 and 7.1.2
seems affected and NetBSD-current does not have this
problem.

Despite worth possible investigation/pullups leave the
PR open for the src bits problems.


State-Changed-From-To: open->closed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Sun, 05 Jul 2020 09:21:33 +0000
State-Changed-Why:
The `^' appears on vitut.txt in netbsd-8, netbsd-9 and -current.

Thank you Ray for the PR and sorry for not being able to bisect
the change that would be needed for netbsd-7.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.