GNU bug report logs - #27631
dired a/*/b

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sun, 9 Jul 2017 18:44:01 UTC

Severity: minor

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 27631 <at> debbugs.gnu.org, michael.albinus <at> gmx.de
Subject: bug#27631: dired a/*/b
Date: Sat, 29 Jul 2017 11:30:10 +0300
> From: Tino Calancha <tino.calancha <at> gmail.com>
> Cc: 27631 <at> debbugs.gnu.org,  michael.albinus <at> gmx.de
> Date: Wed, 26 Jul 2017 00:19:18 +0900
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> commit e5d5bd9822c1c562a7feb16f035062fda603d4d9
> >> Author: Tino Calancha <tino.calancha <at> 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.




This bug report was last modified 7 years and 295 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.