Apologies for replying to such an old thread I just wanted to add...
On 01/02/2012 1:31 AM, Eric M. Ludlam wrote:
> What is going on is that when there is no common prefix, the special
> Emacs overlay created to manage the inline completion as start==end. It
> goes into the inline completion engine, discovers that the point isn't
> "inside" the bounds of the overlay, and assumes you want to exit, and
> then exits the completion engine.
>
> I'm not sure what may have changed in the newer emacsen that may have
> caused the old code to behave this way. I've been fiddling in
> semantic-complete-post-command-hook to see what is going on and have
> been able to make it get partway through, but it still exits too soon.
>
> Here is a partial patch:
> === modified file 'lisp/cedet/semantic/complete.el'
> *** lisp/cedet/semantic/complete.el 2011-12-07 22:44:28 +0000
> --- lisp/cedet/semantic/complete.el 2012-02-01 01:22:45 +0000
> ***************
> *** 686,692 ****
> (cond
> ;; EXIT when we are no longer in a good place.
> ((or (not (eq b (current-buffer)))
> ! (<= (point) s)
> (> (point) e))
> ;;(message "Exit: %S %S %S" s e (point))
> (semantic-complete-inline-exit)
> --- 686,692 ----
> (cond
> ;; EXIT when we are no longer in a good place.
> ((or (not (eq b (current-buffer)))
> ! (and (<= (point) s) (not (= s e)))
> (> (point) e))
> ;;(message "Exit: %S %S %S" s e (point))
> (semantic-complete-inline-exit)
>
>
> but it still doesn't work correctly for me.
I have also run into this issue when updating from cedet-1.01 to cedet-1.1.
I tried this patch but as you suggest I'm seeing strange issues, for
example in the following code:
struct bar
{
int aa;
int bb;
};
int main ()
{
bar b;
b. /* <-- try to complete here */
}
After typing the "." in "b." I get the completion up, but if I move
point up (I'd expect this to exit completion mode) the completion then
follows the point around; this kind-of makes sense as 's == e' so we
don't exit completion mode.
Next I took a look at the cedet-1.0.1 code, interestingly the code used
to be "(< (point) s)" - if I put this in /instead/ of the above patch I
get the old behaviour back.
Next a check online reveals:
http://cedet.bzr.sourceforge.net/bzr/cedet/code/trunk/revision/8112.1.117
as the commit that made the change.
At that point my complete lack of knowledge about the internals of cedet
means I can't offset any better solutions.
Thanks,
Andrew
>
> In theory, front-advance (nil) and rear-advance (t) when creating the
> overlay should allow this to work. Perhaps someone else on the list
> knows what may have changed in overlay behavior to cause this?
>
> Eric
>
> On 01/31/2012 05:52 PM, Andrzej Pronobis wrote:
>> Hi again,
>>
>> Could you please suggest some ways of debugging semantic-complete-self-insert?
>> I'm really trying to get this to work and I'm not that an experienced
>> cedet user.
>>
>> Thanks!
>> Andrzej
>>
>>
>>
>> On Tue, Jan 31, 2012 at 12:01 AM, Andrzej Pronobis<a.pronobis@...> wrote:
>>> Hi,
>>>
>>> I have narrowed it down to a very specific problem.
>>> semantic-complete-self-insert will not work if the class has members
>>> starting from different letters e.g.
>>> class A
>>> {
>>> int aa;
>>> int bb;
>>> };
>>>
>>> but it will work for cases such as:
>>> class B
>>> {
>>> int aa;
>>> int ab;
>>> };
>>> when it can autocomplete the first letter.
>>>
>>> Any ideas?
>>>
>>> Thanks!
>>> Andrzej
>>>
>>>
>>>
>>> On Sun, Jan 29, 2012 at 3:21 PM, Andrzej Pronobis<a.pronobis@...> wrote:
>>>> Hi,
>>>>
>>>> I have recently switched to newtrunk which solved most of my previous
>>>> problems with CEDET. I experience one problem though.
>>>> semantic-complete-self-insert when bound to "." works properly for a
>>>> super simple case when the class is defined in the same file. However,
>>>> in more complex code, when "." is pressed emacs thinks for a while and
>>>> then no suggestions are shown.
>>>>
>>>> When I add a single letter after the "." and then use
>>>> semantic-complete-analyze-inline e.g.
>>>> Type a;
>>>> a.m<M-x semantic-complete-analyze-inline>
>>>> The suggestions are shown properly.
>>>>
>>>> How can I debug this case?
>>>>
>>>> Cheers,
>>>> Andrzej
>>
>> ------------------------------------------------------------------------------
>> Keep Your Developer Skills Current with LearnDevNow!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-d2d
>> _______________________________________________
>> Cedet-devel mailing list
>> Cedet-devel@...
>> https://lists.sourceforge.net/lists/listinfo/cedet-devel
>>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Cedet-devel mailing list
> Cedet-devel@...
> https://lists.sourceforge.net/lists/listinfo/cedet-devel
>
>
|