From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Dired and wildcards Date: Tue, 19 Jun 2007 22:41:09 +0300 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1182282097 1395 80.91.229.12 (19 Jun 2007 19:41:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Jun 2007 19:41:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 19 21:41:34 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I0jZy-000145-7x for ged-emacs-devel@m.gmane.org; Tue, 19 Jun 2007 21:41:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I0jZw-0002Ov-Ad for ged-emacs-devel@m.gmane.org; Tue, 19 Jun 2007 15:41:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I0jZs-0002Kt-D8 for emacs-devel@gnu.org; Tue, 19 Jun 2007 15:41:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I0jZo-0002Gt-Ep for emacs-devel@gnu.org; Tue, 19 Jun 2007 15:41:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I0jZo-0002Gq-9x for emacs-devel@gnu.org; Tue, 19 Jun 2007 15:41:20 -0400 Original-Received: from nitzan.inter.net.il ([213.8.233.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I0jZm-0005h3-67 for emacs-devel@gnu.org; Tue, 19 Jun 2007 15:41:18 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-164-42.inter.net.il [80.230.164.42]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id HAJ38869 (AUTH halo1); Tue, 19 Jun 2007 22:41:16 +0300 (IDT) In-reply-to: (message from Andreas Schwab on Tue, 19 Jun 2007 18:51:51 +0200) X-detected-kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:73333 Archived-At: > From: Andreas Schwab > Cc: emacs-devel@gnu.org > Date: Tue, 19 Jun 2007 18:51:51 +0200 > > Eli Zaretskii writes: > > > And now to my original question: is there a way to tell Dired to > > interpret "foo[bar]" as a wildcard, even though a file by that literal > > name exists? You seem to say there is no way, but I'm not sure I > > understand you correctly. > > An existing directory is always preferred, see dired-noselect: > > ;; If the argument was syntactically a directory name not a file name, > ;; or if it happens to name a file that is a directory, > ;; convert it syntactically to a directory name. > ;; The reason for checking initially-was-dirname > ;; and not just file-directory-p > ;; is that file-directory-p is slow over ftp. > (if (or initially-was-dirname (file-directory-p dirname)) > (setq dirname (file-name-as-directory dirname))) Okay, thanks. In case you are wondering, I asked these questions because the ls-lisp emulation seems not to behave this way.