Org-roam-search

dest:id1 dest:id2 should give you the result you wish. It means a node that has links to (or has as a destination) id1 and id2. However the query is currently generated not in a way that supports AND. You weren’t getting false positives, the application defaults to showing all when there is either a problem or no matches for destination or source searches.
I have updated the repo. AND operations shouldl work on the latest version.

1 Like

right now, I know I’m foolish, but I am rebelling against the idea of an emacs distribution, because I am still old fashioned and want to use the barebones editor (because I want to use the same environment both here and on my commandline only vm
also because something in my head, says i want them to be only the customisations I add, not something that someone spoonfed me)

I know I will eventually see sense and move to Doom some day, just not today :joy:

In the meanwhile, I thank you so much once again, for being patient and kind with me.

Thanks for your help, I was able to get it to work!

As far as I can tell, this is only really useful in programmatic use, not in interactive use, right?

Or is there a way to use the regular completion system to select (multiple) nodes based on heir ‘names’?

Right now, I’m using it the following in the following way:

#+begin_src elisp
(org-roam-search-node-find
 :initial-input "dest:71667e8e-d586-42c1-b9d5-a3ff5c63b5e1 dest:002107fd-92a1-4daa-aa0e-0f62a8bc3349"
 )
#+end_src
1 Like

org-roam-search-node-find is interactive. you can run the command and type in search queries and interactively get results.
It currently uses helm as completion framework so you would need helm installed.
I had a version that was based on purely completing-read but misses features like selecting multiple results, and some other things. you can find it here. changes to org-roam-search-node-read and org-roam-search-completion--insert-default-candidate are the only ones you would want to keep.

1 Like

I should have been more clear. I didn’t mean ‘interactive’ in the technical sense – I also executed the function interactively. I only meant from a practical perspective, the use case we were talking about isn’t really feasible since one would have to prepare and paste multiple IDs. Hence my question whether it’s possible to use node titles such as dest:foo instead of dest:ID-OF-FOO.

I see what you mean. It is currently not possible. However I can see how node titles does make it easier for the user. node titles are more natural to interact with than node ids. I like this proposal. It requires modifying the org roam sql query. For future reference, First merge the links and corresponding table holding titles and then group all titles including aliases and place in same row. examining line 405 and line 462 should help create the sql query.
I may implement this feature sometime in the future.
I had a couple thoughts on how to make more interactive in org roam search feature request 1. As things currently stand, the easiest extension is to implement a helm action that grabs ids of search results that can then been used in subsequent searches with something like (helm-show-kill-ring).
In the mean time, search for the nodes whose ids you want, press tab on the corresponding search results to open them, copy their ids, and then pull the ids up by evaluating (helm-show-kill-ring).

I see, thanks for your response. I’m not using helm, though. Doom Emacs switched to vertico, and I followed suit. It works great :slightly_smiling_face:

I was in touch with the guy who develops vulpea a while ago about the same idea of being able to query for backlinks. I think vulpea has some options for doing things interactively using the native completion system. Just in case that’s a useful inspiration for implementing this feature.

I think this feature would be extremely useful. I think links beat tags for a number of reasons, so querying for links is essential. I’ve been using logseq a little bit and everyone is using this feature there since it’s natively supported in their queries.