Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the proposed change for adding a "collection" function, the elisp-side. It introduces one new command verb, "collect", which is handeld in
org-roam-ui--on-msg-collect-node
.Sorry for also merging the latest commits from the main branch before doing the PR, my changes are in the first commit.
I did not add yet anything for gathering the possible list of collections. There's a decision to be made. Currently, I see two possibilities: (a) just offer a list of open buffers holding collections; that would be simply a call to
delve-buffer-list
. (b) More powerful, offer a list of open buffers and a list of files. If the user chooses a file, it will be loaded into a buffer on the fly. That's what `Delve' does. I would have to write a function which offers that functionality.I think (b) is more powerful and simply better, but it could mean that the web menu will offer quite a bit of choices. So that's mainly what was holding me back. If there's an elegant solution for that problem, I would adopt for (b). Maybe we could first use (a) and then solve (b) by only offering the last 5 recently used collections, or something like that.
Another thing: Currently "collecting" nodes adds the nodes in the background, leaving the current window configuration in Emacs as it is. That might be unitintuitive and could be turned into an option.