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

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

bug#27631: dired a/*/b


From: Eli Zaretskii
Subject: bug#27631: dired a/*/b
Date: Sat, 29 Jul 2017 11:30:10 +0300

> From: Tino Calancha <tino.calancha@gmail.com>
> Cc: 27631@debbugs.gnu.org,  michael.albinus@gmx.de
> Date: Wed, 26 Jul 2017 00:19:18 +0900
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> commit e5d5bd9822c1c562a7feb16f035062fda603d4d9
> >> Author: Tino Calancha <tino.calancha@gmail.com>
> >> 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.





reply via email to

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