Use denote--file-empty-p

Added in commit 387ac0c.
This commit is contained in:
Protesilaos Stavrou 2022-06-06 14:15:19 +03:00
parent 387ac0c030
commit 991abe5b65
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -68,7 +68,7 @@ sample template. We will eventually have a manual."
(defun denote-org-capture-delete-empty-file ()
"Delete file if capture with `denote-org-capture' is aborted."
(when-let* ((file denote-last-path)
((zerop (or (file-attribute-size (file-attributes file)) 0))))
((denote--file-empty-p file)))
(delete-file denote-last-path)))
;; Samples of an `org-capture-templates' entry: