From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.devel Subject: Re: dired-tests.el fails on MS-Windows Date: Fri, 4 Aug 2017 16:01:25 +0200 Message-ID: References: <83zibjz519.fsf@gnu.org> <87d18fw79z.fsf@calancha-pc> <83pocfyurp.fsf@gnu.org> <83y3qzwjx9.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11374c8a09b94e0555edf037" X-Trace: blaine.gmane.org 1501860734 18032 195.159.176.226 (4 Aug 2017 15:32:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 Aug 2017 15:32:14 +0000 (UTC) Cc: Eli Zaretskii , Emacs developers To: Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 04 17:32:08 2017 Return-path: Envelope-to: ged-emacs-devel@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 1ddea6-0004J2-PJ for ged-emacs-devel@m.gmane.org; Fri, 04 Aug 2017 17:32:06 +0200 Original-Received: from localhost ([::1]:46139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddeaC-0000PE-DP for ged-emacs-devel@m.gmane.org; Fri, 04 Aug 2017 11:32:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dddBj-0004vL-Sc for emacs-devel@gnu.org; Fri, 04 Aug 2017 10:03:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dddBI-0006XX-Qd for emacs-devel@gnu.org; Fri, 04 Aug 2017 10:02:51 -0400 Original-Received: from mail-qt0-x22c.google.com ([2607:f8b0:400d:c0d::22c]:38101) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dddAh-0005yq-H4; Fri, 04 Aug 2017 10:01:47 -0400 Original-Received: by mail-qt0-x22c.google.com with SMTP id t37so9381169qtg.5; Fri, 04 Aug 2017 07:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=IlvqmW42uSmH0dNLOGtO821EMLifS/l0hwtGx3kpWAA=; b=TOQtHbleCbJ1MGEze+16RZ7P74dNMG+3ket22tnqFYJS4ZrA++M+ZDcnE3yJnXZr+Z 0yr089efoZA2/X/FxFA7/b5eA87ii/tpZpTj76Sl/r7hHHor51Mz4qGnZNANoqTaxt+d ezQkgff15g+cPbpekwpnTRV57ItPuUAzDOTx9x3OZDMIsk7wz4NLVpktWp1zenEYWSTq 3dfuB81/CQC+oqDT8LgaApaBjswJYX1yN0MT/rsDqC21o6Fuo5yZ1Wsp9ZJm/lJejTaM hPjI8XIwP0YAZH1r1CBPNGH4wT19OSrOpjPAssuVjW9xJLMTMtxPZ1yBGCrgeoREXvU3 53/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=IlvqmW42uSmH0dNLOGtO821EMLifS/l0hwtGx3kpWAA=; b=dJ7frSgTPwaRQRbxO71Nd88Ya7LI9F0h2xvOiKNPgBSzykW70doeWgRFE6SpG3kNjM Otm1fBmr2InDZQekVDmyqC7ua0yGHga4nMWiatZhvOz0qKo7dXE0FV9/rhWHqLY1niPs I0ppMUFYvHxwtHmkIA1KpZeXjiV+6sFN5DYpEM1plLPfhTL6dGFtKzijgL2uCSbIV6C+ 7CNyB8fVV0cPlCQkqOH4tIL3KsuT1nMp4UnfjTI1PE+XOy3sa+wKo/m/ngK1OztfTarD MB+84tReax/jo+17PalZyvWAE7U06G690cvR4zDdVxGl7bU8ICnWbfkfxnSGlXJVqPw6 K1wQ== X-Gm-Message-State: AHYfb5gnzU05s+KJoJIFYJjd922gm+Va1/zHd18e4Ui4nhwWObVS6wEa eM0cdM1Lg86nGYwYk25quNdVcGTo4HWD X-Received: by 10.200.55.129 with SMTP id d1mr3373591qtc.167.1501855306328; Fri, 04 Aug 2017 07:01:46 -0700 (PDT) Original-Received: by 10.140.82.21 with HTTP; Fri, 4 Aug 2017 07:01:25 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217297 Archived-At: --001a11374c8a09b94e0555edf037 Content-Type: text/plain; charset="UTF-8" 2017-08-04 15:44 GMT+02:00 Tino Calancha : > > > On Fri, 4 Aug 2017, Fabrice Popineau wrote: > > (with-temp-file (expand-file-name "b.txt" dir2)) >> - (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"? >> > Well we are using expand for 2 different things. > > 2) Expand shell wildcards. > (dired (expand-file-name "lis*/*file" source-directory)) > > This doesn't work here. I have : c:/tmp/dir1/foo.txt c:/tmp/dir2/bar.txt and: (expand-file-name "dir*/*.txt" "c:/tmp/") "c:/tmp/dir*/*.txt" Moreover, as far as I can read it, `expand-file-name' documentation says nothing about expanding wildcards. And last, `dired' maybe fed with a list, but the first argument needs to be the directory and the next ones, the files you want in the dired buffer, so I doubt that `dired' will accomodate the return value(s?) of `expand-file-name'? -> In other words: I don't understand how this should work :-) Fabrice Shows a dired buffer with 3 files: > lispref/Makefile > lispintro/Makefile > lisp/Makefile > --001a11374c8a09b94e0555edf037 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2017-08-04 15:44 GMT+02:00 Tino Calancha <tino.calancha@gmail.c= om>:


On Fri, 4 Aug 2017, Fabrice Popineau wrote:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(with-temp-file (expand-file-name = "b.txt" dir2))
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq buf (dired (expand-file-name &quo= t;dir*/*.txt" dir)))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq buf (dired (cons dir (file-expand= -wildcards "dir*/*.txt"))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dired-toggle-marks)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(should (cdr (dired-get-marked-fil= es))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(delete-directory dir 'recursive)

Am I wrong thinking that `expand-file-name' is not supposed to expand &= quot;dir*/*.txt"?
Well we are using expand for 2 different things.

2) Expand shell wildcards.
(dired (expand-file-name "lis*/*file" source-directory))

This doesn't work here.

= I have :

c:/tmp/dir1/foo.txt
c:/tmp/dir2= /bar.txt
=C2=A0
and:

(exp= and-file-name "dir*/*.txt" "c:/tmp/")
"c= :/tmp/dir*/*.txt"

Moreover, as far as I= can read it, `expand-file-name' documentation says nothing about=C2=A0=
expanding wildcards.

And last, `dired&#= 39; maybe fed with a list, but the first argument needs to be the directory=
and the next ones, the files you want in the dired buffer, so I = doubt that `dired' will accomodate
the return value(s?) of `e= xpand-file-name'?

-> In other words: I don&= #39;t understand how this should work :-)



Fabrice


Shows a dired buffer with 3 files:
lispref/Makefile
lispintro/Makefile
lisp/Makefile

--001a11374c8a09b94e0555edf037--