Recoverable "rm" blunders via eshell and system trash (link in comments) reddit / emacs ---------------------------------------------------------------------- xenodium · 2022-09-17 19:09 ---------------------------------------------------------------------- xenodium · 2022-09-17 19:13 Use `trash-directory` and `system-move-file-to-trash` for it https://xenodium.com/rm-important-txt-oh-sht ---------------------------------------------------------------------- funk443 · 2022-09-18 11:27 Nice work ---------------------------------------------------------------------- xenodium · 2022-09-19 13:11 Thanks =) ---------------------------------------------------------------------- fuzzbomb23 · 2022-09-19 19:15 The [osx-trash](https://melpa.org/#/osx-trash) package also implements a `system-mode-file-to-trash` function. By default, it uses Applescript to tell the Finder to trash the file, so it doesn't depend on a third-party `trash` executable being installed. The command is configurable, so you can use a `trash` executable if you like. ---------------------------------------------------------------------- xenodium · 2022-09-19 20:39 Ah neat. Thanks. Was not aware of it. I suppose we still need to choose a third party to install (melpa package vs brew install). >The command is configurable, so you can use a trash executable if you like. Maybe that's the way to go. I just read this from the README: By default an AppleScript helper is used to actually trash the file using the finder, but that is slow, so you might want to customize option `osx-trash-command' to use a faster command. Either way, nice to know of alternatives. Thank you. ---------------------------------------------------------------------- fuzzbomb23 · 2022-09-19 21:53 I've been using that default Applescript helper, and I haven't noticed the slowness mentioned. FWIW I have a Mac Mini 2016 (i5 chip), which is some way down the Mac performance ladder these days.