]> git.donarmstrong.com Git - org-ref.git/blobdiff - org-ref.org
add with-affiliates to get bibtex keys
[org-ref.git] / org-ref.org
index b5429942f7665d8347131bc13164b0963d7cfe47..e4f7bdf6d0dfb73b9db91fe072f540b8dcf47f4b 100644 (file)
@@ -485,7 +485,7 @@ This code provides some functions to generate a simple sorted bibliography in ht
 
 #+BEGIN_SRC emacs-lisp :tangle org-ref.el
 (defun org-ref-get-bibtex-keys ()
-  "return a list of unique keys in the buffer."
+  "Return a list of unique keys in the buffer."
   (let ((keys '()))
     (org-element-map (org-element-parse-buffer) 'link
       (lambda (link)
@@ -495,7 +495,9 @@ This code provides some functions to generate a simple sorted bibliography in ht
                (key
                 (org-ref-split-and-strip-string (plist-get plist ':path)))
              (when (not (-contains? keys key))
-               (setq keys (append keys (list key)))))))))
+               (setq keys (append keys (list key))))))))
+      ;; set with-affiliated to get keys in captions
+      nil nil nil t)
     ;; Sort keys alphabetically
     (setq keys (cl-sort keys 'string-lessp :key 'downcase))
     keys))
@@ -3279,8 +3281,7 @@ C-u C-u will change the key at point to the selected keys.
               last-char))
        ;; and we want to go to the end of the new link
        (goto-char
-        (org-element-property :end (org-element-context)))
-       )
+        (org-element-property :end (org-element-context))))
        (t
        (message "Not found"))))