summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2024-10-30 08:23:10 -0400
committerSacha Chua <sacha@sachachua.com>2024-10-30 08:23:10 -0400
commitf2012e51e393d89cd3a49d2eeabc38f41876bb6d (patch)
tree044c28b1da3f47caa32c2ae2bfe65eb022c25fab
parentfea0b2d486c4dc8735fceaa2b2d1380879ddbf81 (diff)
downloademacsconf-el-f2012e51e393d89cd3a49d2eeabc38f41876bb6d.tar.xz
emacsconf-el-f2012e51e393d89cd3a49d2eeabc38f41876bb6d.zip
add emacsconf-delete-from-all
-rw-r--r--emacsconf.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/emacsconf.el b/emacsconf.el
index 1e9ddcf..551031c 100644
--- a/emacsconf.el
+++ b/emacsconf.el
@@ -1876,5 +1876,19 @@ tracks with the ID in the cdr of that list."
(concat "ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "
(shell-quote-argument (expand-file-name filename)))))))
+(defun emacsconf-delete-from-all (files)
+ "Delete FILES from all the directories."
+ (interactive (list (dired-get-marked-files)))
+ (dolist (dir (list emacsconf-cache-dir emacsconf-backstage-dir
+ (expand-file-name "cache" emacsconf-res-dir)
+ emacsconf-public-media-directory))
+ (dolist (file files)
+ (when (and dir (file-exists-p (expand-file-name (file-name-nondirectory file)
+ dir)))
+ (delete-file (expand-file-name (file-name-nondirectory file)
+ dir))
+ (message "Deleting %s from %s"
+ (file-name-nondirectory file) dir)))))
+
(provide 'emacsconf)
;;; emacsconf.el ends here