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

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

[elpa] externals/denote d0584c0e15 271/355: Refine denote--only-note-p c


From: ELPA Syncer
Subject: [elpa] externals/denote d0584c0e15 271/355: Refine denote--only-note-p conditions
Date: Sun, 26 Jun 2022 23:58:32 -0400 (EDT)

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

    Refine denote--only-note-p conditions
    
    This should remove the false positives reported by Sven Seebeck in issue
    16 over at the GitHub mirror:
    <https://github.com/protesilaos/denote/issues/16>.
    
    It also eliminates the potential problem with the use of "^" against
    full paths, where it would always fail.
---
 denote.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/denote.el b/denote.el
index 4d19d9e098..476bf22ac8 100644
--- a/denote.el
+++ b/denote.el
@@ -296,8 +296,8 @@ trailing hyphen."
 FILE is relative to the variable `denote-directory'."
   (and (not (file-directory-p file))
        (file-regular-p file)
-       (string-match-p (concat "^" denote--id-regexp) file)
-       (not (string-match-p "~\\'" file))))
+       (string-match-p (concat "\\b" denote--id-regexp) file)
+       (not (string-match-p "[#~]\\'" file))))
 
 ;;;; Keywords
 



reply via email to

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