Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't make reftex do a rescan everytime #855

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 3 additions & 5 deletions citar-latex.el
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

(require 'citar)
(require 'tex nil t)
(require 'reftex-parse)
(require 'reftex-cite)

(defvar TeX-esc)
Expand All @@ -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.

Expand Down Expand Up @@ -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 ()
Expand Down
Loading