On Fri, 4 Aug 2017, Fabrice Popineau wrote:
(with-temp-file (expand-file-name "b.txt" dir2))Well we are using expand for 2 different things.
- (setq buf (dired (expand-file-name "dir*/*.txt" dir)))
+ (setq buf (dired (cons dir (file-expand-wildcards "dir*/*.txt"))))
(dired-toggle-marks)
(should (cdr (dired-get-marked-files))))
(delete-directory dir 'recursive)
Am I wrong thinking that `expand-file-name' is not supposed to expand "dir*/*.txt"?
2) Expand shell wildcards.
(dired (expand-file-name "lis*/*file" source-directory))
Shows a dired buffer with 3 files:
lispref/Makefile
lispintro/Makefile
lisp/Makefile