Sondre Haugen | 9 Aug 21:12 2007
Picon

A bug in inline completion?

Im running GNU Emacs 23.0.0.1

when I do this:

M-x semantic-complete-analyze-inline

It says: Wrong type argument: syntax-table-p, nil

Anyone who knows how to fix this?

What I realy try to get is to make my code completion look like this:

http://insenvim.sourceforge.net/screen_shots.htm

or like this (much better...) :)

http://cedet.sourceforge.net/inlinecompletion.png


--
Sondre
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
cedet-semantic mailing list
cedet-semantic <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-semantic
Eric M. Ludlam | 9 Aug 23:32 2007

Re: A bug in inline completion?

Hi,

  Please do:

M-x toggle-debug-on-error RET

  then make the error appear again.  You can email the stack trace to
help identify this problem.

I'll take a wild guess you are trying to run it in some mode without
semantic support.  (ie, no Senator menu)

Thanks
Eric

>>> "Sondre Haugen" <sondre.haugen <at> gmail.com> seems to think that:
>Im running GNU Emacs 23.0.0.1
>
>when I do this:
>
>M-x semantic-complete-analyze-inline
>
>It says:  Wrong type argument: syntax-table-p, nil
>
>Anyone who knows how to fix this?
>
>What I realy try to get is to make my code completion look like this:
>
>http://insenvim.sourceforge.net/screen_shots.htm
>
>or like this (much better...) :)
>
>http://cedet.sourceforge.net/inlinecompletion.png
>
>
>

--

-- 
          Eric Ludlam:                 zappo <at> gnu.org, eric <at> siege-engine.com
   Home: http://www.ludlam.net            Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net               GNU: www.gnu.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Sondre (gmail | 10 Aug 08:50 2007
Picon

Re: A bug in inline completion?

Hi, and thanks for your answer.

I did as you told me. I dont know how get at Senator menu, because: M-x
senator-minor-menu just says: senator-minor-menu must be bound to an
event with parameters. And if i do M-x senator-minor-mode it says
"Buffer test.rb was not set up for parsing.

Here is the output you asked for:

Debugger entered--Lisp error: (error "Wrong type argument:
syntax-table-p, nil")
  signal(error ("Wrong type argument: syntax-table-p, nil"))
  error("%s" "Wrong type argument: syntax-table-p, nil")
  (condition-case act-on-choice (let (...) (setq
icicle-candidate-action-fn nil) (funcall ... cmd-choice))
(quit(icicle-try-switch-buffer orig-buff) nil)
(error(icicle-try-switch-buffer orig-buff) nil (error "%s" ...)))
  (let* ((orig-buff ...) (orig-window ...) (last-command last-command)
new-last-cmd (icicle-candidate-action-fn ...)) nil (condition-case
act-on-choice (let ... ... ...) (quit ... nil) (error ... nil ...))
(setq this-command new-last-cmd))
  icicle-execute-extended-command()
  call-interactively(icicle-execute-extended-command)

tor, 09.08.2007 kl. 17.32 -0400, skrev Eric M. Ludlam:
> Hi,
> 
>   Please do:
> 
> M-x toggle-debug-on-error RET
> 
>   then make the error appear again.  You can email the stack trace to
> help identify this problem.
> 
> I'll take a wild guess you are trying to run it in some mode without
> semantic support.  (ie, no Senator menu)
> 
> Thanks
> Eric
> 
> 
> >>> "Sondre Haugen" <sondre.haugen <at> gmail.com> seems to think that:
> >Im running GNU Emacs 23.0.0.1
> >
> >when I do this:
> >
> >M-x semantic-complete-analyze-inline
> >
> >It says:  Wrong type argument: syntax-table-p, nil
> >
> >Anyone who knows how to fix this?
> >
> >What I realy try to get is to make my code completion look like this:
> >
> >http://insenvim.sourceforge.net/screen_shots.htm
> >
> >or like this (much better...) :)
> >
> >http://cedet.sourceforge.net/inlinecompletion.png
> >
> >
> >
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Eric M. Ludlam | 10 Aug 12:40 2007

Re: A bug in inline completion?

Hi,

  It appears that your bug is in the icicle package, in addition to
the fact that your major mode (is it ruby?) doesn't have semantic
support yet.  You can get a ruby parser online, but it hasn't been
integrated into cedet/contrib yet.

Eric

>>> "Sondre (gmail)" <sondre.haugen <at> gmail.com> seems to think that:
>Hi, and thanks for your answer.
>
>I did as you told me. I dont know how get at Senator menu, because: M-x
>senator-minor-menu just says: senator-minor-menu must be bound to an
>event with parameters. And if i do M-x senator-minor-mode it says
>"Buffer test.rb was not set up for parsing.
>
>Here is the output you asked for:
>
>Debugger entered--Lisp error: (error "Wrong type argument:
>syntax-table-p, nil")
>  signal(error ("Wrong type argument: syntax-table-p, nil"))
>  error("%s" "Wrong type argument: syntax-table-p, nil")
>  (condition-case act-on-choice (let (...) (setq
>icicle-candidate-action-fn nil) (funcall ... cmd-choice))
>(quit(icicle-try-switch-buffer orig-buff) nil)
>(error(icicle-try-switch-buffer orig-buff) nil (error "%s" ...)))
>  (let* ((orig-buff ...) (orig-window ...) (last-command last-command)
>new-last-cmd (icicle-candidate-action-fn ...)) nil (condition-case
>act-on-choice (let ... ... ...) (quit ... nil) (error ... nil ...))
>(setq this-command new-last-cmd))
>  icicle-execute-extended-command()
>  call-interactively(icicle-execute-extended-command)
>
>
>
>
>tor, 09.08.2007 kl. 17.32 -0400, skrev Eric M. Ludlam:
>> Hi,
>> 
>>   Please do:
>> 
>> M-x toggle-debug-on-error RET
>> 
>>   then make the error appear again.  You can email the stack trace to
>> help identify this problem.
>> 
>> I'll take a wild guess you are trying to run it in some mode without
>> semantic support.  (ie, no Senator menu)
>> 
>> Thanks
>> Eric
>> 
>> 
>> >>> "Sondre Haugen" <sondre.haugen <at> gmail.com> seems to think that:
>> >Im running GNU Emacs 23.0.0.1
>> >
>> >when I do this:
>> >
>> >M-x semantic-complete-analyze-inline
>> >
>> >It says:  Wrong type argument: syntax-table-p, nil
>> >
>> >Anyone who knows how to fix this?
>> >
>> >What I realy try to get is to make my code completion look like this:
>> >
>> >http://insenvim.sourceforge.net/screen_shots.htm
>> >
>> >or like this (much better...) :)
>> >
>> >http://cedet.sourceforge.net/inlinecompletion.png
>> >
>> >
>> >
>> 
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Nathan Hüsken | 25 Aug 02:44 2007

To much completion

Hello dear community,

I type the following in emacs:

#include <stdio.h>

class A
{
public:
    void Function(int a,int b);
};

int min(a,b)
{
    if(a<b)
        return a;
    else
        return ;
}

void A::Function(int a,int b)
{
    this->

At this point  I get completions suggestions:
Function
a
b
min

Function is ok, but a, b and min are garbage.

Is this a known problem or might be something wrong with my configuration?

Thanks!
Nathan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Eric M. Ludlam | 25 Aug 03:55 2007

Re: To much completion

Hi,

  This is because the analyzer doesn't know what "this" is, so it
doesn't know what its methods are.

  I've checked a change into CEDET/CVS in the C support file to add
"this" as a local variable for any method.  Thus, I was able to get
the expected result from your example.  I appended the new function at
the end of this message in case you just want to append it to your
local copy of semantic-c.el.

  Thanks for this concise example, it was helpful.

Eric

>>> =?ISO-8859-15?Q?Nathan_H=FCsken?= <cedet <at> lonely-star.org> seems to think that:
>Hello dear community,
>
>I type the following in emacs:
>
>#include <stdio.h>
>
>class A
>{
>public:
>    void Function(int a,int b);
>};
>
>int min(a,b)
>{
>    if(a<b)
>        return a;
>    else
>        return ;
>}
>
>void A::Function(int a,int b)
>{
>    this->
>
>
>At this point  I get completions suggestions:
>Function
>a
>b
>min
>
>Function is ok, but a, b and min are garbage.
>
>Is this a known problem or might be something wrong with my configuration?
  [ ... ]

(define-mode-local-override semantic-get-local-variables c++-mode ()
  "Do what `semantic-get-local-variables' does, plus add `this' if needed."
  (let* ((origvar (semantic-get-local-variables-default))
	 (ct (semantic-current-tag))
	 (p (semantic-tag-function-parent ct)))
    ;; If we have a function parent, then that implies we can
    (if (and p (semantic-tag-of-class-p ct 'function))
	;; Append a new tag THIS into our space.
	(cons (semantic-tag-new-variable "this" p nil)
	      origvar)
      ;; No parent, just return the usual
      origvar)
    ))

--

-- 
          Eric Ludlam:                 zappo <at> gnu.org, eric <at> siege-engine.com
   Home: http://www.ludlam.net            Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net               GNU: www.gnu.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Eric M. Ludlam | 25 Aug 04:19 2007

Updates to CEDET/CVS

Hello all,

  For those on the cedet-devel list, this is some duplicate
information.

  There have been several changes in CEDET/CVS since pre4 was
released.  One of the reasons I'm posting this is because I believe I
found the completion problem reported here this past spring which was
not reproducible in a small example program.  For large collections of
source, if a baseclass was not found in the databases, an error would
get thrown and caught, but it would disable completion on any members
of the known classes.

  Anyway, suffice it to say, that CEDET/CVS has much better support
for the smart completion feature that pre4 does with this and a couple
other changes.

  Next, for your large piles of C++ source code, there is support
for creating a special cpp-root EDE project.  This project won't
interfere with any existing build system, but allows you to customize
how semantic finds source-code in your project.  Spending some time
setting up a cpp-root project will allow semantic to automatically
find and load the files it needs to make smart completion
reliable... if somewhat slow the first time through.  To try it out,
look in the commentary section of the file ede-cpp-root.el.  Please
send comments on this so I can get the kinks worked out before I put
it in the regular doc path.  Thanks.

  There are also two new commands that were put together as prototypes
based on some questions on the ECB mailing list.  They are:

semantic-ia-fast-jump - analyze the current context, and jump right to
    that tag.

semantic-ia-describe-class - Show all members of some class, including
    those inherited.  You have to type in the name though.

  Using the above new features, I was able to get Semantic to do smart
completion and jumping on almost anything (other than a templated
variable) in my source tree at work, which is a couple gig of C++.

  Be warned though, the first pass through can be a bit slow, and
having such a massive amount of data at it's disposal also makes
semantic slow down.  You can follow one of two options:

  1) Customize `semanticdb-find-default-throttle' to throw out bits
     you don't want.
  2) Disable the `idle' summaries and completion, and bind keys for
     the semantic-ia equivalent commands and just ask for the help
     when you need it.

  Statistics: Right now, for a typical file for me at work, it can
take about 5-10 seconds to find an answer in a a file that has perhaps
100 or so includes (most nested) on a dual A64 Linux box.

  In investigating the speed problems I found several opportunities
for optimization through caching of results.  Managing these caches
requires some core-work to provide the right kind of hooks to make
sure the caches are kept up to date.  Stay tuned.

  Lastly, there is also some new "pulsing" features which are fun.  Try
`pulse-toggle-integration-advice' to pulse stuff outside of semantic,
like the `goto-line' command.

Thanks
Eric

--

-- 
          Eric Ludlam:                 zappo <at> gnu.org, eric <at> siege-engine.com
   Home: http://www.ludlam.net            Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net               GNU: www.gnu.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Nathan Hüsken | 25 Aug 17:25 2007

Autocomplete Tooltip does not stay

Hello,

If I do "semantic-complete-analyze-inline" I get the completion  
tooltip for a brief moment, and than it disappears. If I start writing  
something, it reappears and stays. But it only stays as long there is  
at least one letter of the word to complete.

I searched the mailing list and found other posts about this, but no solution.

Is there something I can do?
Thanks!

Nathan

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Nathan Hüsken | 26 Aug 15:12 2007

Strange completion

Hello,

I found somthing, which semantic completes very strangly:

#include <stdio.h>

class A
{
public:
    void Function(int a,int b);
};

int func(a,b)
{
    A inst;
    binst.
}

Please note, that I made a type error on purpose by writing "binst" 
instead of "inst". In this case, semantic gives me the following 
completions:

<The first completion is empty>
inst
min

Is this fixable?

Thanks!
Nathan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Eric M. Ludlam | 26 Aug 16:29 2007

Re: Strange completion

Hi,

  It appears you are not subscribed to the cedet-semantic mailing
  list.  Non-subscriber email is currently blocked due to all the spam
  that gets through source-forge's filters.  Your mail will go through
  faster if you subscribe.  Thanks.

  Answer below.

>>> =?ISO-8859-15?Q?Nathan_H=FCsken?= <ls <at> lonely-star.org> seems to think that:
>Hello,
>
>I found somthing, which semantic completes very strangly:
>
>#include <stdio.h>
>
>class A
>{
>public:
>    void Function(int a,int b);
>};
>
>int func(a,b)
>{
>    A inst;
>    binst.
>}
>
>
>Please note, that I made a type error on purpose by writing "binst" 
>instead of "inst". In this case, semantic gives me the following 
>completions:
>
><The first completion is empty>
>inst
>min
  [ ... ]

  When semantic fails to identify the prefix, which is "binst" in your
case, it goes off an pretends that it isn't there, thus providing lots
of other completions you might not expect.

  It sounds like what you'd really want is for the user-interface to
take the unknown prefix, and do an ispell-like thing, and suggest
items that are spelled similarly and correctly.

>
>Is this fixable?
  [ ... ]

  We'd have to define what "fixed" is first.

Thanks for the good example.

Eric

--

-- 
          Eric Ludlam:                 zappo <at> gnu.org, eric <at> siege-engine.com
   Home: http://www.ludlam.net            Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net               GNU: www.gnu.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

Gmane