Closed icaruszhu closed 3 years ago
Heh, "To Deft or NotDeft."
I didn't even know that Emacs had some support for using the system recycle bin. Thank you for pointing that out.
I wouldn't want files ending up in the bin by default, unexpectedly, but
I see that there's already an option for controlling that with
delete-by-moving-to-trash', which you mention. Apparently other interactive commands (e.g.,
delete-file' and Dired ones) also honor
that option, so you're right in that it probably also makes sense for
`notdeft-delete-file' to do that.
I've merged your change.
Very many thanks, Tero!
Dear Tero,
First, thank you so much for the wonderful package, which I have been using for over half a year now. NotDeft is very fast and reliable, and I am so happy to chance upon it! :smile: (https://icaruszhu.github.io/chen/2020/09/20/To-Deft-or-NotDeft/)
However, very recently, I deleted a deft note (using
C-c C-d
) by mistake. To my dismay, I could not retrieve it from the recycle bin. (BTW,I am using Ubuntu Studio 20.04 XFCE, and the recycle bin is called "Wastebasket") .I looked at the elisp source file
notdeft.el
and found the functionnotdeft-delete-file
used(delete-file old-file)
without an optionalTRASH
argument. So I simply addt
, which will move the deleted note to a recycle bin.Would you consider this pull request? I guess this tiny change might be useful for other NotDeft users (just in case they delete a file by mistake). Thank you again!
==== p.s. I also have
(setq delete-by-moving-to-trash t)
in myinit.el
.