Hi, Eric.
I test your patch on some of my code, it seems work very well. The command
semantic-analyze-current-context will never left some file opened. And I
also test some other functions such as smart completion, all of them work
correct.
Best regard.
YuPeng
2009/4/18 Eric M. Ludlam <eric@...>
>
> Hi,
>>
>> Ah, it was in the symref code. Below is a small patch. The global
>> database was explicitly asking for symref to keep the buffer open. I
>> don't remember why, and I didn't leave comments behind to explain to
>> myself why.
>>
>> If you could try it out for a while (I don't use global myself other
>> than testing a little) and let me know how it goes, that would be
>> great. If it works out, I'll check it in.
>>
>> Thanks
>> Eric
>>
>> *** semanticdb-global.el.~1.5.~ 2009-01-13 19:32:14.000000000 -0500
>> --- semanticdb-global.el 2009-04-18 08:24:09.000000000 -0400
>> ***************
>> *** 148,154 ****
>> (result (semantic-symref-find-tags-by-name name 'project))
>> )
>> (when result
>> ! (semantic-symref-result-get-tags result t))
>> )))
>>
>> (defmethod semanticdb-find-tags-by-name-regexp-method
>> --- 148,154 ----
>> (result (semantic-symref-find-tags-by-name name 'project))
>> )
>> (when result
>> ! (semantic-symref-result-get-tags result))
>> )))
>>
>> (defmethod semanticdb-find-tags-by-name-regexp-method
>> ***************
>> *** 162,168 ****
>> (result (semantic-symref-find-tags-by-regexp regex 'project))
>> )
>> (when result
>> ! (semantic-symref-result-get-tags result t))
>> )))
>>
>> (defmethod semanticdb-find-tags-for-completion-method
>> --- 162,168 ----
>> (result (semantic-symref-find-tags-by-regexp regex 'project))
>> )
>> (when result
>> ! (semantic-symref-result-get-tags result))
>> )))
>>
>> (defmethod semanticdb-find-tags-for-completion-method
>>
>>
>>
>>
>> >>> peng yu <yupeng820921@...> seems to think that:
>> >--00163646cef43b665a0467d1adc0
>> >Content-Type: multipart/alternative;
>> boundary=00163646cef43b66510467d1adbe
>> >
>> >--00163646cef43b66510467d1adbe
>> >Content-Type: text/plain; charset=ISO-8859-1
>> >Content-Transfer-Encoding: 7bit
>> >
>> >Sorry, I send the mail twice, because I the first time I forgot add the
>> >attach.
>> >
>> >2009/4/18 peng yu <yupeng820921@...>
>> >
>> >> Hi, Eric.
>> >>
>> >> 2009/4/17 Eric M. Ludlam <eric@...>
>> >>
>> >>> It will certainly open some files, but in general it closes them again
>> >>> as needed.
>> >>>
>> >>> A good trick is to use:
>> >>
>> >>
>> >>> M-x debug-on-entry RET find-file-noselect RET
>> >>>
>> >>> Then run your experiment. It will stop on every file load. Press "c"
>> >>> to continue. It will stop twice per call. Once per entry, and once
>> >>> per exit.
>> >>>
>> >>> Make note of what is on the stack when the offending file goes by.
>> >>> That will help direct us to the right thing. If it is related to
>> >>> Global and the symref code, we could experiment with letting tags out
>> >>> that have line numbers instead of character positions.
>> >>>
>> >>
>> >>
>> >On the test code I sent to you, I type M-x debug-on-entry RET
>> >find-file-noselect RET
>> >
>> > Then I type M-x semantic-analyze-current-context, the backtrace stoped
>> >twice total. I saved the *Backtrace* buffer contents and send to you. I
>> hope
>> >you can help me check them, I don't know what is the important thing in
>> the
>> >*Backrace* buffer.
>> >
>> >Best Regard.
>> >YuPeng
>> >
>> [ ... ]
>>
>
>
|