Skip to content

Fixing autocomplete and adding citation extraction #43

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dhufe
Copy link
Contributor

@dhufe dhufe commented Dec 14, 2021

Due to some additional quotes the code that updates the cached citation keys did not work anymore (bibfile_modifed and load_bibfile).

Additionally, I added some code to extract the used citation entries. This is dne using some GPL code provided by
Joseph Reagle.

@@ -156,14 +159,16 @@ def get_settings(setting, default):
if setting == 'bibtex_file':
window = sublime.active_window()
ref_dir = os.path.dirname(window.project_file_name())
result = ref_dir + '/' + project_data['bibtex_file']
filename = project_data['bibtex_file']
result = ref_dir + '/' + filename.replace('\'', '')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will fail on windows - need to use os.path.join (or work with pathlib but that's probably overkill)

@mangecoeur
Copy link
Owner

Hi thanks for the PR, I just had a look and I left a comment - there is a case of joining paths that I think will fail on windows. Could you please check the comment and resolve thanks :)

@dhufe
Copy link
Contributor Author

dhufe commented Jan 14, 2022

Sry for the late response.
I will check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants