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

From: Jeffrey Spencer <[email-masked]>
Date: Fri, 22 Feb 2019 07:31:03 +0900

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))