From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#34816: 25.2; dired regexp fails for filenames that begin with a space Date: Tue, 18 Aug 2020 17:00:50 +0000 Message-ID: References: <00F945C7-01EA-4396-A566-C0DFAF8B77CA@lakecitygraphic.com> <875zsosc09.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15546"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Andrew Eggenberger , 34816@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 18 19:01:36 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k84zP-0003t3-FP for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Aug 2020 19:01:35 +0200 Original-Received: from localhost ([::1]:36442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k84zO-0002iq-He for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Aug 2020 13:01:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k84z1-0002gi-Ae for bug-gnu-emacs@gnu.org; Tue, 18 Aug 2020 13:01:11 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k84ys-0001ki-2z for bug-gnu-emacs@gnu.org; Tue, 18 Aug 2020 13:01:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k84ys-0001Pi-1W for bug-gnu-emacs@gnu.org; Tue, 18 Aug 2020 13:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Aug 2020 17:01:01 +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.15977700595232 (code B ref 34816); Tue, 18 Aug 2020 17:01:01 +0000 Original-Received: (at 34816) by debbugs.gnu.org; 18 Aug 2020 17:00:59 +0000 Original-Received: from localhost ([127.0.0.1]:36842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k84yo-0001Lw-MO for submit@debbugs.gnu.org; Tue, 18 Aug 2020 13:00:58 -0400 Original-Received: from mail-yb1-f179.google.com ([209.85.219.179]:44518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k84ym-0001F9-Ag for 34816@debbugs.gnu.org; Tue, 18 Aug 2020 13:00:57 -0400 Original-Received: by mail-yb1-f179.google.com with SMTP id i10so11722382ybt.11 for <34816@debbugs.gnu.org>; Tue, 18 Aug 2020 10:00:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=p5sk7gFuiZz34N0KVSBY/CRCFwn2DUD8vtcUzIfrcG8=; b=Q6FQ2dE0gbsUEJyEP2KEFBl4yRP5rbGis8mjpU2X88aLBvmcvG5KqwcrNXKD1OYApH 4Ni1mKcJ3TA3NQ+s2e1hywGkHmHTvB9PVEIw/JpYCrFbbQiP7x/AXnEjYy5BkrZ8/2cR WWDcQXGQlo/MFo9I1RvKuP3k3T5FEuTZeAhF0nLCDrbmqsSlB4q2XbRb/mogLuoQNVsr C9bAMhas/5XMA7IVVdHX6vkVOXCNFxGCVuJt71bJ/MMo1+8kCJF15ldQ21Tl9MLQ3U3z hB8y8qPwxYb7XE9/bIDnPcW+9jTxu6yu3QYYXkdXL0/3ACUzuyC+wYZDGsnix/ebcZzc sk7Q== X-Gm-Message-State: AOAM530IvUmLxXD6FoVmO6POcJUS5DjJiterp3hiALNCox0QXOUSE/rU x3tsFQXvwnbUzbkFImxOibvfa7Gwa28LksT1heJL1m2c5yxI8Q== X-Google-Smtp-Source: ABdhPJxgvlWGXj6ro2fqjV9sLnYIEhKcjMeDv8XwVxTjidGkHWmmhafi1oQE/vR0VU0T1XsOUOPPUsMs0/1ZCSLZUiY= X-Received: by 2002:a25:880e:: with SMTP id c14mr28755637ybl.181.1597770050950; Tue, 18 Aug 2020 10:00:50 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 18 Aug 2020 17:00:50 +0000 In-Reply-To: <875zsosc09.fsf@gmx.de> (Michael Albinus's message of "Tue, 12 Mar 2019 10:00:38 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:185522 Archived-At: Michael Albinus writes: > 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. So is the conclusion here to either use GNU ls, or otherwise ls-lisp.el? If so, should this bug be closed? Best regards, Stefan Kangas