The 6th argument to read-file-name is a PREDICATE that filters completion candidates (file names). C-h f read-file-name says, about it:
Sixth arg PREDICATE, if non-nil, should be a function of one
argument; then a file name is considered an acceptable completion
alternative only if PREDICATE returns non-nil with the file name
as its argument.
You can use D (command dired-do-delete) to delete all marked files and subdirectories in the current Dired listing
You can use M-+ D (command diredp-do-delete-recursive) to delete all marked files and subdirectories, found recursively. (This one is Dired+ only).
User option dired-recursive-deletes controls whether deletion of
The noccur package makes it easier to edit multiple (not-necessarily opened) files with multi-occur. After installing, this is an example of how to do a multi-occur edit:
M-x noccur-project, and provide a search regexp and directory to be searched.
In the multi-occur buffer that appears, type e to switch to edit mode.
Make any changes to the multi-occur ...
Here's the function I use, which you can bind to a keybinding. The link to the original author of the function is also provided.
(defun cpm/show-and-copy-buffer-filename ()
"Show the full path to the current file in the minibuffer and copy to clipboard."
(let ((file-name (...