[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18475: 24.4.50; Wdired: cannot use C-k to delete a dir name if -F sw
From: |
Basil L. Contovounesios |
Subject: |
bug#18475: 24.4.50; Wdired: cannot use C-k to delete a dir name if -F switch used |
Date: |
Sun, 12 May 2019 13:36:04 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Stephen Berman <stephen.berman@gmx.net> writes:
> This happens not only with `/' but also with the other ls file indicator
> characters appended when using the -F switch. Making C-k work as
> expected for these cases is a small fix. However, the same issue also
> arises with symlinks, whether or not -F is used, and it does not seem as
> straightforward to deal with this case. The attached patch (against
> master) tries to ensure the following behavior:
>
> - Typing `C-k' with point just before the first character of a file name
> ending with an indicator character (using -F), or of link name,
> deletes the file name/symlink in WDired, but it is restored but marked
> for deletion on returning to Dired. The same also happens when just
> deleting the link name in WDired.
>
> - Typing `C-k' with point on such a file or link name, but after the
> first character, deletes the rest, resulting in renaming on returning
> to Dired.
>
> - Deleting the indicator character is possible in WDired but a noop: the
> character is restored on returning to Dired. (In the current code
> without the patch, the indicator characters are read-only, but I had
> to change that to make C-k work.)
>
> With symlinks:
>
> - The patch preserves the current behavior that an edit of the target
> name (possible when wdired-allow-to-redirect-links is non-nil, as it
> is by default) is saved on returning to Dired, and if the target name
> is deleted, then the new target on returning to Dired is "/dev/null".
>
> - Editing (changing or deleting) the string " -> " between the link and
> target names is possible in WDired but a noop: the symlink is
> unaltered on returning to Dired. (In the current code without the
> patch, " -> " is read-only, but I had to change that to make C-k work.)
>
> I've tested these cases, but it is quite possible that I overlooked some
> variants or other cases, so I'd appreciate testing and feedback from
> others. (Also, the code still needs more commenting and probably
> cleaning up.)
I can confirm your patch fixes the issue in the OP, but I haven't tested
it extensively.
Thanks for working on this,
--
Basil
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#18475: 24.4.50; Wdired: cannot use C-k to delete a dir name if -F switch used,
Basil L. Contovounesios <=