From: Fabrice Popineau <fabrice.popineau@gmail.com>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: John Wiegley <jwiegley@gmail.com>, Eli Zaretskii <eliz@gnu.org>,
Emacs developers <emacs-devel@gnu.org>
Subject: Re: dired-tests.el fails on MS-Windows
Date: Fri, 4 Aug 2017 16:58:53 +0200 [thread overview]
Message-ID: <CAFgFV9NsqFp5H9K+emc8HXsnNFi0zPpy84kskqf-GXda=KkFKw@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1708042343340.15299@calancha-pc>
[-- Attachment #1: Type: text/plain, Size: 2466 bytes --]
2017-08-04 16:49 GMT+02:00 Tino Calancha <tino.calancha@gmail.com>:
>
>
> On Fri, 4 Aug 2017, Fabrice Popineau wrote:
>
>
>>
>> 2017-08-04 16:23 GMT+02:00 Fabrice Popineau <fabrice.popineau@gmail.com>:
>>
>>
>> Actually, the problem seems to be in the `insert-directory-wildcard-in-dir-p'
>> function
>> which wrongly splits "c:/tmp/dir*/*.txt" in ("c:/tmp/" . "dir*/*.txt")
>> instead of
>> ("c:/tmp/dir*/" . "*.txt")
>>
>> Forget this (wrong) diagnostic.
>>
>> The culprit is actually
>>
>> (let ((default-directory "c:/tmp/"))
>> (eshell-extended-glob "dir*/*.txt"))
>> "dir*/*.txt"
>>
>> which fails to expand the wildcards (when `file-expand-wildcards'
>> succeeds).
>>
> Thank you Fabrice,
> that's interesing. I am just wondering if `eshell-extended-glob' gets
> confused with the Windows path, i mean, the disk name 'c:' in front.
>
> Could you check if the following works?
> M-x eshell RET
> cd "c:/tmp"
> ls -l dir*/*.txt
>
> It says :
c:/tmp $ ls -l dir*/*.txt
dir*/*.txt: No such file or directory
I am also curious if:
> M-: (equal temporary-file-directory "c:/tmp/") RET
> => t
>
> Nope, my temp dir in this case is the Windows temp dir.
("c:/Users/Fabrice/AppData/Roaming/Local/Temp/")
And out of curiosity: what does em-glob that file-expand-wildcards doesn't?
Because replacing the former by the latter would withdraw a depency on
eshell parts in ls-lisp :
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 9a4fc19744..7fe2803271 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -486,7 +486,7 @@ ls-lisp-insert-directory
;; before eshell is compiled.
;; So instead we add an autoload call here.
;; (https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01083.html).
-(autoload 'eshell-extended-glob "em-glob")
+;; (autoload 'eshell-extended-glob "em-glob")
(declare-function dired-read-dir-and-switches "dired" (str))
(declare-function dired-goto-next-file "dired" ())
@@ -499,7 +499,8 @@ ls-lisp--dired
(if (not dir-wildcard)
(funcall orig-fun dir-or-list switches)
(let* ((default-directory (car dir-wildcard))
- (files (eshell-extended-glob (cdr dir-wildcard)))
+ ;; (files (eshell-extended-glob (cdr dir-wildcard)))
+ (files (file-expand-wildcards (cdr dir-wildcard)))
(dir (car dir-wildcard)))
(if files
(let ((inhibit-read-only t)
(Obviously: the problem in em-glob as to be fixed in any case)
Fabrice
[-- Attachment #2: Type: text/html, Size: 4066 bytes --]
next prev parent reply other threads:[~2017-08-04 14:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 15:22 dired-tests.el fails on MS-Windows Eli Zaretskii
2017-08-01 17:02 ` Tino Calancha
2017-08-01 19:04 ` Eli Zaretskii
2017-08-01 20:56 ` Fabrice Popineau
2017-08-02 6:44 ` Tino Calancha
2017-08-04 13:18 ` Eli Zaretskii
2017-08-04 13:30 ` Fabrice Popineau
2017-08-04 13:44 ` Tino Calancha
2017-08-04 14:01 ` Fabrice Popineau
2017-08-04 14:00 ` Eli Zaretskii
2017-08-04 5:21 ` Tino Calancha
2017-08-04 13:14 ` Eli Zaretskii
2017-08-04 13:39 ` Tino Calancha
2017-08-04 14:23 ` Fabrice Popineau
2017-08-04 14:39 ` Fabrice Popineau
2017-08-04 14:49 ` Tino Calancha
2017-08-04 14:58 ` Fabrice Popineau [this message]
2017-08-04 15:10 ` Tino Calancha
2017-08-01 20:52 ` Fabrice Popineau
2017-08-02 3:38 ` Tino Calancha
2017-08-02 6:31 ` Michael Albinus
2017-08-02 7:59 ` Tino Calancha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFgFV9NsqFp5H9K+emc8HXsnNFi0zPpy84kskqf-GXda=KkFKw@mail.gmail.com' \
--to=fabrice.popineau@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jwiegley@gmail.com \
--cc=tino.calancha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).