Skip to content

Conversation

@ThatAmuzak
Copy link

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!

finds the last made journal entry via journal file names for both the
flat and nested filename strategies
@mlysle
Copy link
Contributor

mlysle commented Nov 24, 2025

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.

@ThatAmuzak
Copy link
Author

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.

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! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

:Neorg journal previous

2 participants