-
Notifications
You must be signed in to change notification settings - Fork 74
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
Dynamic bibtex-completion-library-path #420
Comments
I think you can simply use Emacs' function advising infrastructure to set |
Absolutely! Anyone who wants to use their pdf library from outside emacs and might have a different folder structure can just advice |
It works and bibtex-completion (its caching mechanism) was designed with uses like this in mind. So I'd say, there's no reason to view this as a hack. Perhaps we can make it feel less hacky by officially endorsing this solution in README.org? |
Sure, including it in README would be great! I can make a pull request describing how to do it if you want. What I meant was that the advising mechanism itself is basically a hack! From the manual: |
Hello again! :)
Currently
bibtex-completion-library-path
gets a list of directories. Users can write a function that generates this list based on their need. However, (I think) in many cases, the result of this function can change based on what happens outside Emacs. For example, a user might want to include all pdf files within a directory and all of its subdirectories, except inside hidden folders and git repositories.Currently, if a directory in
bibtex-completion-library-path
is deleted and no longer exists, we get an error. If a directory is added, then clearly the library will have no way of knowing this change (except by running the function again to set the value ofbibtex-completion-library-path
).A solution for that is to allow
bibtex-completion-library-path
to get a list of directories and functions and then have a function like this:Note that this change is completely backward compatible and doesn't break any existing setup.
I've implemented this in my setup and I'll be happy to make a pull request if this is something you'd like to implement.
The text was updated successfully, but these errors were encountered: