Closed emacsomancer closed 2 months ago
In general, I seem to have to force org-node to update as so:
(defun bms/org-node-refresh ()
(interactive)
(org-node-files)
(org-node-reset))
Thanks for the report, I think it should work now!
I still have to run my =bms/org-node-refresh= function it seems, in order to get org-node to have all of my nodes.
Hm.
I assume the capture is resulting in a new file-level node?
It is not enough to just save the buffer? Because after-save-hook
triggers org-node-cache-rescan-file
, so something may be wrong in that function, but I'm more inclined to think it's not being triggered somehow.
Yes, capture are resulting in new file-level nodes, and now org-node seems to see them as well.
But I find that I still have to run bms/org-node-refresh
on every Emacs restart in order for org-node to see my org-roam nodes.
Oh, that's good news.
But regarding the restart thing: I'll guess what you're observing is that the tables are empty until the first-time scan completes. Which is asynchronous. Does it work if you just wait a bit?
~I now pushed a change to make org-node-find
wait synchronously if org-nodes
is empty.~
Actually I think it was already designed to wait synchronously. Something else must be wrong.
It's possible (likely) it's something in my config. But I'm not sure what.
I did earlier have a function which messed with org-id-files
, because I'm using org-caldav
and I don't want it to search through all nodes (because it takes too long), so I'd reset the value of org-id-files
(because it uses this). But I've changed that and I can't find anything else in my config which messes with org-id-files
.
[edit: waiting for 10 minutes on restart doesn't seem to do anything; I still need to manually trigger it.]
I expect this to be fixed by now, if nothing else because the init as well as every reset will call (org-node-files)
without memoization.
I have set
(setq org-node-creation-fn #'org-capture)
, but org-node then doesn't seem to know about new nodes created by captures.