X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=blobdiff_plain;f=org-ref.org;h=e4f7bdf6d0dfb73b9db91fe072f540b8dcf47f4b;hp=b5429942f7665d8347131bc13164b0963d7cfe47;hb=e0ba32626fdecc2ae1bb47bf11f7555b49c5ac7c;hpb=c259c0584eafa5dfd5475ab1cb5007712b921e76 diff --git a/org-ref.org b/org-ref.org index b542994..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)) @@ -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"))))