Closed Kolmas225 closed 4 months ago
Mea culpa! I fixed it now. We still need some way to handle this case, but not for file-creating notes. Perhaps by adding a new parameter to the denote-directory-files
...
I am not sure what case you want to handle here? I see you made developments to denote-org-extras-link-to-heading
. Is this related to this?
In any case, I don't think it is a good idea to add a parameter to denote-directory-files
. The function returns the files that it finds. If there are none, then an empty list is returned. This is as expected and it is not wrong. Now, if some caller (maybe denote-org-extras-link-to-heading
?) wants to do something special in this case, then it is probably there that it should be handled.
From: Jean-Philippe Gagné Guay @.***> Date: Sat, 11 May 2024 08:28:40 -0700
In any case, I don't think it is a good idea to add a parameter to
denote-directory-files
. The function returns the files that it finds. If there are none, then an empty list is returned. This is as expected and it is not wrong. Now, if some caller (maybedenote-org-extras-link-to-heading
?) wants to do something special in this case, then it is probably there that it should be handled.
Yes, this was my follow-up thought. Indeed, the caller has to handle this.
-- Protesilaos Stavrou https://protesilaos.com
If there isn't at least 1 file in denote naming format in the
denote-directory
, then calling denote functions (e.g.denote
,denote-rename-file
) anywhere will error withdenote-directory-files: The ‘denote-directory’ has no files
and blocking the creation/renaming process.Possibly introduced by 3badc7f2e873ad5b683ec79036363c2450c598f3