[Top][All Lists]

[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 <address@hidden> wrote:

> On Sat, 21 Jul 2018 15:06:19 +0300 Eli Zaretskii <address@hidden> wrote:
>>> From: Stephen Berman <address@hidden>
>>> Cc: Enrico Scholz <address@hidden>,  address@hidden
>>> 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 <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]