Eric M. Ludlam | 1 Feb 02:31
Picon
Gravatar

Re: [bump] semantic-complete-self-insert not working

Hi,

   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)))
(Continue reading)

Eric M. Ludlam | 1 Feb 02:39
Picon
Gravatar

Re: Help on tests needed

Hi,

My first look into this shows that comment-start-skip isn't defined for 
whichever python mode I have installed (the default), which is used to 
identify test blocks.  Since it is nil, it appears to still find your 
first completion test.

Unfortunately, it then places the cursor after the # which, of course, 
has no completion.

When I forced comment-start-skip to be "#" it found some completions. 
Of course, setting comment-start-skip should be part of python.el, but 
it could be put into the wisent python support as backup, though the 
real value should be "#\\s-*" or something like that.

Eric

On 01/31/2012 12:56 PM, Thomas Bach wrote:
> Hi there,
>
> I tried to write my first test today for the python import statements
> and couldn't get them to work. Here is what I did:
>
> 1) I created a new file semantic/tests/testpyimports.py:
>     #+BEGIN_SRC python
> ############################################################
> # -*- coding: utf-8 -*-
> #
> # Testing imports for Python
>
(Continue reading)

Thomas Bach | 1 Feb 17:25
Picon
Picon
Favicon

[PATCH] comment-start-skip (was Re: Help on tests needed)


Hi there,

"Eric M. Ludlam" <ericludlam <at> gmail.com> writes:

> My first look into this shows that comment-start-skip isn't defined
> for whichever python mode I have installed (the default), which is
> used to identify test blocks.
> […]
> When I forced comment-start-skip to be "#" it found some
> completions. Of course, setting comment-start-skip should be part of
> python.el, but it could be put into the wisent python support as
> backup, though the real value should be "#\\s-*" or something like
> that.

I just hacked around a bit and came up with the following solution:

=== modified file 'semantic/wisent/wisent-python.el'
--- semantic/wisent/wisent-python.el	2012-01-29 14:53:58 +0000
+++ semantic/wisent/wisent-python.el	2012-02-01 16:06:26 +0000
@@ -434,6 +434,9 @@
   "Setup buffer for parse."
   (wisent-python-wy--install-parser)
   (set (make-local-variable 'parse-sexp-ignore-comments) t)
+  ;; Give python modes the possibility to overwrite this: 
+  (if (not comment-start-skip)
+      (set (make-local-variable 'comment-start-skip) "#+\\s-*"))
   (setq
    ;; Character used to separation a parent/child relationship
    semantic-type-relation-separator-character '(".")
(Continue reading)

Gravatar

Re: [PATCH] comment-start-skip (was Re: Help on tests needed)


Hello Vince,
Thomas Bach <thbach <at> students.uni-mainz.de> writes:
[...]
>
> === modified file 'semantic/wisent/wisent-python.el'
> --- semantic/wisent/wisent-python.el	2012-01-29 14:53:58 +0000
> +++ semantic/wisent/wisent-python.el	2012-02-01 16:06:26 +0000
> @@ -434,6 +434,9 @@
>    "Setup buffer for parse."
>    (wisent-python-wy--install-parser)
>    (set (make-local-variable 'parse-sexp-ignore-comments) t)
> +  ;; Give python modes the possibility to overwrite this: 
> +  (if (not comment-start-skip)
> +      (set (make-local-variable 'comment-start-skip) "#+\\s-*"))
>    (setq
>     ;; Character used to separation a parent/child relationship
>     semantic-type-relation-separator-character '(".")
>
>
> That makes the test work for me. I didn't quite get the idea of
> `comment-start-skip'. I hope it looks reasonable anyway. If it does I'll
> contact the author of python.el. Maybe I can get this moved…  Haven't
> had a look in python-mode.el yet. Can someone look if this variable can
> be found there?

python-mode.el does have this variable set, but to a different value
(set (make-local-variable 'comment-start-skip) "^[ \t]*#+ *")

>
(Continue reading)

Andrzej Pronobis | 2 Feb 12:46
Picon
Gravatar

Re: [bump] semantic-complete-self-insert not working

Hi,

Thanks! This fix seems to work for me. Please let me know if you want
me to debug something more.

Cheers,
Andrzej

On Wed, Feb 1, 2012 at 2:31 AM, Eric M. Ludlam <ericludlam <at> gmail.com> wrote:
> Hi,
>
>  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.
(Continue reading)

Dr Mark H Phillips | 1 Feb 02:19
Picon

latest emacs - no semantic tag folding mode?

Hi,

I'm somewhat new to CEDET and ECB, but I've managed to get them both 
working more or less by installing a very recent emacs (which includes 
CEDET I believe) and a recent ECB.

I want to get semantic tag folding to work, but when I followed 
instructions and put

   (global-semantic-tag-folding-mode 1)

in my .emacs, it failed, with emacs reporting:

   Symbol's function definition is void: global-semantic-tag-folding-mode

I'm using a very recent emacs (version 24.0.92.1) under Ubuntu (using 
the Damien Cassou PPA emacs-snapshot).  I'm also using a recent ECB 
(version 2.40.1) which I manually installed.

Has the method of activating semantic tag folding changed as part of 
integrating CEDET into the emacs distribution?

(Further info... A right mouse click brings up a "Highlight-Func Mode" 
context window which has a "Fold Tag" option, but this doesn't seem to 
do anything.)

Regards,

Mark.

(Continue reading)

Dr Mark H Phillips | 3 Feb 00:47
Picon

latest emacs - no semantic tag folding mode?

Hi,

I'm somewhat new to CEDET and ECB, but I've managed to get them both 
working more or less by installing a very recent emacs (which includes 
CEDET I believe) and a recent ECB.

I want to get semantic tag folding to work, but when I followed 
instructions and put

   (global-semantic-tag-folding-mode 1)

in my .emacs, it failed, with emacs reporting:

   Symbol's function definition is void: global-semantic-tag-folding-mode

I'm using a very recent emacs (version 24.0.92.1) under Ubuntu (using 
the Damien Cassou PPA emacs-snapshot).  I'm also using a recent ECB 
(version 2.40.1) which I manually installed.

Has the method of activating semantic tag folding changed as part of 
integrating CEDET into the emacs distribution?

(Further info... A right mouse click brings up a "Highlight-Func Mode" 
context window which has a "Fold Tag" option, but this doesn't seem to 
do anything.)

Regards,

Mark.

(Continue reading)

Eric M. Ludlam | 3 Feb 14:19
Picon
Gravatar

Re: latest emacs - no semantic tag folding mode?

Hi,

   Semantic-tag-folding-mode isn't a part of Emacs for legal reasons, 
but you can probably get a copy from the CEDET repository (from bzr, 
newtrunk), and have it work ok from the versions installed with Emacs.

http://cedet.bzr.sourceforge.net/bzr/cedet/code/newtrunk/files/head%3A/contrib/

   The fold tag entry is not related to tag folding mode, though it uses 
similar feature under the covers.

Good Luck
Eric

On 02/02/2012 06:47 PM, Dr Mark H Phillips wrote:
> Hi,
>
> I'm somewhat new to CEDET and ECB, but I've managed to get them both
> working more or less by installing a very recent emacs (which includes
> CEDET I believe) and a recent ECB.
>
> I want to get semantic tag folding to work, but when I followed
> instructions and put
>
>     (global-semantic-tag-folding-mode 1)
>
> in my .emacs, it failed, with emacs reporting:
>
>     Symbol's function definition is void: global-semantic-tag-folding-mode
>
(Continue reading)

Alex Ott | 3 Feb 18:54
Picon
Gravatar

newtrunk?

Hello all

I today switched to newtrunk and noticed that
semantic-ia-complete-symbol-menu function doesn't exist anymore. What
could be used instead of it?

P.S. I also committed 2 small fixes: in semantic/bovine/clang.el -
incorrect feature was provided & in contrib/eassist.el we need to
require 'cl when compile, otherwise it will fail on load, because `do'
isn't available

--

-- 
With best wishes,                    Alex Ott
http://alexott.net/
Tiwtter: alexott_en (English), alexott (Russian)
Skype: alex.ott

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
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-dev2
Alex Ott | 4 Feb 23:11
Picon
Gravatar

Re: newtrunk?

Hi all

One more question on newtrunk - how it's better to make changes to
CEDET - commit to both branches, or commit to one, and than merge
together with other patches into newtrunk? I'm asking, because I made
some changes into documentation in trunk (2 weeks ago) and think, that
they could be also useful in newtrunk...

On Fri, Feb 3, 2012 at 6:54 PM, Alex Ott <alexott <at> gmail.com> wrote:
> Hello all
>
> I today switched to newtrunk and noticed that
> semantic-ia-complete-symbol-menu function doesn't exist anymore. What
> could be used instead of it?
>
> P.S. I also committed 2 small fixes: in semantic/bovine/clang.el -
> incorrect feature was provided & in contrib/eassist.el we need to
> require 'cl when compile, otherwise it will fail on load, because `do'
> isn't available
>
> --
> With best wishes,                    Alex Ott
> http://alexott.net/
> Tiwtter: alexott_en (English), alexott (Russian)
> Skype: alex.ott

--

-- 
With best wishes,                    Alex Ott
http://alexott.net/
Tiwtter: alexott_en (English), alexott (Russian)
(Continue reading)


Gmane