Eric M. Ludlam | 7 Oct 2008 03:55
Gravatar

semantic-ia updates

Hi,

  I've updated semantic-ia.el with many more comments.  Hopefully this
will help those interested in getting started programming utilities
with the Semantic analyzer easier.

  As a bonus, `semantic-ia-fast-jump' will now preference
implementations of the destination tag instead of always jumping to
the first prototype it finds.

  This uses the reference analyzer I had mentioned a couple weeks
back.  It won't always work, so in those cases it should continue to
use the prototype.

  I need to devise a way to get Semantic to find and parse more files.
I have a couple ideas, but welcome any new thoughts for anyone who
tries this, but still fails to jump to the desired implementation.

Enjoy
Eric

--

-- 
          Eric Ludlam:                       eric <at> siege-engine.com
   Siege: www.siege-engine.com          Emacs: http://cedet.sourceforge.net

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
(Continue reading)

Eric M. Ludlam | 15 Oct 2008 04:11
Gravatar

Experimental exuberant ctags parsing backend

Hello all,

  Now in CEDET/CVS is an experimental ctags parsing database backend.
I have only gotten support for C/C++ so far.

  The parsing engine appears in the cedet/semantic/ctags directory.
When enabled, it works by using ctags to parse files not in an Emacs
buffer, and it uses the Emacs parser once a file is loaded into a
buffer.  Ctags is a very fast parser, so offloading this parsing step
makes initial parsing of a project very fast.

  It would be great if a few folks would give it a try, or even add a
some more language support.

  To give it a try, do this:

1) Get the latest from CVS
2) Type:   M-x semantic-enable-exuberent-ctags RET c-mode RET

OR add this to your .emacs file:

(semantic-enable-exuberent-ctags 'c-mode)
(semantic-enable-exuberent-ctags 'c++-mode)

  This feature uses ctags to parse files on the fly, and does not read
in pre-parsed tag files, so there is no need do create TAGS files.

  Let me know how it goes.

Enjoy
(Continue reading)

Bruce Stephens | 15 Oct 2008 19:53
Picon
Picon

Re: Experimental exuberant ctags parsing backend

"Eric M. Ludlam" <eric <at> siege-engine.com> writes:

>   Now in CEDET/CVS is an experimental ctags parsing database backend.
> I have only gotten support for C/C++ so far.

You've got:

(defcustom semantic-ectag-program "~/src/ctags-5.7/ctags" ; "ctags"
  "The Exuberent CTags program to use."
  :group 'semantic
  :type 'file)

Probably "ctags" is the better default!

Also

> (semantic-enable-exuberent-ctags 'c-mode)
> (semantic-enable-exuberent-ctags 'c++-mode)

doesn't work for me.  The function only takes strings.  (Presumably
that's a bug.  Not a significant problem, anyway.)

I get a background error with flymake-mode.  I have flymake-mode
configured so it doesn't operate on filenames with "flymake" in them,
and semantic-inhibit-functions set appropriately to ignore the same
buffers, but I saw errors when semantic was trying to run ctags on
flymake files, so I guess semantic-inhibit-functions isn't being used
properly for the new feature?

[...]
(Continue reading)

Eric M. Ludlam | 16 Oct 2008 02:44
Gravatar

Re: Experimental exuberant ctags parsing backend

>>> Bruce Stephens <bruce+cedet <at> cenderis.demon.co.uk> seems to think that:
>"Eric M. Ludlam" <eric <at> siege-engine.com> writes:
>
>>   Now in CEDET/CVS is an experimental ctags parsing database backend.
>> I have only gotten support for C/C++ so far.
>
>You've got:
>
>(defcustom semantic-ectag-program "~/src/ctags-5.7/ctags" ; "ctags"
>  "The Exuberent CTags program to use."
>  :group 'semantic
>  :type 'file)
>
>Probably "ctags" is the better default!

Heh, thanks for pointing that out.

>Also
>
>> (semantic-enable-exuberent-ctags 'c-mode)
>> (semantic-enable-exuberent-ctags 'c++-mode)
>
>doesn't work for me.  The function only takes strings.  (Presumably
>that's a bug.  Not a significant problem, anyway.)

Thanks for pointing that out too.  I had also discovered that late
this afternoon, and have checked in a fix.

>I get a background error with flymake-mode.  I have flymake-mode
>configured so it doesn't operate on filenames with "flymake" in them,
(Continue reading)

Alex Ott | 16 Oct 2008 16:28
Picon
Gravatar

patch for error handling

Hello

Some time ago i found, that cedet's routines break loading of desktop file
with errors like "Buffer ... wasn't set for parsing", etc.  These errors
lead to stopping load of desktop file, so it doesn't restored completely. 
Attached file add error handlers to some places, please review it, and
apply if all ok


--

-- 
With best wishes, Alex Ott, MBA
http://alexott.blogspot.com/           http://xtalk.msk.su/~ott/
http://alexott-ru.blogspot.com/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Eric M. Ludlam | 16 Oct 2008 19:47
Gravatar

Re: patch for error handling

Hi,

  Your patch makes some sense, but I have to wonder why these modes
are starting up at all.  They should only run if semantic-init-hooks
are run, and that should only happen if a buffer is set up for
parsing.

  Do you know how Semantic gets into that state?

  I don't use desktop, so have not encountered this issue.

Eric

>>> Alex Ott <alexott <at> gmail.com> seems to think that:
>Hello
>
>Some time ago i found, that cedet's routines break loading of desktop file
>with errors like "Buffer ... wasn't set for parsing", etc.  These errors
>lead to stopping load of desktop file, so it doesn't restored completely. 
>Attached file add error handlers to some places, please review it, and
>apply if all ok
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Alex Ott | 16 Oct 2008 20:04
Picon
Gravatar

Re: patch for error handling

Hello

In my setup, i first load all modes, and only after this i restore old
configuration with desktop, that loads files, registers, etc.  May be when
restoring C++ source files, semantic initialisation is happened?

>>>>> "EML" == Eric M Ludlam writes:
 EML> Hi, Your patch makes some sense, but I have to wonder why these modes
 EML> are starting up at all.  They should only run if semantic-init-hooks
 EML> are run, and that should only happen if a buffer is set up for
 EML> parsing.

 EML>   Do you know how Semantic gets into that state?

 EML>   I don't use desktop, so have not encountered this issue.

 EML> Eric

 > Alex Ott <alexott <at> gmail.com> seems to think that:
 >> Hello
 >> 
 >> Some time ago i found, that cedet's routines break loading of desktop
 >> file with errors like "Buffer ... wasn't set for parsing", etc.  These
 >> errors lead to stopping load of desktop file, so it doesn't restored
 >> completely.  Attached file add error handlers to some places, please
 >> review it, and apply if all ok
 >> 

--

-- 
With best wishes, Alex Ott, MBA
(Continue reading)

Alex Ott | 19 Oct 2008 16:06
Picon
Gravatar

Re: patch for error handling

Hello

Thanks for patch, i'll check it tomorrow at work

On Sun, Oct 19, 2008 at 3:45 PM, Eric M. Ludlam <eric <at> siege-engine.com> wrote:
> Hi,
>
>  I checked into CVS a small patch to semantic-util-modes which
> disables desktop for semantic minor modes.  There is likely a better
> trick I could use instead of a disable, and to instead re-enable after
> semantic has been setup again.  Perhaps someone who uses the desktop
> package can work on that?
>
> The new code is in semantic-util-modes.el in `semantic-add-minor-mode'.
>
> Eric
>
>>>> Alex Ott <alexott <at> gmail.com> seems to think that:
>>Hello
>>
>>In my setup, i first load all modes, and only after this i restore old
>>configuration with desktop, that loads files, registers, etc.  May be when
>>restoring C++ source files, semantic initialisation is happened?
>>
>>>>>>> "EML" == Eric M Ludlam writes:
>> EML> Hi, Your patch makes some sense, but I have to wonder why these modes
>> EML> are starting up at all.  They should only run if semantic-init-hooks
>> EML> are run, and that should only happen if a buffer is set up for
>> EML> parsing.
>>
(Continue reading)

Eric M. Ludlam | 19 Oct 2008 15:45
Gravatar

Re: patch for error handling

Hi,

  I checked into CVS a small patch to semantic-util-modes which
disables desktop for semantic minor modes.  There is likely a better
trick I could use instead of a disable, and to instead re-enable after
semantic has been setup again.  Perhaps someone who uses the desktop
package can work on that?

The new code is in semantic-util-modes.el in `semantic-add-minor-mode'.

Eric

>>> Alex Ott <alexott <at> gmail.com> seems to think that:
>Hello
>
>In my setup, i first load all modes, and only after this i restore old
>configuration with desktop, that loads files, registers, etc.  May be when
>restoring C++ source files, semantic initialisation is happened?
>
>>>>>> "EML" == Eric M Ludlam writes:
> EML> Hi, Your patch makes some sense, but I have to wonder why these modes
> EML> are starting up at all.  They should only run if semantic-init-hooks
> EML> are run, and that should only happen if a buffer is set up for
> EML> parsing.
>
> EML>   Do you know how Semantic gets into that state?
>
> EML>   I don't use desktop, so have not encountered this issue.
>
> EML> Eric
(Continue reading)

Alex Ott | 20 Oct 2008 09:08
Picon
Gravatar

Re: patch for error handling

Hello Eric

Desktop doesn't check value of function, that you provide to
desktop-minor-mode-handlers, so when it restore buffers, load is failed.
It's better to use dummy function, like this:

(defun my-desktop-ignore-semantic (desktop-buffer-file-name)
       "Function to ignore cedet minor modes during restore of buffers"
       nil)

With this function, all works fine

 EML> Hi, I checked into CVS a small patch to semantic-util-modes which
 EML> disables desktop for semantic minor modes.  There is likely a better
 EML> trick I could use instead of a disable, and to instead re-enable
 EML> after semantic has been setup again.  Perhaps someone who uses the
 EML> desktop package can work on that?

 EML> The new code is in semantic-util-modes.el in
 EML> `semantic-add-minor-mode'.

--

-- 
With best wishes, Alex Ott, MBA
http://alexott.blogspot.com/           http://xtalk.msk.su/~ott/
http://alexott-ru.blogspot.com/

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
(Continue reading)


Gmane