added previous command for journal
finds the last made journal entry via journal file names for both the flat and nested filename strategies
Attempts to resolve #1727 (and useful for myself as well 😁)
I barely have any clue what I'm doing, tried to mostly base it on the way toc was written. There might be more optimal approaches for something like this.
Open to feedback on improving it as required!
It would also be nice to have :Neorg journal next to go with this. It would have to be relative to the currently open journal entry for this to work.
It would also be nice to have
:Neorg journal nextto go with this. It would have to be relative to the currently open journal entry for this to work.
Well, those are two different kinds of functionality. Going previous and next relative to a current note is different from going to the last recorded journal entry (which doesn't have a direct "next" counterpart).
Open to suggestions on whether we need these to be specific commands. It shouldn't be particularly hard, just have to use the custom date function, get the current file's path if it's a journal entry, get the relevant recorded notes before and after the current date from the file path, similar to how it's being fetched right now.
What would be better names? Maybe Neorg journal before and after? And previous can become last?
There's also the additional concern of whether we're polluting an API intended to potentially be lean with such wrapper commands, but that's up to the maintainers to comment on, which presumably they will when reviewing this PR. If it's worth adding, I'd gladly do so! 😁