From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60819: 28.2; `ls-lisp.el' regression introduced in Emacs 26 Date: Sun, 15 Jan 2023 10:55:49 +0200 Message-ID: <83v8l85g8a.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23226"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60819-done@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 15 09:56:30 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pGyoW-0005l0-O7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Jan 2023 09:56:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGyoB-0007fj-Se; Sun, 15 Jan 2023 03:56:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGyo6-0007fN-PV for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 03:56:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGyo6-0000iD-HV for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 03:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGyo6-0002qg-DZ for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 03:56:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Jan 2023 08:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 60819 X-GNU-PR-Package: emacs Mail-Followup-To: 60819@debbugs.gnu.org, eliz@gnu.org, drew.adams@oracle.com Original-Received: via spool by 60819-done@debbugs.gnu.org id=D60819.167377296010937 (code D ref 60819); Sun, 15 Jan 2023 08:56:02 +0000 Original-Received: (at 60819-done) by debbugs.gnu.org; 15 Jan 2023 08:56:00 +0000 Original-Received: from localhost ([127.0.0.1]:56092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGyo3-0002qL-W0 for submit@debbugs.gnu.org; Sun, 15 Jan 2023 03:56:00 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGyny-0002q4-HH for 60819-done@debbugs.gnu.org; Sun, 15 Jan 2023 03:55:58 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGynp-0000hZ-DJ; Sun, 15 Jan 2023 03:55:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=15r2e4hJMc4P9BFMdGyq7zakPeMS4lVggJGzh9KUst0=; b=iGPWi2ExuDQ+ qjfqZymswbC6bfgma6cQk3k/qDhMzdzJ9aUQqwdg0d6vFWn9i3fqu3JItuBHob2jBriPVsNpDwMWg 35JJngs+PmXKvcD2CRdc/dJrcOuOuX5lMpdG2b6Rg2K9N8Wyc5VnRA44h5ILUgEn8c/gn0ShtCzRz rBkXXtLr4jBAl6lUq/DEX6kFuMXVR8091XfL4L1UCwcLtCDhga4jMSvR/ncm6TOd3IN+n055Sz2+U Z2pv3019XQ03Y5MRk/2SjibQXPSZS7QNCv+74F10QiPLqS9910WyNwjI6lPSpt/YZZgaVTGRy1r3/ YF4p3r8HAzjKv6afiEsAmQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGyno-0004kK-U5; Sun, 15 Jan 2023 03:55:45 -0500 In-Reply-To: (message from Drew Adams on Sat, 14 Jan 2023 22:28:36 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253414 Archived-At: > From: Drew Adams > Date: Sat, 14 Jan 2023 22:28:36 +0000 > > In all Emacs releases prior to Emacs 26, if you use command `dired' with > an input directory name that has wildcards and ends with a slash, > e.g. c:/foo/bar/*b*/, the command simply ignores the trailing slash and > correctly gives you a listing of all files and dirs in c:/foo/bar/ whose > names contain a b character. > > Starting with Emacs 26, such input raises an error. IMO it should not. > > Other than that, the error message is anyway inappropriate: "No files > matching regexp". I fixed the message to say "No files matching wildcard" instead. > 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. So I've now made ls-lisp on the emacs-29 branch behave like that: a wildcard that ends in a slash is expanded to the list of matching directories. And with that, I'm closing this bug.