emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote 387ac0c030 033/355: Add denote--file-empty-p


From: ELPA Syncer
Subject: [elpa] externals/denote 387ac0c030 033/355: Add denote--file-empty-p
Date: Sun, 26 Jun 2022 23:57:57 -0400 (EDT)

branch: externals/denote
commit 387ac0c030ff39922c219308b14b2114628bb463
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Add denote--file-empty-p
---
 denote.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/denote.el b/denote.el
index 311149c04b..71ddc9486d 100644
--- a/denote.el
+++ b/denote.el
@@ -139,6 +139,10 @@ trailing hyphen."
   "Make STR an appropriate file name slug."
   (downcase (denote--slug-hyphenate (denote--slug-no-punct str))))
 
+(defun denote--file-empty-p (file)
+  "Return non-nil if FILE is empty."
+  (zerop (or (file-attribute-size (file-attributes file)) 0)))
+
 ;;;; Keywords
 
 (defun denote--directory-files ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]