-
Notifications
You must be signed in to change notification settings - Fork 363
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
Cite autocomplete fails #27
Comments
I have the same problem. I tracked it down to @comment entries in my .bib file. These entries are inserted by BibDesk to keep track of reference groups. The lines that cause the problem for me are: @comment{BibDesk Smart Groups{ The completion code looks for lines that start with @ and then expects to be able to match them with this regexp:
which requires a comma at the end of the line. For the comment lines, this crashes producing the error that you are seeing (or at least I get the same message). I work-around the problem by adding a ? after the comma in the regular expression. This allows completion to work, with a side-effect that the comment prefix is also offered up as a completion. A proper fix would be to have a more complex check that lines beginning with @ are actually bib entries, not something else such as a comment. |
Oh goodness... and I thought I had tamed bib files :-( I can't promise a quick fix but I'll take a look. I am thinking about parsing the file differently for other reasons anyway... |
After seeing #50, I wanted to add that my two bib files do not have @comment, but the longer one has a 2 line header
and the 'abbr' file is a series of @string entries (these convert 'variables' in bib files to longer strings, e.g. ACM = "Associ. Computing Machinery" |
Closing for now, as this may be solved with new parsing code (please be patient) |
I suggest the following fast fix (at least, it is working for me): |
Thanks, that solved my problems with Bibdesk generated bib files. |
If I write 'cite_' and hit Ctrl-Space, I get autocomplete for all words with "c" in the document. This document has two bib files if that might be a cause. The other file I tried with only one bib file is fine.
The text was updated successfully, but these errors were encountered: