[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31601: Dired/Wdired: Play nicely with recursive list of files and di
From: |
Keith David Bershatsky |
Subject: |
bug#31601: Dired/Wdired: Play nicely with recursive list of files and directories. |
Date: |
Mon, 28 May 2018 16:11:38 -0700 |
Attached is a draft/proof-concept patch.diff of my ideas regarding how to make
dired/wdired play nicely with an arbitrary list of files and folders, including
a recursive list. I asked for some help on emacs.stackexchange.com to
implement these new approaches, and used the answers by @Drew, @Tobias and
@Andreas Röhler. Citations to their answers are included in the
draft/proof-concept patch. I would need some help regarding how to update the
dired-directory variable when deleting a file in a regular dired-mode buffer,
and I have added a FIXME notation in the likely spot of `dired.el` -- the
approach would be similar to renaming a file (already implemented in the
attached draft patch), but is a bit more complicated due to potential recursive
deletions.
The file-name-nondirectory components in wdired-mode now have read-only
attributes so that a user no longer erroneously believes that he/she can modify
them, and only latter see an error message when trying to commit the changes:
file-error Renaming No such file or directory ....
I have only done some basic renaming of files and directories in wdired mode
using both `find-name-dired` and `dired-list-files-folders' to populate the
dired- buffer. I did not spend any time implementing hash-tables to speed up
the modification of the dired-directory variable, as that would likely involve
modifying a few or more aspects of dired-mode.
Thanks,
Keith
patch.diff
Description: application/diff