#120 Bibtex completion for multiple citations doesn't work


I noticed that gedit-latex has auto-completion for citations, which is awesome! But I noticed that I cannot get the completion for multiple citations like the following :


In fact I will get completion for authorA but not for B & C. Is it even a bug ?



  • Michael Zeising

    Michael Zeising - 2010-05-27

    I'd call it a missing feature :-) no, you're right, this should work. Thanks for posting!

  • Nosferax

    Nosferax - 2010-05-27


    I got a quick question for you... I'm not all that familiar with python so I wasn't able to track it myself.

    When I do a completion on a citation, what is called exactly? Where does the actual bibtex completion get done?

    The bibtex/completion.py code (BibTeXCompletionHandler.complete and BibTeXEntryTypeProposal) seems to never get called, why is that? Am I looking at the wrong code?

    I never see their log messages in the console, but I see the messages from SnippetCompletionHandler and LatexCompletionHandler...


  • Michael Zeising

    Michael Zeising - 2010-05-27

    The BibTeX completion is used for BibTeX, the LaTeX completion is used for LaTeX. When you complete "\cite{", it's a LaTeX completion because you're editing a LaTeX file and not a .bib file.

  • Nosferax

    Nosferax - 2010-05-27

    Ahh, much better thanks :)

    In that case... is there a situation in which command arguments can have commas embedded in them? Real quick I don't think I can find an example.. Usually the comma separates different arguments, so should call for a different completion.

    If what I said makes sense and there is no case where we might completion on an argument name with a comma in it - I made a quick work around...

    Add this line in PrefixModelParser.parse at line 348 :

    argumentValue = argumentValue[argumentValue.find(',')+1:]

    just before this block

    if len(argumentValue):
    choices = [choice for choice in choices if choice.value.startswith(argumentValue)]
    overlap = len(argumentValue)
    overlap = 0

    return self.__create_proposals_from_choices(choices, overlap)

  • Nosferax

    Nosferax - 2010-05-27

    Sorry the proposed fix only works for first argument following comma, need to do an rfind instead of a left find...

    replace the line by this :

    argumentValue = argumentValue[argumentValue.rfind(',')+1:]

  • Xavier

    Xavier - 2010-12-01

    After a quick test, nosferax's fix seems to work.
    Thanks !


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks