In this PR, I have addressed your comment in my previous PR and introduced a
few more cleanups.
The changes will help with resolving #279 to allow renaming new notes that are still
unsaved.
I also added checks to creation and renaming commands to avoid creating a note
if the file already exists. This is not a concern for now because the id is
unique and part of the file name, but we may want to make it optional
eventually.
Just a comment regarding your last commit: The change is not only stylistic:
re-search-forward behave differently whether NOERROR is t or any other
non-nil value such as :no-error. Check its docstring. I have discovered this
myself as well while working on the upcoming new fontification. Same thing
with completing-read: t and :require-match do not have the same
behaviors.
I have reverted your commit myself as it could conflict with a change I needed
to make to address one of your comment on my previous pull request.
In this PR, I have addressed your comment in my previous PR and introduced a few more cleanups.
The changes will help with resolving #279 to allow renaming new notes that are still unsaved.
I also added checks to creation and renaming commands to avoid creating a note if the file already exists. This is not a concern for now because the id is unique and part of the file name, but we may want to make it optional eventually.
Just a comment regarding your last commit: The change is not only stylistic:
re-search-forward
behave differently whetherNOERROR
ist
or any other non-nil value such as:no-error
. Check its docstring. I have discovered this myself as well while working on the upcoming new fontification. Same thing withcompleting-read
:t
and:require-match
do not have the same behaviors.I have reverted your commit myself as it could conflict with a change I needed to make to address one of your comment on my previous pull request.