Skip to content

Workspace-wide queries for tags, todos, etc.Β #1601

Open
@sofubi

Description

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Feature description

As I grow my notes workspace over time I'm finding that I'd like to be able to have some queries on my main index.norg for easy access to things like tags and todos.

I've looked through the open issues as well as the roadmap and haven't found much in the way of this so I'd like to propose a feature. Maybe something like the following example:

@query
select name from tags
for each tag from tags
- {tag}
end
@end

The above code would render a list of folded headings that each contain a list of links to files tagged:

* Tags
** sql
  - {$:link_to_file.norg:}[file]
** lua
  - {$:link_to_other_file.norg:}[other_file]

I realize that as a flat file structure this really necessitates something like SQLite or otherwise. I saw that there was something on the roadmap concerning db interfaces and Neorg so maybe this is part of that? It's always possible too to create a SQLite db that keeps track of only metadata objects and is portable, ideally maintaining flat files while gaining search/query functionality.

Inspiration for this mainly comes from Obsidian queries which I've used in the past and enjoyed. Porting this functionality to Neorg would be ideal as using Obsidian feels cumbersome and it's not the easiest to manage (imo, ymmv).

I'm happy to lend a hand on this if possible but I wanted to raise the issue here in case something is being discussed or considered.

Help

Yes

Implementation help

A discussion concerning the merits of the feature and any prior discussion surrounding it should be had. Otherwise I'm pretty comfortable implementing feature work and asking questions as needed.

Metadata

Assignees

No one assigned

    Labels

    featureIssues related to feature proposals. Please attach a module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions