Just a few commits to make the code more robust and fix some bugs I discovered:
denote--directory-get-files would consider a directory "20240505T010101/"
as a valid note.
Renaming a file if denote-file-types is nil would throw an error. In
general, we cannot assume that the file-type is non-nil as
denote-file-types may be nil.
As discussed in #284, I have reviewed denote-filetype-heuristics and we
should not return org when the file type is not found. We should just
return nil. I checked all the places it is used and made sure it was okay
to do so. #284 can be closed.
Most of the time, we don't actually need to use denote-file-is-note-p and
instead should use denote-filename-is-note-p. This will help when a user
wants to rename a new note that has not yet been saved, for example. This is
not yet fully supported, but this pull request is an improvement. I have
reviewed the impact of this in the places I have made the change.
Just a few commits to make the code more robust and fix some bugs I discovered:
denote--directory-get-files
would consider a directory "20240505T010101/" as a valid note.Renaming a file if
denote-file-types
is nil would throw an error. In general, we cannot assume that the file-type is non-nil asdenote-file-types
may be nil.As discussed in #284, I have reviewed
denote-filetype-heuristics
and we should not returnorg
when the file type is not found. We should just returnnil
. I checked all the places it is used and made sure it was okay to do so. #284 can be closed.Most of the time, we don't actually need to use
denote-file-is-note-p
and instead should usedenote-filename-is-note-p
. This will help when a user wants to rename a new note that has not yet been saved, for example. This is not yet fully supported, but this pull request is an improvement. I have reviewed the impact of this in the places I have made the change.