Small fixes, denote-rename-file-using-front-matter
and signature line only when there is a value
#484
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this pull request:
denote-front-matter-components-present-even-if-empty-value
defaulting to
'(title keywords date identifier)
. The signature isnot included so things should keep working as before for users.
Fixed smalls issues in
denote--get-file-components-for-rewrite
anddenote-rewrite-front-matter
.Moved the backlinks check in
denote--rename-file
.Refactored
denote-rename-file-using-front-matter
. It was nothandling all front matter components. Though it was a general issue,
I think you noticed it when trying to integrate
markdown-obsidian
.It should work now. Check its docstring!
markdown-obsidian
I have seen your obsidian branch. I have two small comments:
1- The
denote-*-key-regexp
should not be empty strings for themissing components, or else it will match. The default value ensures
that there is no match.
2-
#'identity
is not a suitable function for thedenote-keywords-value-function
anddenote-date-value-function
. Thereason is that the functions should take a list or a date object as
input and return a string for the front matter.
#'identity
does notdo that. I know I gave this example in a previous comment. I realized
it was not valid when I tried to give them default values. It may work
anyway because there is no date or keywords in the front matter
template.
So, a correct definition would be: