branch: externals/denote commit 0dc01629334963fdd987a46e64a0a4774cd81b8e Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Simplify denote-file-is-note-p --- README.org | 7 ++----- denote.el | 8 +++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/README.org b/README.org index fba881e381..962fd3a2cd 100644 --- a/README.org +++ b/README.org @@ -4145,11 +4145,8 @@ might change them without further notice. #+findex: denote-file-is-note-p + Function ~denote-file-is-note-p~ :: Return non-nil if =FILE= is an - actual Denote note. For our purposes, a note must not be a - directory, must satisfy ~file-regular-p~, its path must be part of - the variable ~denote-directory~, it must have a Denote identifier in - its name, and use one of the extensions implied by - ~denote-file-type~. + actual Denote note. For our purposes, a note must satisfy + ~file-regular-p~ and ~denote-filename-is-note-p~. #+findex: denote-file-has-identifier-p + Function ~denote-file-has-identifier-p~ :: Return non-nil if =FILE= diff --git a/denote.el b/denote.el index bc69b4ce82..20a5ba15db 100644 --- a/denote.el +++ b/denote.el @@ -939,11 +939,9 @@ and use one of the extensions implied by `denote-file-type'." (defun denote-file-is-note-p (file) "Return non-nil if FILE is an actual Denote note. -For our purposes, a note must not be a directory, must satisfy -`file-regular-p' and `denote-filename-is-note-p'." - (and (not (file-directory-p file)) - (file-regular-p file) - (denote-filename-is-note-p file))) +For our purposes, a note must satisfy `file-regular-p' and +`denote-filename-is-note-p'." + (and (file-regular-p file) (denote-filename-is-note-p file))) (defun denote-file-has-signature-p (file) "Return non-nil if FILE has a Denote identifier."