update packages

This commit is contained in:
2025-03-11 21:14:26 +01:00
parent 45d49daef0
commit 14dcaaddde
440 changed files with 13229 additions and 8718 deletions

View File

@@ -1,6 +1,6 @@
;;; org-ref-utils.el --- Utility functions for org-ref -*- lexical-binding: t; -*-
;; Copyright (C) 2016-2021 John Kitchin
;; Copyright (C) 2016-2024 John Kitchin
;; Author: John Kitchin <jkitchin@andrew.cmu.edu>
;; Keywords:
@@ -55,9 +55,11 @@ Copies the string to the clipboard."
(setq org-version (with-temp-buffer
(insert-file-contents org-ref-el)
(goto-char (point-min))
(re-search-forward ";; Version:")
(s-trim (buffer-substring (point)
(line-end-position)))))
(if
(re-search-forward ";; Version:" nil t)
(s-trim (buffer-substring (point)
(line-end-position)))
org-ref-dir)))
(setq git-commit
;; If in git, get current commit
@@ -128,6 +130,12 @@ org-ref installed in [[${org-ref-location}]].
- org-ref-insert-ref-function :: ${org-ref-insert-ref-function}
- org-ref-cite-onclick-function :: ${org-ref-cite-onclick-function}
* bibtex-completion setup
- bibtex-completion-bibliography :: ${bibtex-completion-bibliography}
- bibtex-completion-library-path :: ${bibtex-completion-library-path}
- bibtex-completion-notes-path :: ${bibtex-completion-notes-path}
* org-ref libraries
** org-ref-helm (loaded: ${org-ref-helm-p})
@@ -175,7 +183,11 @@ You set =pdftotext-executable= to ${pdftotext-executable} (exists: ${pdftotext-e
("org-ref-insert-cite-function" . ,org-ref-insert-cite-function)
("org-ref-insert-label-function" . ,org-ref-insert-label-function)
("org-ref-insert-ref-function" . ,org-ref-insert-ref-function)
("org-ref-cite-onclick-function" . ,org-ref-cite-onclick-function)))))
("org-ref-cite-onclick-function" . ,org-ref-cite-onclick-function)
("bibtex-completion-bibliography" . ,bibtex-completion-bibliography)
("bibtex-completion-library-path" . ,bibtex-completion-library-path)
("bibtex-completion-notes-path" . ,bibtex-completion-notes-path)))))
(defun org-ref-get-bibtex-entry-citation (key)
@@ -263,7 +275,10 @@ Jabref, Mendeley and Zotero. See `bibtex-completion-find-pdf'."
(pdf-file (bibtex-completion-find-pdf key t)))
(pcase (length pdf-file)
(0
(message "no pdf found for %s" key))
(message "no pdf found for %s" key)
(save-window-excursion
(org-ref-open-citation-at-point)
(doi-utils-get-bibtex-entry-pdf)))
(1
(funcall bibtex-completion-pdf-open-function (car pdf-file)))
(_
@@ -291,12 +306,12 @@ in a directory. Optional PREFIX argument toggles between
(pdf-file (bibtex-completion-find-pdf-in-library key)))
(if pdf-file
(message "PDF for key [%s] already exists %s" key pdf-file)
(let* (
(source-file-name (read-file-name (format "Select pdf file associated with key [%s]: " key)
org-ref-bibtex-pdf-download-dir))
(dest-file-name (expand-file-name (format "%s.pdf" key) (org-ref-library-path)))
(file-move-func (org-ref-bibtex-get-file-move-func prefix))
)
(let* ((source-file-name (read-file-name
(format "Select pdf file associated with key [%s]: " key)
org-ref-bibtex-pdf-download-dir))
(dest-file-name (expand-file-name (format "%s.pdf" key)
(org-ref-library-path)))
(file-move-func (org-ref-bibtex-get-file-move-func prefix)))
(progn
(funcall file-move-func source-file-name dest-file-name)
(message "added file %s to key %s" dest-file-name key))))))
@@ -591,7 +606,7 @@ if FORCE is non-nil reparse the buffer no matter what."
(cl-loop for ref in (plist-get (org-ref-parse-cite-path (plist-get plist :path)) :references)
do
(when (not (member (plist-get ref :key) bibtex-keys))
(goto-char (plist-get plist :begin))
(goto-char (org-element-property :begin link))
(re-search-forward (plist-get ref :key))
(push (cons (plist-get ref :key) (point-marker)) bad-citations)))))))
;; add with-affiliates to get cites in caption
@@ -615,7 +630,7 @@ if FORCE is non-nil reparse the buffer no matter what."
(cl-loop for label in (split-string (plist-get plist :path) ",")
do
(unless (-contains? labels label)
(goto-char (plist-get plist :begin))
(goto-char (org-element-property :begin link))
(add-to-list
'bad-refs
(cons label (point-marker)))))))))
@@ -1277,3 +1292,7 @@ which will CLOBBER the file."
(provide 'org-ref-utils)
;;; org-ref-utils.el ends here
;; Local Variables:
;; byte-compile-warnings: (not docstrings-wide)
;; End: