>>> David Hansen <david.hansen@...> seems to think that:
>On Mon, 16 Jun 2008 21:24:45 -0400 Eric M. Ludlam wrote:
[ ... ]
>> M-x semanticdb-debug-file-tag-check RET /some/file/name RET
[ ... ]
>> The above function should reveal the specific piece of data causing it
>> to think those files need a refresh.
>>
>
>Here you go. The first data comes from right after I started emacs,
>only the *scratch* buffer there:
>
>Starting file is: /home/dhansen/include/gtk-2.0/gtk/gtktext.h
>TrueName is: /home/dhansen/include/gtk-2.0/gtk/gtktext.h
>Directory Part is: /home/dhansen/include/gtk-2.0/gtk/
>Found Database is: #<semanticdb-project-database-file gtk/ (196 tables)>
>Found Table is: #<semanticdb-table gtktext.h (0 tags)>
>
>Action Summary: Found table that needs refresh.
> Saved pointmax: 7120 Needs Refresh: t
> No tags in table.
> File Size is: 7119
> File Mod Time is: 2008-06-03 23:29:26
> Saved file size is: 7119
> Saved Mod time is: 2008-06-03 23:29:26
>
[ ... ]
>
>Starting file is: /home/dhansen/include/gtk-2.0/gtk/gtktext.h
>TrueName is: /home/dhansen/include/gtk-2.0/gtk/gtktext.h
>Directory Part is: /home/dhansen/include/gtk-2.0/gtk/
>Found Database is: #<semanticdb-project-database-file gtk/ (196 tables)>
>Found Table is: #<semanticdb-table gtktext.h (0 tags)>
>
>Action Summary: Found table that needs refresh.
> Saved pointmax: 7120 Needs Refresh: t
> No tags in table.
> File Size is: 7119
> File Mod Time is: 2008-06-03 23:29:26
> Saved file size is: 7119
> Saved Mod time is: 2008-06-03 23:29:26
[ ... ]
Aha! Inside gtktext.h is the line:
#ifdef GTK_ENABLE_BROKEN
for the whole file, resulting in no tags being parsed, thus it always
needs to be refreshed. You could enable GTK_ENABLE_BROKEN in your
preprocessor table (to thus enable completion on these parts.)
I have (I would guess) the same gtk headers, but for some reason the
reparsing was invisible to me.
No tags was a flag for semantic to do a reparse, but since I added
file size and last mod-time monitoring, it should no longer be needed.
Try out this patch, and let me know if it helps, or if it starts
messing things up. I tried it on a gtk header, and it seemed find,
but I haven't tried too many other permutations.
I also noticed my todo statement is now stale. :)
Thanks
Eric
----------------
*** semanticdb.el 15 Jun 2008 08:21:43 -0400 1.114
--- semanticdb.el 17 Jun 2008 07:48:16 -0400
***************
*** 498,504 ****
)
(or (not (slot-boundp obj 'tags))
! (not (oref obj tags))
;; @TODO - use fsize instead
(/= (or (oref obj fsize) 0) actualsize)
(not (equal (oref obj lastmodtime) actualmod))
--- 498,504 ----
)
(or (not (slot-boundp obj 'tags))
! ;; (not (oref obj tags)) --> not needed anymore?
;; @TODO - use fsize instead
(/= (or (oref obj fsize) 0) actualsize)
(not (equal (oref obj lastmodtime) actualmod))
--
Eric Ludlam: eric@...
Siege: http://www.siege-engine.com Emacs: http://cedet.sourceforge.net
|