[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replacement of spaces in wdired
From: |
martin rudalics |
Subject: |
Re: Replacement of spaces in wdired |
Date: |
Sat, 09 Dec 2006 10:41:29 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> One problem I found is that it allows me to edit the last space in the
> " -> " string that indicates a symbolic link.
>
> If I have a symbolic link "a -> b" in the directory I'm editing, I can
> delete the 2nd space, leaving "a ->b", and when I hit C-c C-c, I end
> up with "a -> /dev/null".
>
> Doing a query replace of " " with "." when there are symlinks present
> also replaces the " " which follows each "->".
>
> Martin, I suggest you install your patch, since it is an improvement.
Chong could you please try to install it. Below is a hopefully adequate
ChangeLog:
* wdired.el (wdired-change-to-wdired-mode, wdired-finish-edit)
(wdired-search-and-rename): Simplify code.
(wdired-preprocess-files, wdired-preprocess-perms): Make
read-only property of preceding character rear-nonsticky to
avoid that it can be modified. Put old-name and old-link
properties on character preceding name and replace
put-text-property by add-text-properties.
(wdired-get-filename, wdired-get-previous-link): Get old-name
and old-link properties from character preceding name and
simplify code.
(wdired-preprocess-perms, wdired-set-bit, wdired-toggle-bit)
(wdired-perms-to-number): Make local-map property
rear-nonsticky to avoid that text following permissions may be
modified. Use add-text-properties instead of put-text-property
when changing a permission bit.
(wdired-change-to-dired-mode): Remove stickiness properties.
> Then can you fix this other problem?
I couldn't reliably test that. On Windows the " -> " show up and can be
manipulated iff you install an external package like w32-symlinks.el.
For reasons I never bothered to investigate that package occasionally
screws up my Emacs, hence I refrained from using it.