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

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

[elpa] externals/denote a7b51fe041 4/5: Refactor denote--only-note-p and


From: ELPA Syncer
Subject: [elpa] externals/denote a7b51fe041 4/5: Refactor denote--only-note-p and remove denote--extension-regexp
Date: Mon, 15 Aug 2022 02:57:33 -0400 (EDT)

branch: externals/denote
commit a7b51fe041c978fc071e85ab5bb14ff4f8211e9d
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>

    Refactor denote--only-note-p and remove denote--extension-regexp
---
 denote.el | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/denote.el b/denote.el
index 2918edf9a5..af1fe54450 100644
--- a/denote.el
+++ b/denote.el
@@ -355,9 +355,6 @@ command."
 (defconst denote--keywords-regexp "__\\([[:alnum:][:nonascii:]_-]*\\)"
   "Regular expression to match keywords.")
 
-(defconst denote--extension-regexp "\\.\\(org\\|md\\|txt\\)"
-  "Regular expression to match supported Denote extensions.")
-
 (defconst denote--punctuation-regexp "[][{}!@#$%^&*()=+'\"?,.\|;:~`‘’“”/]*"
   "Punctionation that is removed from file names.
 We consider those characters illegal for our purposes.")
@@ -439,11 +436,8 @@ trailing hyphen."
     (and (not (file-directory-p file))
          (file-regular-p file)
          (string-prefix-p (denote-directory) (expand-file-name file))
-         (string-match-p (concat "\\`" denote--id-regexp
-                                 ".*" denote--extension-regexp
-                                 "\\(.gpg\\)?"
-                                 "\\'")
-                         file-name))))
+         (string-match-p (concat "\\`" denote--id-regexp) file-name)
+         (denote--file-supported-extension-p file))))
 
 (defun denote--file-has-identifier-p (file)
   "Return non-nil if FILE has a Denote identifier."



reply via email to

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