From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27631: dired a/*/b Date: Sat, 29 Jul 2017 11:30:10 +0300 Message-ID: <83pocj3ast.fsf@gnu.org> References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1501317073 25233 195.159.176.226 (29 Jul 2017 08:31:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Jul 2017 08:31:13 +0000 (UTC) Cc: 27631@debbugs.gnu.org, michael.albinus@gmx.de To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 29 10:31:05 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbN9N-00069q-DV for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Jul 2017 10:31:05 +0200 Original-Received: from localhost ([::1]:51538 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbN9T-0002JX-AO for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Jul 2017 04:31:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbN9N-0002JS-Hq for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2017 04:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbN9K-0001H5-En for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2017 04:31:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57883) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dbN9K-0001Gy-BZ for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2017 04:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dbN9K-0008WR-6w for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2017 04:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2017 08:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150131703532727 (code B ref 27631); Sat, 29 Jul 2017 08:31:02 +0000 Original-Received: (at 27631) by debbugs.gnu.org; 29 Jul 2017 08:30:35 +0000 Original-Received: from localhost ([127.0.0.1]:60560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbN8t-0008Vn-Am for submit@debbugs.gnu.org; Sat, 29 Jul 2017 04:30:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbN8r-0008Va-M8 for 27631@debbugs.gnu.org; Sat, 29 Jul 2017 04:30:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbN8l-0000wG-Pc for 27631@debbugs.gnu.org; Sat, 29 Jul 2017 04:30:28 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbN8g-0000rU-RM; Sat, 29 Jul 2017 04:30:22 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4201 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dbN8d-0002FY-D6; Sat, 29 Jul 2017 04:30:20 -0400 In-reply-to: <87fudkv91l.fsf@calancha-pc> (message from Tino Calancha on Wed, 26 Jul 2017 00:19:18 +0900) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135107 Archived-At: > From: Tino Calancha > Cc: 27631@debbugs.gnu.org, michael.albinus@gmx.de > Date: Wed, 26 Jul 2017 00:19:18 +0900 > > Eli Zaretskii writes: > > >> commit e5d5bd9822c1c562a7feb16f035062fda603d4d9 > >> Author: Tino Calancha > >> Date: Thu Jul 13 23:56:43 2017 +0900 > >> > >> Dired: Handle wildards in directory part > >> > >> Allow to Dired to handle calls like > >> \(dired \"~/foo/*/*.el\"), that is, with wildcards withing > >> the directory part of the file argument. > > > Thanks, but this doesn't seem to work with ls-lisp.el, so I guess it > > relies on some features of the 'ls' command. (ls-lisp.el does support > > wildcards in the likes of "C-x d foo* RET".) So if we are going to > > accept this, either it should be made to work with ls-lisp.el > > (preferred), or some kind of error message should be emitted in that > > case, > Added support for ls-lisp and em-ls. > > >> +(defun insert-directory-wildcard-in-dir-p (dir) > >> + (when (string-match "[*]" (file-name-directory dir)) > >> + (let ((regexp "\\`\\([^*]+/\\)\\([^*]*[*].*\\)")) > >> + (string-match regexp dir) > >> + (cons (match-string 1 dir) (match-string 2 dir))))) > > > > Any reason you only want to support '*'? What about '?' or '[a-b]', > > for example? > Added support for (all?) posix globing. > > > Also, what happens if the directory includes a literal '*' character? > > That's possible on Posix systems. > Fixed. Then, we will visit that file if does exist. > > > I have something working pretty well. I gave up with `find-lisp' lib > because it was really slow. I changed to use 'em-glob' which is really > fast! LGTM, please push.