cry5t41 · 2022-10-05 11:39
Hi guys,
Trying to link existing node, but instead link existing one it is create new node. How can i fix that?
Steps:
1. create new node C-c n f - `node1`
2. create new node C-c n f - `node2`
3. open node2 and link C-c n i `node1`
Then create new node `node1`
Thanks
sco_t · 2022-10-05 12:03
Silly question but did you try hitting tab when linking node1 the second time? May be something particular to my setup but if I don't hit tab (which then seems to add a bunch of spaces on the end), I create a new node even if the name is identical to an existing one. Always meant to dig in and see what was going on there but have never gotten around to it.
cry5t41 · 2022-10-05 12:16
tried that - not my case :(
Anyway tnx
cry5t41 · 2022-10-05 13:49
basicaly if I want to do link I need to manally do
`[[id:C03C01D5-2107-4B13-B528-1C6E69C7EB77][myNode]]`
IceOleg · 2022-10-05 20:46
> Silly question but did you try hitting tab when linking node1 the second time?
Another silly one for OP, did you save node1 before switching to node2 and trying to link back?
I believe org-roam only refreshes its database of nodes when the file is saved, so if you don't save node1, roam won't realize it exists and create a new one.
infl3ct1on · 2022-12-10 23:43
Hey I believe I found a solution. You can run the "org-roam-db-sync" command.
There's also a function called "org-roam-db-autosync-mode" that's supposed to run in the background and keep everything updated on the fly. I enabled this in my spacemacs config by passing "1" to it as an arg in accordance with its documentation.
`(org :variables`
`org-roam-db-autosync-mode 1)`
The docs also say you can test if it's on or not by running:
`(default-value 'org-roam-db-autosync-mode)`
in scratchpad.
EDIT: org-roam-db-sync works, but the autosync mode doesn't seem to be working properly.