[Geany-devel] Symbols access from plugins

Colomban Wendling ban-ubuntu at xxxxx
Tue Mar 3 19:13:50 UTC 2009

Hash: SHA1


Enrico Tröger a écrit :
>> Perfect, it works well :)
>> But I need to update the tag list manually to generate correct
>> documentation and insert it a the right place, but even if it can be
>> found in the online API doc and in tm_source_file.[ch],
>> tm_source_file_buffer_update() seems not usable from plugins (gets me
> tm_source_file_buffer_update() is experimental to update the tags array
> from the current buffer in Geany, i.e. the displayed text instead of
> reading the file contents from a file. But this doesn't work at all yet
> and so is disabled. Additionally, this is not part of the plugin API
> and so you get an undefined symbol error. Simply ignore it.
> Instead use tm_source_file_update() which should work ok but be aware
> that it reads the contents from the file on disk, so when the document
> in Geany has changes, you should save it first with document_save_file
> (). And at this point, tm_source_file_update() is already called after
> saving the document, so no need to call it manually.
OK. But isn't it possible to at least emulate
tm_source_file_buffer_update() by i.e. writing given buffer to a
temporary file and updating current document's tags with newly parsed
'Cause I think it is a little ill to force saving of the file only for
updating tags. I know my proposal wouldn't have gains of memory
parsing (no need to write/read file) but it should work as a temporary
workaround, if I miss nothing. What do you think?

But yes, by saving the document it works well regardless my above words.
>> Thanks again, it's exactly what I was searching for.
>> But again, a question: how can I know the click position that popuped
>> the menu (and perhaps if it was popuped by a click and not a keyboard
>> shortcut) to be able to generate the doc for the function below
>> pointer and not at current position in the buffer?
> The position where the menu was popped up is given in the
> "update-editor-menu" handler, check the 'pos' argument.
Thanks, I'll take a look at it.

Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Devel mailing list