Masatake YAMATO | 1 May 2003 08:49

Re: completion in semantic

> That's an interesting idea.  A good way to do it is to make a
> subclass of `semantic-displayor-abstract', and add your method there.
> 
> I'm hoping to have several displayors, and allow the user to select
> their favorite.  Yours would be a viable option there.

I've tried. I'm new to eieio, so I'm afraid I've taken stupid mistake.
I've change semantic-complete-read-tag-buffer-deep to test tooltip.

I've tested on GNU Emacs at the HEAD of subversions.gnu.org CVS
repository.

BTW, eieio is really cool. How do you think to add GtkObject/GObject's 
signal like mechanism to eieio? (We will call it `hook'.)

Regards,
Masatake YAMATO

Index: semantic-complete.el
===================================================================
RCS file: /cvsroot/cedet/cedet/semantic/semantic-complete.el,v
retrieving revision 1.4
diff -u -r1.4 semantic-complete.el
--- semantic-complete.el	26 Apr 2003 18:51:06 -0000	1.4
+++ semantic-complete.el	1 May 2003 06:41:37 -0000
 <at>  <at>  -309,7 +309,7  <at>  <at> 
 HISTORY is a symbol representing a variable to story the history in."
   (semantic-complete-read-tag-engine
    (semantic-collector-buffer-deep prompt :buffer (current-buffer))
-   (semantic-displayor-traditional "simple")
(Continue reading)

Eric M. Ludlam | 1 May 2003 18:00
Gravatar

Re[2]: completion in semantic

>>> Masatake YAMATO <jet <at> gyve.org> seems to think that:
>> That's an interesting idea.  A good way to do it is to make a
>> subclass of `semantic-displayor-abstract', and add your method there.
>> 
>> I'm hoping to have several displayors, and allow the user to select
>> their favorite.  Yours would be a viable option there.
>
>I've tried. I'm new to eieio, so I'm afraid I've taken stupid mistake.
>I've change semantic-complete-read-tag-buffer-deep to test tooltip.

Great stuff.  I will try it out when I get back on an X console.

I'm adding a focusing displayor to semantic-complete.el right now.
When I finish it, I will merge your changes.  In particular, I need
to add a configuration variable so you can choose your favorite
display mechanism.

I think this displayor will be perfect for in-buffer completion of
symbols.

>I've tested on GNU Emacs at the HEAD of subversions.gnu.org CVS
>repository.
>
>BTW, eieio is really cool. How do you think to add GtkObject/GObject's 
>signal like mechanism to eieio? (We will call it `hook'.)
  [ ... ]

EIEIO is a port of CLOS, and extended where appropriate for Emacs
facilities like custom, or lack of appropriate CL constructs.

(Continue reading)

Eric M. Ludlam | 2 May 2003 05:12
Gravatar

Focusing completion engine

Hi all,

  I checked in changes to semantic-complete that I'd been working on
for a little while.  I added the `focus' concept to the displayor
class.  The new focus baseclass has basic focusing code in it, and
the concrete class `semantic-displayor-traditional-with-focus-highlight'
multiply inherits.

  Thus if you run `semantic-complete-test', each subsequent complete
cycles through completion, show completions, then focus on one
element by highlighting it in the buffer.  It's kind of spiffy.  I
suspect there is a bug or two hiding in there still, but I'm tired.

  Add to this the work I checked in a while ago for default values,
and you've got a pretty nifty completing prompt.

  I still need to concoct a way to configure which collector and
displayor you may customize for a given task, and then merge in
Masatake's tooltip version.  The tooltip version will be nifty for
in-buffer completion.

Have fun
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

-------------------------------------------------------
(Continue reading)

Stuart Popejoy | 3 May 2003 00:09

Re: Focusing completion engine

Hi everyone,

I'm using semantic-complete on xemacs. Well, trying anyway :). Xemacs
lacks `minibuffer-contents' and `compare-strings', so I was trying to
dive in to re-implement semantic-complete in a compatible way.

With regard to `compare-strings', it seems that the two uses of
compare-strings I found in semantic could be made compatible using
string= and substring, plus some (admittedly annoying) length checks:

Index: semantic-find.el
===================================================================
RCS file: /cvsroot/cedet/cedet/semantic/semantic-find.el,v
retrieving revision 1.11
diff -r1.11 semantic-find.el
288c288,289
<   `(let ((l (length ,prefix)))
---
>   `(let ((l (length ,prefix))
>          tagstr)
290,293c291,295
<       (eq (compare-strings ,prefix 0 nil
< 			   (semantic-tag-name (car tags)) 0 l
< 			   semantic-case-fold)
< 	  t)
---
>       (progn
>         (setq tagstr (semantic-tag-name (car tags)))
>         (and (>= (length tagstr) l)
>              (string= ,prefix
(Continue reading)

Ole Laursen | 3 May 2003 19:40
Picon
Favicon

Parser library project

Hi,

It seems someone from the Gnome community has been working on a
project for developing a parser library for IDEs (probably intended
for Anjuta, a Gnome IDE):

  http://sourcebase.sourceforge.net/

An introducing mail to the desktop development list:

  http://mail.gnome.org/archives/desktop-devel-list/2003-May/msg00050.html

I don't know if this would change anything or whether it would be
possible to share some efforts (perhaps it is still to early to tell),
but I thought people here might find it interesting anyway.

--

-- 
Ole Laursen
http://www.cs.auc.dk/~olau/

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Eric M. Ludlam | 6 May 2003 06:22
Gravatar

Re[2]: Focusing completion engine

>>> Stuart Popejoy <stuart <at> pinksheets.com> seems to think that:
  [ ... ]
>
>
>As for `minibuffer-contents', I was wondering: why
>`read-from-minibuffer' needed to be used with a keymap when
>`completing-read' with a completion function could work just as well?
>Using `completing-read' would obviate the need to set "next-action"
>symbols and such. I've just started trying to implement that as follows:
>
>first, call `completing-read' instead of `read-from-minibuffer' in
>`semantic-complete-read-tag-engine':
>
  [ ... ]

I will try to answer other parts of this mail later, but for now, I
will answer this question.

If you use completing-read, you cannot customize (as far as I know)
how completions are displayed.  You always get the default boring list
'o completions.  Because tags are based in an environment friendly to
Emacs, I wanted to experiment with different and interesting ways to
complete and focus.  Semantic 1.4 senator does a good job of
differentiating tags with the same name.  I think there are other ways
too, and wanted to build an environment where experimentation in this
area is easy so we can experiment end up with the spiffiest prompt
possible.

>Then, define the function. This is a start but it doesn't move through
>the source buffer yet. In fact I'm quite impressed and mystified how
(Continue reading)

Stuart Popejoy | 6 May 2003 16:56

Re: Re[2]: Focusing completion engine

On Tue, 2003-05-06 at 00:22, Eric M. Ludlam wrote:
> >>> Stuart Popejoy <stuart <at> pinksheets.com> seems to think that:
>   [ ... ]
> >
> >
> >As for `minibuffer-contents', I was wondering: why
> >`read-from-minibuffer' needed to be used with a keymap when
> >`completing-read' with a completion function could work just as well?
> >Using `completing-read' would obviate the need to set "next-action"
> >symbols and such. I've just started trying to implement that as follows:
> >
> >first, call `completing-read' instead of `read-from-minibuffer' in
> >`semantic-complete-read-tag-engine':
> >
>   [ ... ]
> 
> I will try to answer other parts of this mail later, but for now, I
> will answer this question.
> 
> If you use completing-read, you cannot customize (as far as I know)
> how completions are displayed.  You always get the default boring list
> 'o completions.  Because tags are based in an environment friendly to
> Emacs, I wanted to experiment with different and interesting ways to
> complete and focus.  Semantic 1.4 senator does a good job of
> differentiating tags with the same name.  I think there are other ways
> too, and wanted to build an environment where experimentation in this
> area is easy so we can experiment end up with the spiffiest prompt
> possible.
> 

(Continue reading)

Eric M. Ludlam | 7 May 2003 04:22
Gravatar

Re[2]: Focusing completion engine

>>> Stuart Popejoy <stuart <at> pinksheets.com> seems to think that:
>Hi everyone,
>
>I'm using semantic-complete on xemacs. Well, trying anyway :). Xemacs
>lacks `minibuffer-contents' and `compare-strings', so I was trying to
>dive in to re-implement semantic-complete in a compatible way.
>
>With regard to `compare-strings', it seems that the two uses of
>compare-strings I found in semantic could be made compatible using
>string= and substring, plus some (admittedly annoying) length checks:

Ug.  What is the best way to compare substrings?  Calling substring
performs an allocation.  Does XEmacs have a compare-strings type
function that we can use?

  [ ... ]
>At least for `compare-strings', it's
>not possible to specify case matching, so maybe there's a better way?
  [ ... ]

compare-strings has a flag to ignore case.  String= does not.

I explicitly stopped using regular expressions for this type of
string comparison after testing against the regexp based
implementation.  Naturally, compare-strings was faster.

David has written an implementation of compare-strings for use in
XEmacs a while back for eieio.  Later I switched to using a better
file based function so it isn't being used there.  It could be placed
in the common area.
(Continue reading)

Eric M. Ludlam | 7 May 2003 04:37
Gravatar

Re[1]: Parser library project

>>> Ole Laursen <olau <at> hardworking.dk> seems to think that:
>Hi,
>
>It seems someone from the Gnome community has been working on a
>project for developing a parser library for IDEs (probably intended
>for Anjuta, a Gnome IDE):
>
>  http://sourcebase.sourceforge.net/
>
>An introducing mail to the desktop development list:
>
>  http://mail.gnome.org/archives/desktop-devel-list/2003-May/msg00050.html
>
>I don't know if this would change anything or whether it would be
>possible to share some efforts (perhaps it is still to early to tell),
>but I thought people here might find it interesting anyway.

That is quite spiffy.  If a good plug-in/stand alone API is built with
replaceable storage back ends, having them generate semantic usable
tags information would not be very hard.  Tracking his progress would
seem to be a good idea.

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

-------------------------------------------------------
(Continue reading)

Masatake YAMATO | 7 May 2003 05:11

variable arguments(...)

C lang's variable expressed as "..." is supported in semantic?
I got an error when I do C-xC-f.
I've attached the backtrace to this mail.

The file I loaded is linux-2.4.20/arch/i386/boot/tools/build.c:
/*
 *  $Id: build.c,v 1.5 1997/05/19 12:29:58 mj Exp $
 *
 *  Copyright (C) 1991, 1992  Linus Torvalds
 *  Copyright (C) 1997 Martin Mares
 */

/*
 * This file builds a disk-image from three different files:
 *
 * - bootsect: exactly 512 bytes of 8086 machine code, loads the rest
 * - setup: 8086 machine code, sets up system parm
 * - system: 80386 code for actual system
 *
 * It does some checking that all files are of the correct type, and
 * just writes the result to stdout, removing headers and padding to
 * the right amount. It also writes some system data to stderr.
 */

/*
 * Changes by tytso to allow root device specification
 * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
 * Cross compiling fixes by Gertjan van Wingerde, July 1996
 * Rewritten by Martin Mares, April 1997
 */
(Continue reading)


Gmane