GNU bug report logs - #34610
27.0.50; wdired gets rename file and directory errors when using gls and -F or --classify switch

Previous Next

Package: emacs;

Reported by: Jeffrey Spencer <jeffspencerd <at> gmail.com>

Date: Thu, 21 Feb 2019 22:54:01 UTC

Severity: normal

Found in version 27.0.50

To reply to this bug, email your comments to 34610 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34610; Package emacs. (Thu, 21 Feb 2019 22:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jeffrey Spencer <jeffspencerd <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 21 Feb 2019 22:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jeffrey Spencer <jeffspencerd <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; wdired gets rename file and directory errors when using gls
 and -F or --classify switch
Date: Fri, 22 Feb 2019 07:31:03 +0900
[Message part 1 (text/plain, inline)]
This is the only setup besides -Q default:
(setq insert-directory-program "gls" dired-use-ls-dired t)
(setq dired-listing-switches "-a --classify -lGhHA
--group-directories-first")
"-a --classify -lGhHA  --group-directories-first"

Renaming directories doesn't work right due to the --classify (-F) switches
using gls on Mac. Also, probably has problems with executables due to
adding '*' to the end of the file name but I didn't check. I had to right
an advice around wdired-change-mode to remove the switches and then re-add
the -F --classify.

Here is the errors with just a simple truing to add a character to any
directory:

Rename ‘/Users/Me/Downloads/youtube/test/k’ to
‘/Users/Me/Downloads/youtube/test/k/’ failed:
(file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/k
/Users/Me/Downloads/youtube/test/k/k)
Rename ‘/Users/Me/Downloads/youtube/test/kdkd’ to
‘/Users/Me/Downloads/youtube/test/kdkd/’ failed:
(file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/kdkd
/Users/Me/Downloads/youtube/test/kdkd/kdkd)
Rename ‘/Users/Me/Downloads/youtube/test/l’ to
‘/Users/Me/Downloads/youtube/test/l/’ failed:
(file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/l
/Users/Me/Downloads/youtube/test/l/l)
Rename ‘/Users/Me/Downloads/youtube/test/kdkd/kdk’ to
‘/Users/Me/Downloads/youtube/test/kdkd/kdk/’ failed:
(file-error Renaming Invalid argument
/Users/Me/Downloads/youtube/test/kdkd/kdk
/Users/Me/Downloads/youtube/test/kdkd/kdk/kdk)

4 rename actions failed

In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin15.6.0, NS appkit-1404.47
Version 10.11.6 (Build 15G22010))
of 2019-02-20 built on Jeffs-MacBook-Pro-2.local
Repository revision: 0a6c4479cff17b487580abe3a7ee202e71be25d2
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1404
System Description:  Mac OS X 10.11.6

Recent messages:
C-c C-p is undefined
Press C-c C-c when finished or C-c ESC to abort changes
dired-create-directory: Cannot create directory
/Users/bigtyme/Downloads/youtube/test/kdkd: file exists
Press C-c C-c when finished or C-c ESC to abort changes
Creating directory for file /Users/bigtyme/Downloads/youtube/test/k/blah/
3 rename actions failed--type ? for details
Press C-c C-c when finished or C-c ESC to abort changes
3 rename actions failed--type ? for details
Press C-c C-c when finished or C-c ESC to abort changes
3 rename actions failed--type ? for details

Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs-plus/HEAD-0a6c447/share/info/emacs
--prefix=/usr/local/Cellar/emacs-plus/HEAD-0a6c447 --with-xml2
--without-dbus --with-gnutls --with-imagemagick --with-modules
--with-rsvg --with-ns --disable-ns-self-contained'

Configured features:
RSVG IMAGEMAGICK GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS NS MODULES THREADS PDUMPER LCMS2 GMP

Important settings:
 value of $LANG: en_AU.UTF-8
 locale-coding-system: utf-8-unix

Major mode: Dired

Minor modes in effect:
 tooltip-mode: t
 global-eldoc-mode: t
 electric-indent-mode: t
 mouse-wheel-mode: t
 tool-bar-mode: t
 menu-bar-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 blink-cursor-mode: t
 auto-composition-mode: t
 auto-encryption-mode: t
 auto-compression-mode: t
 buffer-read-only: t
 line-number-mode: t
 transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail wdired dired-aux mm-archive
message dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived
gnus-util rmail rmail-loaddefs time-date mailabbrev gmm-utils mailheader
mm-decode mm-bodies mm-encode mail-utils gnutls network-stream url-http
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw
nsm rmc puny url-cache url-auth url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap epg
finder-inf package easymenu epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq byte-opt gv bytecomp byte-compile
cconv cl-loaddefs cl-lib elec-pair tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 67245 11725)
(symbols 48 8118 1)
(strings 32 22680 2213)
(string-bytes 1 762050)
(vectors 16 12430)
(vector-slots 8 151079 17144)
(floats 8 18 181)
(intervals 56 554 0)
(buffers 992 17))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34610; Package emacs. (Fri, 26 Apr 2019 23:59:01 GMT) Full text and rfc822 format available.

Message #8 received at 34610 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Jeffrey Spencer <jeffspencerd <at> gmail.com>
Cc: 34610 <at> debbugs.gnu.org
Subject: Re: bug#34610: 27.0.50;
 wdired gets rename file and directory errors when using gls and -F or
 --classify switch
Date: Sat, 27 Apr 2019 00:58:36 +0100
Jeffrey Spencer <jeffspencerd <at> gmail.com> writes:

> This is the only setup besides -Q default:
> (setq insert-directory-program "gls" dired-use-ls-dired t)
> (setq dired-listing-switches "-a --classify -lGhHA  --group-directories-first")
> "-a --classify -lGhHA  --group-directories-first"
>
> Renaming directories doesn't work right due to the --classify (-F)
> switches using gls on Mac. Also, probably has problems with
> executables due to adding '*' to the end of the file name but I didn't
> check. I had to right an advice around wdired-change-mode to remove
> the switches and then re-add the -F --classify.
>
> Here is the errors with just a simple truing to add a character to any directory:
>
> Rename ‘/Users/Me/Downloads/youtube/test/k’ to ‘/Users/Me/Downloads/youtube/test/k/’ failed:
> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/k /Users/Me/Downloads/youtube/test/k/k)
> Rename ‘/Users/Me/Downloads/youtube/test/kdkd’ to ‘/Users/Me/Downloads/youtube/test/kdkd/’ failed:
> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/kdkd /Users/Me/Downloads/youtube/test/kdkd/kdkd)
> Rename ‘/Users/Me/Downloads/youtube/test/l’ to ‘/Users/Me/Downloads/youtube/test/l/’ failed:
> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/l /Users/Me/Downloads/youtube/test/l/l)
> Rename ‘/Users/Me/Downloads/youtube/test/kdkd/kdk’ to ‘/Users/Me/Downloads/youtube/test/kdkd/kdk/’ failed:
> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/kdkd/kdk /Users/Me/Downloads/youtube/test/kdkd/kdk/kdk)
>
> 4 rename actions failed

This sounds similar to bug#34915[1], whose fix was recently pushed to
master[2].  Can you please check whether that also fixes your issue?  If
so, I will merge the two reports as duplicate.

[1]: https://debbugs.gnu.org/34915

[2: 6d8e0fc5aa]: Make wdired-mode ignore ls file indicators
  2019-04-25 19:17:23 +0200
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6d8e0fc5aa7673540486af9ecbfc0a3e23c305cf

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34610; Package emacs. (Thu, 30 May 2019 12:13:02 GMT) Full text and rfc822 format available.

Message #11 received at 34610 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Jeffrey Spencer <jeffspencerd <at> gmail.com>
Cc: 34610 <at> debbugs.gnu.org
Subject: Re: bug#34610: 27.0.50;
 wdired gets rename file and directory errors when using gls and -F or
 --classify switch
Date: Thu, 30 May 2019 13:12:09 +0100
Ping!

"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Jeffrey Spencer <jeffspencerd <at> gmail.com> writes:
>
>> This is the only setup besides -Q default:
>> (setq insert-directory-program "gls" dired-use-ls-dired t)
>> (setq dired-listing-switches "-a --classify -lGhHA  --group-directories-first")
>> "-a --classify -lGhHA  --group-directories-first"
>>
>> Renaming directories doesn't work right due to the --classify (-F)
>> switches using gls on Mac. Also, probably has problems with
>> executables due to adding '*' to the end of the file name but I didn't
>> check. I had to right an advice around wdired-change-mode to remove
>> the switches and then re-add the -F --classify.
>>
>> Here is the errors with just a simple truing to add a character to any directory:
>>
>> Rename ‘/Users/Me/Downloads/youtube/test/k’ to ‘/Users/Me/Downloads/youtube/test/k/’ failed:
>> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/k
>> /Users/Me/Downloads/youtube/test/k/k)
>> Rename ‘/Users/Me/Downloads/youtube/test/kdkd’ to
>> ‘/Users/Me/Downloads/youtube/test/kdkd/’ failed:
>> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/kdkd
>> /Users/Me/Downloads/youtube/test/kdkd/kdkd)
>> Rename ‘/Users/Me/Downloads/youtube/test/l’ to ‘/Users/Me/Downloads/youtube/test/l/’ failed:
>> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/l
>> /Users/Me/Downloads/youtube/test/l/l)
>> Rename ‘/Users/Me/Downloads/youtube/test/kdkd/kdk’ to
>> ‘/Users/Me/Downloads/youtube/test/kdkd/kdk/’ failed:
>> (file-error Renaming Invalid argument
>> /Users/Me/Downloads/youtube/test/kdkd/kdk
>> /Users/Me/Downloads/youtube/test/kdkd/kdk/kdk)
>>
>> 4 rename actions failed
>
> This sounds similar to bug#34915[1], whose fix was recently pushed to
> master[2].  Can you please check whether that also fixes your issue?  If
> so, I will merge the two reports as duplicate.
>
> [1]: https://debbugs.gnu.org/34915
>
> [2: 6d8e0fc5aa]: Make wdired-mode ignore ls file indicators
>   2019-04-25 19:17:23 +0200
>   https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6d8e0fc5aa7673540486af9ecbfc0a3e23c305cf

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34610; Package emacs. (Thu, 30 May 2019 13:03:02 GMT) Full text and rfc822 format available.

Message #14 received at 34610 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Jeffrey Spencer <jeffspencerd <at> gmail.com>
Cc: 34610 <at> debbugs.gnu.org
Subject: Re: bug#34610: 27.0.50;
 wdired gets rename file and directory errors when using gls and -F or
 --classify switch
Date: Thu, 30 May 2019 14:02:47 +0100
Jeffrey Spencer <jeffspencerd <at> gmail.com> writes:

> Sorry, I installed from HEAD awhile ago to fix a problem with magit,
> but haven't been able to update to the current head to test again as I
> patched it with an advice currently. I will try to update to Head this
> week then let you know.

Great, just be sure to select "Reply All" in your next message, so that
the bug address 34610 <at> debbugs.gnu.org is included in the To: or Cc:
header and others reading this bug report can see it as well.

TIA,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34610; Package emacs. (Thu, 30 May 2019 17:41:02 GMT) Full text and rfc822 format available.

Message #17 received at 34610 <at> debbugs.gnu.org (full text, mbox):

From: Jeffrey Spencer <jeffspencerd <at> gmail.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 34610 <at> debbugs.gnu.org
Subject: Re: bug#34610: 27.0.50; wdired gets rename file and directory errors
 when using gls and -F or --classify switch
Date: Fri, 31 May 2019 02:40:41 +0900
[Message part 1 (text/plain, inline)]
The fix appears to work fine in my testing on a emacs -Q with just the
switches. I didn't remove my advice around the call to wdired to test in my
own setup because now I like that the classify switches and executable
marks are removed, since this just seems to make that text unwritable. It
makes editing multiple files with multiple-curosrs much easier if these
extra characters aren't there for me in wdired.

On Thu, May 30, 2019 at 10:02 PM Basil L. Contovounesios <contovob <at> tcd.ie>
wrote:

> Jeffrey Spencer <jeffspencerd <at> gmail.com> writes:
>
> > Sorry, I installed from HEAD awhile ago to fix a problem with magit,
> > but haven't been able to update to the current head to test again as I
> > patched it with an advice currently. I will try to update to Head this
> > week then let you know.
>
> Great, just be sure to select "Reply All" in your next message, so that
> the bug address 34610 <at> debbugs.gnu.org is included in the To: or Cc:
> header and others reading this bug report can see it as well.
>
> TIA,
>
> --
> Basil
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34610; Package emacs. (Sat, 24 Aug 2019 00:53:02 GMT) Full text and rfc822 format available.

Message #20 received at 34610 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Jeffrey Spencer <jeffspencerd <at> gmail.com>, 34610 <at> debbugs.gnu.org
Subject: Re: bug#34610: 27.0.50; wdired gets rename file and directory errors
 when using gls and -F or --classify switch
Date: Sat, 24 Aug 2019 02:52:08 +0200
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Jeffrey Spencer <jeffspencerd <at> gmail.com> writes:
>
>> This is the only setup besides -Q default:
>> (setq insert-directory-program "gls" dired-use-ls-dired t)
>> (setq dired-listing-switches "-a --classify -lGhHA  --group-directories-first")
>> "-a --classify -lGhHA  --group-directories-first"
>>
>> Renaming directories doesn't work right due to the --classify (-F)
>> switches using gls on Mac. Also, probably has problems with
>> executables due to adding '*' to the end of the file name but I didn't
>> check. I had to right an advice around wdired-change-mode to remove
>> the switches and then re-add the -F --classify.
>>
>> Here is the errors with just a simple truing to add a character to any directory:
>>
>> Rename ‘/Users/Me/Downloads/youtube/test/k’ to ‘/Users/Me/Downloads/youtube/test/k/’ failed:
>> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/k /Users/Me/Downloads/youtube/test/k/k)
>> Rename ‘/Users/Me/Downloads/youtube/test/kdkd’ to ‘/Users/Me/Downloads/youtube/test/kdkd/’ failed:
>> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/kdkd /Users/Me/Downloads/youtube/test/kdkd/kdkd)
>> Rename ‘/Users/Me/Downloads/youtube/test/l’ to ‘/Users/Me/Downloads/youtube/test/l/’ failed:
>> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/l /Users/Me/Downloads/youtube/test/l/l)
>> Rename ‘/Users/Me/Downloads/youtube/test/kdkd/kdk’ to ‘/Users/Me/Downloads/youtube/test/kdkd/kdk/’ failed:
>> (file-error Renaming Invalid argument /Users/Me/Downloads/youtube/test/kdkd/kdk /Users/Me/Downloads/youtube/test/kdkd/kdk/kdk)
>>
>> 4 rename actions failed
>
> This sounds similar to bug#34915[1], whose fix was recently pushed to
> master[2].  Can you please check whether that also fixes your issue?  If
> so, I will merge the two reports as duplicate.

I'm seeing a failure in the test suite on current master on MacOS that
does not show up on my Debian GNU/Linux system.  The failing test is
the test case for Bug#34915.

(Shell command succeeded with no output)
Connection file
"/var/folders/pj/rhx0gxy15tv3vx6l3mdy0qvm0000gn/T/test-dir-nheUrY/server"
deleted
Press C-c C-c when finished or C-c ESC to abort changes
1 rename actions failed--type ? for details
Connection file
"/var/folders/pj/rhx0gxy15tv3vx6l3mdy0qvm0000gn/T/test-dir-nheUrY/server"
deleted
Test wdired-test-bug34915 backtrace:
  signal(ert-test-failed (((should (equal dir (pop names))) :form (equ
  ert-fail(((should (equal dir (pop names))) :form (equal "bar@" "wbar
  #f(compiled-function () #<bytecode 0x1fec25c0680d>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name wdired-test-bug34915 :documentation "
  ert-run-or-rerun-test(#s(ert--stats :selector (not (or ... ...)) :te
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/wdired-tests" "--eva
  command-line()
  normal-top-level()
Test wdired-test-bug34915 condition:
    (ert-test-failed
     ((should
       (equal dir
          (pop names)))
      :form
      (equal "bar@" "wbar@")
      :value nil :explanation
      (arrays-of-different-length 4 5 "bar@" "wbar@" first-mismatch-at 0)))
   FAILED  3/5  wdired-test-bug34915 (0.065950 sec)

When I test manually using the flags "-lF", I'm unable to rename a
symlink in wdired and get this error:

   "1 rename actions failed--type ? for details"

I'm using the stock ls from BSD.  Here's the difference in output from
GNU ls and BSD ls on my two machines:

macos$ mkdir tmp
macos$ cd tmp
macos$ touch a
macos$ ln -s a b
macos$ ls -lF
total 8
-rw-r--r--  1 skangas  staff  0 Aug 24 02:41 a
lrwxr-xr-x  1 skangas  staff  1 Aug 24 02:41 b@ -> a
macos$

debian$ mkdir tmp
debian$ cd tmp
debian$ touch a
debian$ ln -s a b
debian$ ls -lF
total 0
-rw-r--r-- 1 skangas skangas 0 Aug 24 02:42 a
lrwxr-xr-x 1 skangas skangas 1 Aug 24 02:42 b -> a
debian$

AFAICT, the difference is that the BSD ls appends an @ character to
the file name, which wdired incorrectly interprets as part of the file
name.

Thanks,
Stefan Kangas




This bug report was last modified 5 years and 303 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.