Subject: bug#17041: closed (Re: bug#17041: Minor glitch in regex)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 19 Mar 2014 16:44:03 +0000

Your bug report

#17041: Minor glitch in regex

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17041: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17041
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17041: Minor glitch in regex
From: Pádraig Brady <[email-masked]>
To: Edward Welbourne <[email-masked]>
Cc: [email-masked]
Date: Wed, 19 Mar 2014 16:29:59 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

On 03/19/2014 10:20 AM, Edward Welbourne wrote:
> In the info page for "chmod invocation",
> node 27.2 Symbolic Modes, <quote>
> 
> The format of symbolic modes is:
> 
> [ugoa...][+-=]PERMS...[,...]
> 
> </quote>
> the [+-=] is naturally read as "every character from + through =" due
> to the special meaning of - in a character class.  I suggest [+=-]
> would be more apt.  It is possible the same pattern is repeated
> elsewhere in the manual.

[-+=] was already used in chmod --help so I went with that.
I'll push the attached in your name in a while.

thanks,
Pádraig.

>From 42498f9365db8be8a05a08dad43216989de32167 Mon Sep 17 00:00:00 2001
From: Edward Welbourne <[email-masked]>
Date: Wed, 19 Mar 2014 16:19:08 +0000
Subject: [PATCH] doc: avoid regex ambiguity in chmod mode description

* man/chmod.x: s/[+-=]/[-+=]/
* doc/perm.texi (Symbolic Modes): Likewise.
Fixes http://bugs.gnu.org/17041
---
 doc/perm.texi |    2 +-
 man/chmod.x   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/perm.texi b/doc/perm.texi
index 60e9160..0bccc63 100644
--- a/doc/perm.texi
+++ b/doc/perm.texi
@@ -148,7 +148,7 @@ their previous values, and perhaps on the current @code{umask} as well
 The format of symbolic modes is:
 
 @example
-@r{[}ugoa@dots{}@r{][}+-=@r{]}@var{perms}@dots{}@r{[},@dots{}@r{]}
+@r{[}ugoa@dots{}@r{][}-+=@r{]}@var{perms}@dots{}@r{[},@dots{}@r{]}
 @end example
 
 @noindent
diff --git a/man/chmod.x b/man/chmod.x
index e5372db..190191f 100644
--- a/man/chmod.x
+++ b/man/chmod.x
@@ -16,7 +16,7 @@ which can be either a symbolic representation of changes to make, or
 an octal number representing the bit pattern for the new mode bits.
 .PP
 The format of a symbolic mode is [\c
-\fBugoa\fP.\|.\|.][[\fB+-=\fP][\fIperms\fP.\|.\|.].\|.\|.],
+\fBugoa\fP.\|.\|.][[\fB-+=\fP][\fIperms\fP.\|.\|.].\|.\|.],
 where
 .I "perms"
 is either zero or more letters from the set
-- 
1.7.7.6

Subject: Minor glitch in regex
From: Edward Welbourne <[email-masked]>
To: [email-masked]
Date: Wed, 19 Mar 2014 11:20:31 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

In the info page for "chmod invocation",
node 27.2 Symbolic Modes, <quote>

The format of symbolic modes is:

[ugoa...][+-=]PERMS...[,...]

</quote>
the [+-=] is naturally read as "every character from + through =" due
to the special meaning of - in a character class.  I suggest [+=-]
would be more apt.  It is possible the same pattern is repeated
elsewhere in the manual.

    Eddy.