From e0ba32626fdecc2ae1bb47bf11f7555b49c5ac7c Mon Sep 17 00:00:00 2001 From: John Kitchin Date: Tue, 27 Jan 2015 08:28:02 -0500 Subject: [PATCH] add with-affiliates to get bibtex keys so we find them in captions. --- org-ref.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org-ref.org b/org-ref.org index 3a829c7..e4f7bdf 100644 --- a/org-ref.org +++ b/org-ref.org @@ -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)) -- 2.39.2