As a developer pointed out once, namespaces are meant to disambiguate two different pages that otherwise would have the same name (just like namespaces in some programming languages)
If you think of them that way there are valid use cases like the ones I mentioned in this thread:
Instead to organize things hierarchically there are better alternatives and indented blocks is one of them. When it comes to pages, the concept of indexes that I described later in that thread is the best one to organize pages hierarchically, in my opinion
I looked at the page you linked to, and boy there is some impressive stuff in there. I have no database background and am a Logseq newbie so a lot of the stuff discussed there is a bit beyond me.
We may see some interesting developments in Logseq yet.
Namespaces are useful for keeping the same name apart if used in different contexts. Think about “apple”, which could be a fruit, a company etc.
So you can use a namespace “companies/apple”, “fruits/apple” to keep them separate.
A programming example would be if you have multiple functions named “print”, you could keep them apart by namespaces “std::print”, or “myLibrary::print”.
That doesn’t imply a taxonomy (a system for organizing things into different categories), it is just to keep the names apart. More details in my other answer above.
Unfortunately the two concepts get mixed up in Logseq, which causes a lot of confusion.
Thank you. I still have a lot to learn. I guess I won’t be confronted with the issue because I always try to use unique page names. To take the apple example, I would call 1 of the 2 pages Apple-company and the other Apple-fruit, so a search for apple would yield 2 results.
As for taxonomy, I am reading a non-fiction book and making notes with the built-in PDF viewer. I made a 1st page with some early notes that set the scene.
After that I make a page for each chapter or group of chapters that deals with a specific issue. In the page properties I have a property called parent, and I put a link to the parent there. In the parent properties I have a property called children where I have put a link to each of the children, all of which have their own unique name.
Being a newbie, I am not sure if this is a reply that is relevant to your comment. If it is not, I apologize.
I’m still on the fence for one of my namespaces. I have notes for DnD (Dungeons & Dragons)
I had a very involved namespace for it, but made it a little bit more manageable by changing DnD/campaign name to DnD campaign name.
However for one campaign I ran I moved my Google docs to Logseq 1 to 1. There’s a lot of files and my hierarchy now looks like this:
There are a couple of good reasons to use real namespaces instead of unique names
A namespace tells you what the namespace, and what the name is. Is Apple-fruit in namespace “fruit”, or is “Apple-fruit” some common name? What about “Mary-Jane”?
you can use search functionality to query namespaces (see also other answers from @Siferiax ), Logseq doesn’t know that “Apple-fruit” is a fruit.
one might be required to use certain names for compatibility with other users (e.g. courts use naming conventions like “Exhibit A”)
two people might have picked the same name, and you want to merge the graphs
print is a name of the function, and it wouldn’t be a good idea to rename it everywhere to print_std)
if you have a given taxonomy, you wouldn’t want to rename the individual groups to avoid conflicts with your own preexisting tags. E.g. you decide to classify animals. A housecat would be under Animalia > Chordata > Mammalia > Carnivora > Feliformia > Felidae> Felinae > Felis > F. catus. (I am using “>” to show that we are not talking about the namespace operator “/” in Logseq.
But what if you already have a page “Felidae” (for the movie)?. You could rename “Felidae” into “Felidae-animal-kingdom”, but now you are not using the established naming scheme for animals, but your own. This will cause confusion. So instead, you create a page for each group in its own namespace AnimalTaxonomy/Animalia … AnimalTaxonomy/F. catus. Then each page gets a property that tells which parents (one or more) it has.
If you use namespaces, you get some syntax checking when you enter the names. Otherwise it’s really easy to accidentally end up with lot’s of synonyms, like Apple-company, Apple-business, Apple-corporation, Apple-corp etc.
You can rename namespaces in bulk (still needs a script, but hopefully will eventually be part of a tag management UI)
Thanks for your detailed reply. I’ll check out those posts.
Your points make a lot of sense but many/most are not applicable to me: I am a home user and the only one to use Logseq. But then again …… never say never
This makes me think: if Logseq will get templates of properties based on tags like Tana, namespaces could be used to chain templates like Tana’s inheritance between its supertags™. For example:
- Alice #person
birthday::
- Bob #person/author
birthday::
books::
- Charlie #person/actor
birthday::
movies::
I use namespace in only one scenario : months of a year. (I’m used to follow track of time with something similar to bullet journal methodology)
2023
2023/01-Jan
2023/02-Feb
Year’s page will contain events of the “future”. When a new month starts, I move the bullets on the newly created month’s page.
As said in this discussion, namespace helps to make 2 pages with “same name” unique.
With this convention, I can have monthly pages of a year nicely sorted at the bottom of page 2023.
I can also use the same naming convention for months of next year, as namespace guarantees unique page name (2023/01-Jan <> 2024/01-Jan).
Lol I do the exact same thing for the exact same reason!
Though my year page only contains year related info (like a year theme) as I’ve never really been one to use a future log.
I started using Namespaces in Logseq when I began using the app back in February as a way to have an overview of all my topics/pages and I have created a common root namespace (I’ve seen others use a "/My/"), then create from there (ex: /my/projects/prjectx/client1/...). I’ve learned that Namespaces can be very lengthy, sometimes 10 level deep, and using such page names inline with your text is not usable so one must use the Markdown Link Syntax to have some shorter description (ex: Had a meeting with [John]( [[/my/projects/projectx/client1/Australia/John]] )), resulting in a text that is free of long namespaces and ugly formatting (“Had a meeting with John”) . Now the text looks ok and one can infer from other elements which “John” I am talking about (the rest of the description of my meeting with John, the time - I am probably having a single John during this time-, etc and, if not convinced, can hover the Logseq-Link and the popup will shed some light on the matter. It’s not that easy when you have to share notes with non-Logseq users though, but I won’t go into that rabbit hole here.
My relationship with namespaces has fallen a bit (even if I am still using them for the bird-view they offer) in favor of doing some simple tagging that, when combined in queries, gives the results I want. If I search for “cousin” and “Germany” I will get the information I need without having a Family Tree.
PS: I wish I could do quick queries in the CTRL+K - Search menu.
I also do some form of “shortening” the long namespaces and, even though I would create the following namespace: /my/financials/investments/company/Apple, in reality a tag like #Investments@Apple can convey the same amount of information in a much shorter way.
I believe I am quite far away from understanding how to correctly and productively use namespaces and sometimes I find I make a mess of everything but reading your answers here and elsewhere is insightful.