Open swflint opened 7 hours ago
Perhaps the following code would work better?
(defun denote-journal-extras--filename-date-regexp (&optional date)
"Regular expression to match journal entries for today or optional DATE.
DATE has the same format as that returned by `denote-valid-date-p'."
(let* ((identifier (format "%sT[0-9]\\{6\\}" (format-time-string "%Y%m%d" date))))
(concat (if (or (null denote-journal-extras-directory) (string= denote-journal-extras-directory denote-directory))
"^"
(format "^%s/" (file-relative-name denote-journal-extras-directory denote-directory)))
identifier
"--.*__?.*"
(denote-journal-extras--keyword-regex))))
The implementation of
denote-journal-extras--filename-date-regexp
is faulty. By using the start-of-line anchor (^
) it fails to detect journal files if kept in adenote-journal-extras-directory
which is notdenote-directory
.