[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wdired doesn't work on files with backslash in their names
From: |
Chris Moore |
Subject: |
Re: wdired doesn't work on files with backslash in their names |
Date: |
Tue, 7 Feb 2006 05:14:17 +0100 |
This seems to fix it:
--- Backup/wdired.el.~1~ 2006-02-07 05:10:38.000000000 +0100
+++ wdired.el 2006-02-07 05:10:48.000000000 +0100
@@ -323,8 +323,8 @@
(if old
(setq file (get-text-property beg 'old-name))
(setq end (next-single-property-change (1+ beg) 'end-name))
- (setq file (buffer-substring-no-properties (+ 2 beg) end)))
- (and file (setq file (wdired-normalize-filename file))))
+ (setq file (buffer-substring-no-properties (+ 2 beg) end))
+ (and file (setq file (wdired-normalize-filename file)))))
(if (or no-dir old)
file
(and file (> (length file) 0)
Basically, we don't want to call wdired-normalize-filename if the
filename has been pulled from a text property rather than from a
substring of the dired buffer.
Note also the 'FIXME' a few lines up in the file:
;; FIXME: Use dired-get-filename's new properties.
I don't know if that still needs fixing or not.
Chris.
On 2/7/06, Chris Moore <address@hidden> wrote:
> I made a file with a backslash in its name and then tried to rename it
> using wdired. The backslash appeared doubled in the dired buffer.
>
> On renaming, it complains:
>
> Rename `/tmp/^G' to `/tmp/\aa' failed:
> (file-error Renaming no such file or directory /tmp/^G /tmp/\aa)
>
> Looks like the \a is being interpreted as a control-G?
>
> To repeat:
>
> In a shell:
>
> touch '\a'
>
> Then in a dired buffer viewing that file's directory:
>
> M-x wdired-change-to-wdired-mode RET
> <edit the \\a to something else>
> C-c C-c
>
> Chris.
>