mirror of
https://github.com/protesilaos/denote.git
synced 2026-09-10 07:16:20 -04:00
Merge pull request #708 from segv/main
denote-open-or-create errors in directories with oddly-named files (#707)
This commit is contained in:
commit
197b0acd38
15
denote.el
15
denote.el
|
|
@ -906,16 +906,16 @@ The note's ID is derived from the date and time of its creation.")
|
|||
(defconst denote-date-identifier-regexp "\\([0-9]\\{8\\}\\)\\(T[0-9]\\{6\\}\\)"
|
||||
"Regular expression to match `denote-date-identifier-format'.")
|
||||
|
||||
(defconst denote-identifier-regexp "@@\\([^.]*?\\)\\(==.*\\|--.*\\|__.*\\|@@.*\\|\\..*\\)*$"
|
||||
(defconst denote-identifier-regexp "@@\\([^.]+?\\)\\(==.*\\|--.*\\|__.*\\|@@.*\\|\\..*\\)*$"
|
||||
"Regular expression to match the IDENTIFIER field in a file name.")
|
||||
|
||||
(defconst denote-signature-regexp "==\\([^.]*?\\)\\(==.*\\|--.*\\|__.*\\|@@.*\\|\\..*\\)*$"
|
||||
(defconst denote-signature-regexp "==\\([^.]+?\\)\\(==.*\\|--.*\\|__.*\\|@@.*\\|\\..*\\)*$"
|
||||
"Regular expression to match the SIGNATURE field in a file name.")
|
||||
|
||||
(defconst denote-title-regexp "--\\([^.]*?\\)\\(==.*\\|__.*\\|@@.*\\|\\..*\\)*$"
|
||||
(defconst denote-title-regexp "--\\([^.]+?\\)\\(==.*\\|__.*\\|@@.*\\|\\..*\\)*$"
|
||||
"Regular expression to match the TITLE field in a file name.")
|
||||
|
||||
(defconst denote-keywords-regexp "__\\([^.]*?\\)\\(==.*\\|--.*\\|__.*\\|@@.*\\|\\..*\\)*$"
|
||||
(defconst denote-keywords-regexp "__\\([^.]+?\\)\\(==.*\\|--.*\\|__.*\\|@@.*\\|\\..*\\)*$"
|
||||
"Regular expression to match the KEYWORDS field in a file name.")
|
||||
|
||||
(make-obsolete-variable
|
||||
|
|
@ -1492,10 +1492,9 @@ there.")
|
|||
|
||||
(defun denote-file-prompt--format-identifier (file)
|
||||
"Return identifier of FILE for `denote-file-prompt-affixate'."
|
||||
(let* ((identifier (denote-retrieve-filename-identifier file))
|
||||
(date-or-id (or (ignore-errors (denote-id-to-date identifier)) identifier))
|
||||
(propertized (propertize date-or-id 'face 'completions-annotations)))
|
||||
(format "%s " propertized)))
|
||||
(when-let* ((identifier (denote-retrieve-filename-identifier file))
|
||||
(date-or-id (or (ignore-errors (denote-id-to-date identifier)) identifier)))
|
||||
(format "%s " (propertize date-or-id 'face 'completions-annotations))))
|
||||
|
||||
(defun denote-file-prompt--format-keywords-and-signature (file)
|
||||
"Return keywords and signature of FILE for `denote-file-prompt-affixate'."
|
||||
|
|
|
|||
Loading…
Reference in a new issue