Andrea wrote a blogpost on how to batch delete files based on things in selected region. I often have a lot of references to work with and they are usually in form of a citation link. Following are some important steps to overcome in order to achieve this goal:

How do you extract all the citation keys from a region?

Remember, you can get a list of citation keys in a buffer as what is post:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
(org-element-map (org-element-parse-buffer) 'link
         (lambda (c)
           (when (assoc (org-element-property :type c) org-ref-cite-types)
             (goto-char (org-element-property :begin c))
             (let* ((path (org-element-property :path c))
                    (data (org-ref-parse-cite-path path))
                    (references (plist-get data :references)))
               (append (list (org-element-property :begin c))
                       (cl-loop for ref in references collect
                                (progn
                                  (search-forward (plist-get ref :key))
                                  (match-beginning 0))))))))

Default openning operation

Most of case, the use just want to open all the pdfs in a dedicated frame name “TOP”. If the user wants to rename the frame tittle, then call the function with a universal argument.