I followed the advice of “just start writing” when I was starting out. Over time, as I learned more, my ideas about tagging and use of properties has changed. I want to use a consistent tagging and properties structure, but my existing notes don’t currently have that. I have a lot of tags and property keys that I am no longer using, and notes that are improperly notated.
What is your workflow for cleaning up the mess you created when getting started?
The empty files miss files with totally empty, it do detects ones that have only “-” in the begining (which appears empty in logseq)
I will add another usefull query for me - for those who have page conflicts via OneDrive - which create another file with “-PC{SomeNumber}” under the hood (in my company, every pc has the nane PC{SomeNumber}…
so this query surface that I need to handle this conflict myself…
Yes true. The only thing you’re missing is empty files (leftover as it were) that are still referenced somewhere in your graph.
If they’re not referenced, then through all pages => three dots menu => remove orphaned pages, Logseq can delete them for you.
Trying to explain to datalog what an empty file is, is a bit difficult.
We have to say ok it is a page without blocks. But (not [?b :block/page ?p]) results in basically all your graph’s pages, as there is always a block in your graph that’s not on that page.
So we would have to pose the question “of all the blocks in my graph which pages have none of them”. And that is probably a performance nightmare. Though I haven’t tried to build it.
Edit: see comment below. I misunderstood the purpose of the Empty Files query.
As given, the empty files query includes pages that have linked references to them.
To exclude empty pages that have linked references, just add (not [?refs :block/refs ?p]):
In light of @Siferiax’s clarification, here’s something that might be more useful than what I had previously posted. Adaptation of the orphan pages query that finds empty files that are also orphan pages:
The query is about empty files, and not unused pages. Those are two different things.
The use case for this query is finding files for which the page is empty, but still in use. If we wish to manually delete those files.
In all other cases, we can check by removing orphaned pages. Having a query to find orphaned pages might be useful though. But we would adjust the query to not care whether a page has a file specifically.