[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32173: 26.1; wdired: broken 'wdired-use-interactive-rename'
From: |
Stephen Berman |
Subject: |
bug#32173: 26.1; wdired: broken 'wdired-use-interactive-rename' |
Date: |
Thu, 26 Jul 2018 09:54:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
On Sun, 22 Jul 2018 01:38:44 +0200 Stephen Berman <stephen.berman@gmx.net>
wrote:
> On Sat, 21 Jul 2018 15:06:19 +0300 Eli Zaretskii <eliz@gnu.org> wrote:
>
>>> From: Stephen Berman <stephen.berman@gmx.net>
>>> Cc: Enrico Scholz <enrico.scholz@ensc.de>, 32173@debbugs.gnu.org
>>> Date: Sat, 21 Jul 2018 12:48:57 +0200
>>>
>>> AFAICT this patch avoids the bug and is simpler than the fix I proposed
>>> (https://lists.gnu.org/archive/html/bug-gnu-emacs/2018-07/msg00602.html).
>>> But with the above patch, if the user types C-g when prompted to make
>>> the replacement, the file name is left partly or wholely without the
>>> dired-filename text property. I'm not sure if that's a problem, that's
>>> why in my patch I restored the property. I note the current buggy code
>>> has the same issue.
>>
>> Right. But I think we had better did this more thoroughly, so I think
>> your solution (which I somehow managed to miss) is better. Please
>> wait for a few days and push to emacs-26 if no problems are reported
>> with your patch.
>
> Thanks, but...
>
> On Sat, 21 Jul 2018 15:19:36 +0300 Eli Zaretskii <eliz@gnu.org> wrote:
>
>> Btw, what happens in the non-interactive rename case, wrt the
>> dired-filename property? If the renamed file is left with part of it
>> covered by that property, we may have a broader problem in wdired.el.
>
> That's a good question (which didn't occur to me). With
> wdired-use-interactive-rename nil (the default), a partially edited
> filename is indeed only partly covered by the dired-filename property,
> but as soon as you type C-c C-c or C-x C-s the change is saved and the
> buffer returns to dired-mode, which makes the whole file name
> propertized again. So that's no problem. However, there could be a
> problem before saving the change if some function looks for the
> dired-filename property -- and in fact, there is such a function:
> dired-isearch-filenames in dired-aux.el. And indeed, you can use this
> in wdired-mode after editing file names but before saving the changes,
> and then the search will fail if the search string includes characters
> now lacking the dired-filename property.
>
> The only way I could think of to avoid this is to restore the text
> property via after-change-functions, as in the patch below.
[...]
Just pinging in case this has fallen under your radar. No sweat if you
haven't had time to review it or are waiting for a reaction from the OP.
Steve Berman
- bug#32173: 26.1; wdired: broken 'wdired-use-interactive-rename', Enrico Scholz, 2018/07/16
- bug#32173: 26.1; wdired: broken 'wdired-use-interactive-rename', Stephen Berman, 2018/07/18
- bug#32173: 26.1; wdired: broken 'wdired-use-interactive-rename', Eli Zaretskii, 2018/07/20
- bug#32173: 26.1; wdired: broken 'wdired-use-interactive-rename', Stephen Berman, 2018/07/21
- bug#32173: 26.1; wdired: broken 'wdired-use-interactive-rename', Eli Zaretskii, 2018/07/27
- bug#32173: 26.1; wdired: broken 'wdired-use-interactive-rename', Stephen Berman, 2018/07/27
- bug#32173: 26.1; wdired: broken 'wdired-use-interactive-rename', Eli Zaretskii, 2018/07/27
- bug#32173: 26.1; wdired: broken 'wdired-use-interactive-rename', Stephen Berman, 2018/07/28