From: John Kitchin Date: Tue, 27 Jan 2015 13:28:02 +0000 (-0500) Subject: add with-affiliates to get bibtex keys X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=commitdiff_plain;h=e0ba32626fdecc2ae1bb47bf11f7555b49c5ac7c;ds=sidebyside add with-affiliates to get bibtex keys so we find them in captions. --- 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))