branch: externals/denote
commit c4d76bdd552ac2795176866f5cca5075cc814683
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

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

diff --git a/denote.el b/denote.el
index 1fa8ae5dc4..edd3790f72 100644
--- a/denote.el
+++ b/denote.el
@@ -437,6 +437,10 @@ trailing hyphen."
                          file-name)
          (not (string-match-p "[#~]\\'" file)))))
 
+(defun denote--file-supported-extension-p (file)
+  "Return non-nil if FILE has supported extension."
+  (string-match-p (format "%s\\(.gpg\\)?\\'" denote--extension-regexp) file))
+
 (defun denote--file-name-relative-to-denote-directory (file)
   "Return file name of FILE relative to the variable `denote-directory'.
 FILE must be an absolute path."

Reply via email to