From: Visuwesh <visuweshm@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: "60819-done@debbugs.gnu.org" <60819-done@debbugs.gnu.org>,
Eli Zaretskii <eliz@gnu.org>
Subject: bug#60819: 28.2; `ls-lisp.el' regression introduced in Emacs 26
Date: Sun, 15 Jan 2023 23:15:54 +0530 [thread overview]
Message-ID: <87wn5npu7h.fsf@gmail.com> (raw)
In-Reply-To: <CO6PR10MB547300D902576A9BB9753A80F3C09@CO6PR10MB5473.namprd10.prod.outlook.com> (Drew Adams's message of "Sun, 15 Jan 2023 17:04:05 +0000")
[ஞாயிறு ஜனவரி 15, 2023] Drew Adams wrote:
>> > In general, the character / in a glob pattern cannot be matched by a
>> > wildcard. E.g., Wikipedia says "Normally, the path separator character
>> > (/ on Linux/Unix, MacOS, etc. or \ on Windows) will never be matched."
>> > and Linux man page glob(7) says "A '/' in a pathname cannot be matched
>> > by a '?' or '*' wildcard, or by a range like "[.-0]"."
>>
>> This is incorrect. A wildcard like "*b*/" should expand to the list
>> of directories whose names match "*b*", whereas "*b*" should expand to
>> the list of files _and_ directories with matching names. This is how
>> Dired behaves on Posix platforms (where such an expansion is done by
>> the 'ls' program), and we want a similar behavior with ls-lisp.
>
> Excellent. That's in fact what I was naively expecting
> or hoping for.
>
> But googling for info about what such a glob pattern
> should match, I couldn't find anything that supported
> such an interpretation. Could you maybe point me to a
> source that covers this - so I can read more and point
> others to it? If you don't have the time to find that
> then don't worry about it. Thx.
From OpenBSD's glob(7) manpage [1],
Note that when matching a pathname, the path separator ‘/’, is not
matched by a ‘?’, or ‘*’, character or by a “[..]” sequence. Thus,
/usr/*/*/X11 would match /usr/X11R6/lib/X11 and
/usr/X11R6/include/X11 while /usr/*/X11 would not match
either. Likewise, /usr/*/bin would match /usr/local/bin but not
/usr/bin.
1. http://man.openbsd.org/glob.7
next prev parent reply other threads:[~2023-01-15 17:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-14 22:28 bug#60819: 28.2; `ls-lisp.el' regression introduced in Emacs 26 Drew Adams
2023-01-15 8:55 ` Eli Zaretskii
2023-01-15 17:04 ` Drew Adams
2023-01-15 17:25 ` Eli Zaretskii
2023-01-15 17:45 ` Visuwesh [this message]
2023-01-15 18:16 ` Eli Zaretskii
[not found] ` <87r0vvpqac.fsf@gmail.com>
2023-01-15 22:10 ` Drew Adams
2023-01-16 4:13 ` Visuwesh
2023-01-16 13:44 ` Eli Zaretskii
[not found] ` <handler.60819.D60819.167377296010937.notifdone@debbugs.gnu.org>
[not found] ` <jwv1qbxhlfc.fsf-monnier+emacs@gnu.org>
2023-12-20 23:39 ` bug#60819: closed (Re: bug#60819: 28.2; `ls-lisp.el' regression introduced in Emacs 26) Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wn5npu7h.fsf@gmail.com \
--to=visuweshm@gmail.com \
--cc=60819-done@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
--cc=eliz@gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).