Subject: bug#14521: closed (Re: bug#22938: 24.5; Cannot rename files in directory with escaped spaces)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 08 Mar 2016 20:49:03 +0000

Your bug report

#22938: 24.2; Wdired does not handle backslash in filename

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
22938: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22938
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#22938: 24.5; Cannot rename files in directory with escaped spaces
From: Andreas Schwab <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked], Marty Rosenberg <[email-masked]>
Date: Tue, 08 Mar 2016 21:48:31 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

> AFAICS, the problem is in wdired-normalize-filename: it removes the
> backslash and the following blank from the name, thus creating a name
> of a file that doesn't exist.

Should be fixed in commit 02bf7cc.

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Subject: 24.2; Wdired does not handle backslash in filename
From: Benjamin Riefenstahl <[email-masked]>
To: [email-masked]
Date: Fri, 31 May 2013 18:00:51 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

-----

* Create a file /tmp/t\u, i.e. a file with the sequence "\u" in it.

  C-x C-f /tmp/t\u <return> <return> C-x C-s
  
* Open the directory in dired.

  C-x C-f <return>

* Change to wdired mode

  M-x wdire <tab> <return> 

* Exit wdired mode

  C-c C-c

* I get the error "wdired-get-filename: Non-hex digit used for Unicode
  escape".

-----

Variation:

* Create a file /tmp/t\h, i.e. a file with the sequence "\h" in it.

  C-x C-f /tmp/t\h <return> <return> C-x C-s
  
* Open the directory in dired.

  C-x C-f <return>

* Change to wdired mode

  M-x wdire <tab> <return> 

* Exit wdired mode

  C-c C-c

* I get the question "File /tmp/t\h already exists; rename to it
  anyway? (yes or no)".

-----

It seems that I run against the FIXME in wdired-normalize-filename.

Note that renaming and even deleting files works fine if I use the
methods provided by plain dired.

-----

In GNU Emacs 24.2.1 (i686-redhat-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-12 on buildvm-09.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11303000
Configured using:
 `configure '--build=i686-redhat-linux-gnu'
 '--host=i686-redhat-linux-gnu' '--program-prefix='
 '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
 '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
 '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
 '--libexecdir=/usr/libexec' '--localstatedir=/var'
 '--sharedstatedir=/var/lib' '--mandir=/usr/share/man'
 '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg'
 '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm'
 '--with-x-toolkit=gtk3' '--with-gpm=no' '--with-wide-int'
 'build_alias=i686-redhat-linux-gnu' 'host_alias=i686-redhat-linux-gnu'
 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32
 -march=i686 -mtune=atom -fasynchronous-unwind-tables'
 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: en_US.utf8
  value of $LC_NUMERIC: en_US.utf8
  value of $LC_TIME: en_US.utf8
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Dired

Minor modes in effect:
  tooltip-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
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x C-f / t m p / t \ u <return> <return> C-x C-s C-x 
f C-g C-g C-x C-f <return> M-x w d i r e <tab> <return> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> C-c C-c <up> <up> <up> D y e s <return> 
M-x <up> <return> C-c C-c M-x r e p o r s t <backspace> 
<backspace> t - <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
Saving file /tmp/t\u...
Wrote /tmp/t\u
Quit [2 times]
Press C-c C-c when finished or C-c ESC to abort changes
wdired-get-filename: Non-hex digit used for Unicode escape
Deleting...done
Press C-c C-c when finished or C-c ESC to abort changes
wdired-get-filename: Non-hex digit used for Unicode escape

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils wdired dired regexp-opt time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer loaddefs button faces cus-face files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)