Sometimes, when I decide to remove a link, I also need to remove the local file it is pointing at. Would it be at all possible for me to remove both using a single command, say, `org-remove-link-and-trash-linked-file`? For a safety measure, I'd rather use `move-file-to-trash` than to actually delete the associated file.
I already have this function to trash the current file, which works on my system (Linux Manjaro):
(defun my-move-to-trash ()
(interactive)
(if (y-or-n-p "Trash this file?")
(progn
(setq this-buffer buffer-file-truename)
(move-file-to-trash (buffer-file-name))
(kill-current-buffer)
(message "%s was trashed" this-buffer))) nil))
Thanks!