How do you handle nodes with the same title? Sometimes it can be very clunky to come up with a unique title, for example if have a similar sort of structure within multiple locations of my network. I have to resort to some sort of prefix like SPECIFIC_TOPIC, then the rest of the title. But this just feels like it is re creating folders, which I do not want to do. I know this is definitely possible, because org-roam actually uses IDs for links and not titles, but how would you do it in practice?
I think maybe, if I could select between multiple nodes with the same title in org-roam-node-find? Perhaps if there was some context that shows some of the node content, so I know which one it is. Or if there was a :context: field in org properties, that displayed in brackets after title. (I know I could just add context in brackets after the title, and then I could stop the brackets displaying when linking those nodes, but it’s breaks my flow to immediately have to think about things not relevant to the node itself like that).
Maybe I want an ability to encapsulate some nodes to different contexts? Maybe an option to exclude certain notes from org-roam-node-find might work?
You can add a custom property (:context:) and show it on the minibuffer, too, but I would try to stick to available options such as these above.
“Encapsulation” can be achieved by passing a filter function to node-find. Some examples are documented in the wiki.
You indicated your aversion to some options above. Perhaps you could give us some of your real examples and discuss the matter further. As for me, I would not have an issue of clashing titles — my titles are rather long, which can be an issue in itself…
Where this came up recently for me was, I was splitting a specific project into “Day 1”, “Day 2”, etc, with each of the days as their own nodes… but if I have other projects I want to split in the same method, the “Day 1” etc titles are identical. So I want a way of differentiating between them, but one where I don’t have to do that in the title because I prefer my organisation to come from the structure of the nodes themselves.
If having same titled notes is possible, perhaps the best solution is excluding them from org-roam-node-find altogether, and only navigating to them from other nodes?
I use consult-org-roam. It is an amazing package that makes it easy to find the node I am looking for. Try it.
another suggestion is that you add olp to the template:
Try this. When you are searching for a node it will list the title, file, todo, and olp. This is enough context to make it easy to select the one you are looking for.
I want to create a new node with the same title with org-roam-capture or org-roam-node-find.
But if I enter “Day 1” in the minibuffer and press RET, I end up navigating to the existing node.
Can I create a new node with the same title?
If yes, how?
Is this your question? Yes, you can. How to do this depends on your package for completion. Assuming you are using the popular Vertico package, then you can move your cursor to the prompt with the up arrow key or its equivalent—I use C-p—then press RET. Or you can press M-RET without moving to the prompt. If you use some other package like Ivy or Helm, the actual keybinding and command name differ.
This is documented in Vertico’s README. It may need getting used to, to read this type of generic explanation in widely used Emacs packages like Vertico.
Note in particular the binding of TAB to vertico-insert, which inserts the currently selected candidate, and the binding of RET and M-RET to vertico-exit and vertico-exit-inputrespectively.
vertico-exit exits with the currently selected candidate, while vertico-exit-input exits with the minibuffer input instead. Exiting with the current input is needed when you want to create a new buffer or a new file with find-file or switch-to-buffer. As an alternative to pressing M-RET, move the selection up to the input prompt by pressing the up arrow key and then press RET.
I would take this approach. A project can be a node, so “Project A”, “Project B”, etc. will appear in the minibuffer. I would keep “Day 1”, “Day 2”, etc. in each project to be normal headlines and not nodes (so no IDs will be assigned to them).
It would be easy to visit a project node via org-roam-node-find, and no need for complex method to differentiate “Day 1” in various projects.
For my real use, I have a single Org file named “projects.org” and all my projects go there. Each project is a level-1 headline. None of them for me appears in Org-roam—none, including the projects.org, are node. Works for me. I differentiate projects from notes, and only the latter go to Org-roam.
Thank you for telling me about this. I tried doing this, and it does open a new capture window, but with the same file that already exists (I know this because editing the file in the capture buffer edits the existing one).
Then modify your capture template so that the file name will be unique. For example, you can add subdirectory (one for each topic) or a time stamp. I use a timestamp as the ID and a prefix to my file names (even outside org-roam). This is not really an “issue” within Org-roam; it gives you functionality with which you can solve your issue with file naming conflicts.
I seem to be having the same problem as in this thread:
I want two nodes to have the same name (i.e., one for a person’s name and one for any talks they give). I would like to store the different nodes in different directories (e.g., people/JohnSmith.org and talks/JohnSmith.org). When I make a person, it works fine. When I then try to make a talk by the same person (even using the Vertigo trick), I always get the file with the person, not a new file for the talk.