On Sep 24, 2006, at 14:30, Charilaos Skiadas wrote:
On Sep 24, 2006, at 2:54 PM, Adam R. Maxwell wrote:
Yes, that's correct; BibDesk reads any of the above (thanks to btparse!), but saves using {} as delimiters.
Hm, perhaps we could change things so as to use btparse as well. We'll see.
It's available here http://sourceforge.net/projects/btool. Have fun :).
In that case, just grabbing citekeys is pretty straightforward. My bib files are fairly large, so I'm not sure how well it scales to read the file every time (if that's what you do?).
Yes I just search recursively starting either from the current file or TM_LATEX_MASTER, and descending into all \include'd and \input'd files, and searching in there for all \bibliography{} entries, and then parsing all those. It looks for the keyword in citekey, author/ editor and title fields.
That sounds pretty good. One of the limitations of my input manager hack is that it only searches the current NSTextView for \label completions, since it has no way to get the master document.
[...]
That's partially correct; it uses AppleScript to get the list of completions, so BibDesk has to be running, but it searches all open documents. There are also some features that help searching (you can search for "Bü" instead of "B{"u} for author name completion).
Ah that last one is probably tricky for our parser to do correctly. Of course, if this is basically inherited from btparse, then it just might be doable.
Nope, it's some moderately hairy Obj-C code in BibDesk proper <https://svn.sourceforge.net/svnroot/bibdesk/trunk/bibdesk/BDSKConverter.m
.
We actually rewrote NSTextView's completion window/controller from scratch for BibDesk, and that's what I was trying to wedge into TextMate (to avoid any use of the mouse). Since there's no published API for TextMate's main textview, that may be impossible for me.
That would indeed be really sweet. I think we might have a better chance at it in TextMate 2.0, where I think a lot of these internals might be more attainable. As it is, the best we can do really is the current behavior of esc, which using only citekeys I'm afraid (because it can't alter the word that is being completed, it can only complete it).
Yeah, I think it's something Allan would have to do, if he's interested (and likes popup completion). It seems like it would be extensible so that bundles could provide the possible completions as they do now.
thanks, Adam