From ce5e9644ed02cc1ed4a905e0436a1be8f8ccab57 Mon Sep 17 00:00:00 2001 From: aikrahguzar <88336724+aikrahguzar@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:56:58 +0100 Subject: [PATCH] perf(latex): don't make reftex rescan Documents this in the README. Also includes a couple of cosmetic changes. --- README.org | 8 ++++++++ citar-latex.el | 8 +++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.org b/README.org index ca6d1efd..035077f0 100644 --- a/README.org +++ b/README.org @@ -333,6 +333,14 @@ If a bib file changes, the cache will automatically update the next time you run Note that cached data preformatted completion candidates are independently tracked by file. So, for example, if you have one very large bibliography file that changes a lot, you might consider splitting into one large file that is more stable, and one-or-more smaller ones that change more frequently. +*** Reftex and local bibliographic files in LaTeX + +Citar relies on the builtin library reftex to find the bibliographic files included in a LaTeX document. +Reftex scan the LaTeX document to find these files and caches them. +If you find that Citar isn't picking up bibliographic entries in the included files it is most likely due to the fact that reftex needs to do a rescan. +You can use ~reftex-parse-all~ or ~reftex-parse-one~ to do such a scan interactively. +This should be only rarely needed. + ** Notes Citar offers configurable note-taking and access integration. diff --git a/citar-latex.el b/citar-latex.el index 806e4706..2026ee71 100644 --- a/citar-latex.el +++ b/citar-latex.el @@ -15,7 +15,6 @@ (require 'citar) (require 'tex nil t) -(require 'reftex-parse) (require 'reftex-cite) (defvar TeX-esc) @@ -33,7 +32,8 @@ "citeauthor*" "Citeauthor*" "citetitle" "citetitle*" "citeyear" "citeyear*" "citedate" "citedate*" "citeurl" "fullcite" "footfullcite" "notecite" "Notecite" "pnotecite" "Pnotecite" - "fnotecite") . (["Prenote"] ["Postnote"] t)) + "fnotecite") + . (["Prenote"] ["Postnote"] t)) (("nocite" "supercite") . nil)) "Citation commands and their argument specs. @@ -70,9 +70,7 @@ entry when it is enabled." ;;;###autoload (defun citar-latex-local-bib-files () "Local bibliographic for latex retrieved using reftex." - (ignore-errors - (reftex-access-scan-info t) - (copy-sequence (reftex-get-bibfile-list)))) + (ignore-errors (copy-sequence (reftex-get-bibfile-list)))) ;;;###autoload (defun citar-latex-key-at-point ()