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

Add a customisation for toggling of proactive reloading of bibliography. #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 7 additions & 1 deletion bibtex-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ composed of the BibTeX-key plus a \".pdf\" suffix."
:group 'bibtex-completion
:type '(choice directory (repeat directory)))

=(defcustom bibtex-completion-watch-bibliography t
"If non-nil (the default) the bibliography is reloaded
proactively every time any of the BibTeX files changes."
:group 'bibtex-completion
:type 'boolean)

(defcustom bibtex-completion-pdf-open-function 'find-file
"The function used for opening PDF files. This can be an
arbitrary function that takes one argument: the path to the PDF
Expand Down Expand Up @@ -404,7 +410,7 @@ actually exist. Also sets `bibtex-completion-display-formats-internal'."
;; watches for automatic reloading of the bibliography when a file
;; is changed:
(mapc (lambda (file)
(if (f-file? file)
(if (and (f-file? file) bibtex-completion-watch-bibliography)
(let ((watch-descriptor
(file-notify-add-watch file
'(change)
Expand Down