[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 2aaf0f56d1 05/27: Add regexp to match only note
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 2aaf0f56d1 05/27: Add regexp to match only note file names |
Date: |
Sun, 3 Jul 2022 00:57:34 -0400 (EDT) |
branch: externals/denote
commit 2aaf0f56d1bb415c9ba2fa9dc0bae705ac34df02
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add regexp to match only note file names
---
denote.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/denote.el b/denote.el
index c31b673c58..9c4abb2f55 100644
--- a/denote.el
+++ b/denote.el
@@ -227,6 +227,10 @@ is suspended: we use whatever the user wants."
(concat denote--file-title-regexp "\\([0-9A-Za-z_-]*\\)\\(\\.?.*\\)")
"Regular expression to match the entire file name'.")
+(defconst denote--file-only-note-regexp
+ (concat denote--file-regexp "\\.\\(org\\|md\\|txt\\)")
+ "Regular expression to match the entire file name of a note file.")
+
(defconst denote--punctuation-regexp "[][{}!@#$%^&*()_=+'\"?,.\|;:~`‘’“”/]*"
"Regular expression of punctionation that should be removed.
We consider those characters illigal for our purposes.")
@@ -307,7 +311,7 @@ trailing hyphen."
FILE is relative to the variable `denote-directory'."
(and (not (file-directory-p file))
(file-regular-p file)
- (string-match-p (concat "\\b" denote--id-regexp) file)
+ (string-match-p denote--file-only-note-regexp file)
(not (string-match-p "[#~]\\'" file))))
(defun denote--file-name-relative-to-denote-directory (file)
- [elpa] externals/denote 123fb2b670 18/27: Put all faces in denote-faces.el, (continued)
- [elpa] externals/denote 123fb2b670 18/27: Put all faces in denote-faces.el, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 66e455ef84 14/27: Fix denote--current-file-is-note-p for subdirectories, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 6dfb9376ca 24/27: Merge pull request #28 from ggjp/subdir-support, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 25e86bf0bc 27/27: Update Acknowledgements in the manual, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 303f39e150 15/27: Merge pull request #26 from ggjp/subdir-support, ELPA Syncer, 2022/07/03
- [elpa] externals/denote c020d25a21 08/27: Fix denote-link--ol-resolve-link-to-target, ELPA Syncer, 2022/07/03
- [elpa] externals/denote ab2a6e538a 03/27: Use 'when' instead of 'if' for single condition, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 0116edc2f8 25/27: Remove sharp quote from lambda for simplicity, ELPA Syncer, 2022/07/03
- [elpa] externals/denote c68a8e224a 17/27: Tweak denote--get-note-path-by-id for style, ELPA Syncer, 2022/07/03
- [elpa] externals/denote d2f14291bf 06/27: Move let bound filter into its own function, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 2aaf0f56d1 05/27: Add regexp to match only note file names,
ELPA Syncer <=
- [elpa] externals/denote 3934b167d2 16/27: Placate the compiler for minor warnings, ELPA Syncer, 2022/07/03
- [elpa] externals/denote fa395f7aef 02/27: Update Acknowledgements for subdir support, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 554859c0c8 21/27: Keep Acknowledgements up-to-date after eb7b38f, ELPA Syncer, 2022/07/03
- [elpa] externals/denote eb7b38fe16 20/27: Merge branch 'main' into subdir-support, ELPA Syncer, 2022/07/03
- [elpa] externals/denote eb3ea19637 10/27: Document subdir support as part of dev version, ELPA Syncer, 2022/07/03
- [elpa] externals/denote ce791f5e42 26/27: Keep filename intact for backlink creation, ELPA Syncer, 2022/07/03