From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#34816: 25.2; dired regexp fails for filenames that begin with a space Date: Tue, 12 Mar 2019 10:00:38 +0100 Message-ID: <875zsosc09.fsf@gmx.de> References: <00F945C7-01EA-4396-A566-C0DFAF8B77CA@lakecitygraphic.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="210612"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 34816@debbugs.gnu.org To: Andrew Eggenberger Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 12 11:08:47 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3eL1-000scz-KI for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Mar 2019 11:08:47 +0100 Original-Received: from localhost ([127.0.0.1]:48789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3eL0-00072q-Er for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Mar 2019 06:08:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3dU2-00085z-Sw for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2019 05:14:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3dHS-00064C-L3 for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2019 05:01:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54439) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3dHS-00063Z-ER for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2019 05:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h3dHS-0005xj-7C for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2019 05:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Mar 2019 09:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34816 X-GNU-PR-Package: emacs Original-Received: via spool by 34816-submit@debbugs.gnu.org id=B34816.155238125922903 (code B ref 34816); Tue, 12 Mar 2019 09:01:02 +0000 Original-Received: (at 34816) by debbugs.gnu.org; 12 Mar 2019 09:00:59 +0000 Original-Received: from localhost ([127.0.0.1]:39750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3dHL-0005xH-OY for submit@debbugs.gnu.org; Tue, 12 Mar 2019 05:00:59 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:42991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3dHJ-0005x3-2K for 34816@debbugs.gnu.org; Tue, 12 Mar 2019 05:00:54 -0400 Original-Received: from detlef.gmx.de ([178.20.94.15]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LaFmY-1gdtUn2pjC-00m1K5; Tue, 12 Mar 2019 10:00:39 +0100 In-Reply-To: <00F945C7-01EA-4396-A566-C0DFAF8B77CA@lakecitygraphic.com> (Andrew Eggenberger's message of "Mon, 11 Mar 2019 11:13:05 -0500") X-Provags-ID: V03:K1:oEd8Q21iKU1O83URRdk6NnbNKMEiPWay4fSiEOx5Tj/Rk9Cs5+M xpPjQgyXN95c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precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156255 Archived-At: Andrew Eggenberger writes: Hi Andrew, > Trying to use dired-do-rename-regexp caused the following error: > > (file-error Renaming No such file or directory > /Users/andrew/Public/Temp_2019/Temp_2.25.19/Tiger Pride/- 1B, Thieren, > Addison.JPG /Users/andrew/Public/Temp_2019/Temp_2.25.19/Tiger > Pride/Addison, Thieren.jpg) > > The reason for the file error is that the filename actually begins > with > a space character before the hyphen. It appears that the mechanism > used to identify filenames within dired isn't sensitive to opening > spaces. It isn't as simple as it looks. Often, dired uses a command like "ls -al --dired". This gives precise information, where file names are located in the output, and Emacs could determine also file names starting with spaces. If this ls option isn't available, something like "ls -al" is applied. From the output it isn't obvious, whether a leading space belongs to a file name, or whether it is just a separator to the date. One could implement heuristics (check the column other file names start with), but this isn't implemented. If it comes to remote file names, the situation is even worse, because you cannot always assume a proper ls command on the remote side. One alternative for you might to use ls-lisp.el. It doesn't apply "ls -al", but tries to collect the needed information differently. Due to this, dired might have a better idea about file names. Best regards, Michael.