Skip to content

Query all nodes that contain links to nodes A __and__ B #106

Answered by d12frosted
wuqui asked this question in Q&A
Discussion options

You must be logged in to vote

Brilliant, thanks for this quick and excellent answer!

Glad you find it useful.

get a list of notes back

What do you mean by 'back'? :) Like, in interactive use there is no point in returning anything from a function as it's interactive use. But let me show you several examples.

First, here is a function that returns a list of backlinks for a given list of notes.

(defun vulpea-backlinks-many (notes)
  "Return notes that link to all NOTES at the same time."
  (let* ((blinks-all
          (emacsql-with-transaction (org-roam-db)
            (seq-map
             (lambda (note)
               (seq-map
                #'vulpea-db--from-node
                (seq-map
                 #'org-r…

Replies: 4 comments 28 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
20 replies
@Cletip
Comment options

@d12frosted
Comment options

@d12frosted
Comment options

@wuqui
Comment options

@Cletip
Comment options

Answer selected by d12frosted
Comment options

You must be logged in to vote
8 replies
@d12frosted
Comment options

@d12frosted
Comment options

@wuqui
Comment options

@tefkah
Comment options

@d12frosted
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #105 on October 28, 2021 06:38.