emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#63030: closed (Minor innacuracy on --exclude documentation?)


From: GNU bug Tracking System
Subject: bug#63030: closed (Minor innacuracy on --exclude documentation?)
Date: Mon, 24 Apr 2023 20:06:02 +0000

Your message dated Mon, 24 Apr 2023 13:05:31 -0700
with message-id 
<CA+8g5KGynNwG+yfy1T=Ma4APUT2JSpjRqfSUvqw_Sswqdd=H4Q@mail.gmail.com>
and subject line Re: bug#63030: correction
has caused the debbugs.gnu.org bug report #63030,
regarding Minor innacuracy on --exclude documentation?
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
63030: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63030
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Minor innacuracy on --exclude documentation? Date: Sun, 23 Apr 2023 13:06:05 +0200
Hello,

The current version of the --exclude documentation says the following:

```
‘--exclude=GLOB’
     Skip any command-line file with a name suffix that matches the
     pattern GLOB, using wildcard matching; a name suffix is either the
     whole name, or a trailing part that starts with a non-slash
     character immediately after a slash (‘/’) in the name.  When
     searching recursively, skip any subfile whose base name matches
     GLOB; the base name is the part after the last slash.  A pattern
     can use ‘*’, ‘?’, and ‘[’...‘]’  as wildcards, and ‘\’ to quote a
     wildcard or backslash character literally.
```

I think that "Skip any command-line file" should be replaced with "Skip any
file", because --exclude does work even if files are not provided as explicit
command-line arguments (for example, when using -r).

While it could be ambiguous, this interpretation of "command-line file"
meaning "files explicitly provided as command-line arguments" is consistent
with the documentation for --devices, which makes an explicit distinction
between "command-line devices" and "devices that are encountered 
recursively":

```
‘-D ACTION’
‘--devices=ACTION’
     If an input file is a device, FIFO, or socket, use ACTION to
     process it.  If ACTION is ‘read’, all devices are read just as if
     they were ordinary files.  If ACTION is ‘skip’, devices, FIFOs, and
     sockets are silently skipped.  By default, devices are read if they
     are on the command line or if the ‘-R’ (‘--dereference-recursive’)
     option is used, and are skipped if they are encountered recursively
     and the ‘-r’ (‘--recursive’) option is used.  This option has no
     effect on a file that is read via standard input.
```

Another significant argument in favor of the proposed change is that the
similar --include option doesn't mention "command-line files":

```
‘--include=GLOB’
     Search only files whose name matches GLOB, using wildcard matching
     as described under ‘--exclude’.  If contradictory ‘--include’ and
     ‘--exclude’ options are given, the last matching one wins.  If no
     ‘--include’ or ‘--exclude’ options match, a file is included unless
     the first such option is ‘--include’.
```

--- End Message ---
--- Begin Message --- Subject: Re: bug#63030: correction Date: Mon, 24 Apr 2023 13:05:31 -0700
tags 63030 notabug
done

On Sun, Apr 23, 2023 at 5:05 AM Sebastian Carlos <sebaaa1754@gmail.com> wrote:
> On second thought, I think the documentation is fine. I just misread it. It
> has two sentences: "Skip any COMMAND-LINE file with..." and "When searching
> recursively, skip any SUBFILE whose...". So both cases are considered and
> it doesn't imply that --exclude acts on command line files only.

Thanks for the follow-up.
This email closes the issue in our tracker.


--- End Message ---

reply via email to

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