Hello Eric,

many thanks, your patch fixes the problem. No idea where/how to submit a patch though.

Kind regards,
Thomas

2011/2/12 Eric M. Ludlam <eric@siege-engine.com>
Hi,

Short term, you can disable semantic-mru-bookmark-mode which overloads
push-mark.

Better would be to try and debug semantic--tag-similar-types-p in
semantic-c.el to see where the nil is coming from.  It looks like the
type of the first blub is nil, so a patch like this might be needed:

=== modified file 'semantic/bovine/semantic-c.el'
*** semantic/bovine/semantic-c.el       2010-10-21 01:42:27 +0000
--- semantic/bovine/semantic-c.el       2011-02-12 00:27:37 +0000
***************
*** 1888,1896 ****
           (mapcar
           (lambda (tag)
             (let ((type (semantic-tag-type tag)))
!               (unless (stringp type)
!                 (setq type (semantic-tag-name type)))
!               (setq type (semantic-analyze-split-name type))
               (when (stringp type)
                 (setq type (list type)))
               type))
--- 1888,1898 ----
           (mapcar
           (lambda (tag)
             (let ((type (semantic-tag-type tag)))
!               (cond ((semantic-tag-p type)
!                      (setq type (semantic-tag-name type)))
!                     ((stringp type)
!                      (setq type (semantic-analyze-split-name type)))
!                     )
               (when (stringp type)
                 (setq type (list type)))
               type))


If that or something like it works, it would be great if someone could
check in a fix.

Thanks
Eric


On 02/10/2011 11:03 AM, Thomas Karolski wrote:
> Hello there,
>
> I get "Wrong type argument: stringp, nil" as a message whenever I try to
> set a mark, or try to yank something into the body of a c++ function
> definition which has similar parts in a python function. I can reproduce
> it like this:
>
> Create a new buffer called blub.cc and enter the following:
> ---------------------------------------
> template<class Y>
> void blub(Y::Complex rho) {
>      rho = 2;
> }
> --------------------------------------
>
> Afterwards, create another buffer called blub.py and enter the following:
> --------------------------------------
> def blub(rho):
>      rho = 1
> --------------------------------------
>
> Let semantic parse both buffers' function definitions (simply stay
> inside the buffer and let semantic-idle parse the contents). Now try to
> yank something into the c++ function body.
> At this point, the error I get is:
> --------------------------------------
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>    string-match(":" nil 0)
>    split-string(nil ":")
>    semantic-analyze-split-name-c-mode(nil)
>    semantic-analyze-split-name(nil)
>    #[(tag) <Author: binary code omitted>
>    mapcar(#[(tag) <Author: binary code omitted>
>    semantic--tag-similar-types-p-c-mode(("blub" function (:arguments
> (("rho" variable nil (reparse-symbol function_parameters) #<overlay from
> 10 to 13 in blub.py>))) (unlink-copy-hook
> (semantic--tag-unlink-copy-secondary-overlays) link-hook
> (semantic--tag-link-secondary-overlays) unlink-hook
> (semantic--tag-unlink-secondary-overlays) secondary-overlays (#<overlay
> from 1 to 16 in blub.py> #<overlay from 1 to 2 in blub.py> #<overlay
> from 15 to 28 in blub.py>)) #<overlay from 1 to 28 in blub.py>) ("blub"
> function (:template (("Y" type (:type "class") nil nil)) :type "void"
> :arguments (("rho" variable (:type ("Y::Complex" type (:type "class")
> nil nil)) (reparse-symbol arg-sub-list) #<overlay from 29 to 44 in
> blub.cc>))) (unlink-copy-hook
> (semantic--tag-unlink-copy-secondary-overlays) link-hook
> (semantic--tag-link-secondary-overlays) unlink-hook
> (semantic--tag-unlink-secondary-overlays) secondary-overlays (#<overlay
> from 1 to 19 in blub.cc> #<overlay from 1 to 2 in blub.cc> #<overlay
> from 18 to 61 in blub.cc>)) #<overlay from 1 to 61 in blub.cc>))
>    semantic--tag-similar-types-p(("blub" function (:arguments (("rho"
> variable nil (reparse-symbol function_parameters) #<overlay from 10 to
> 13 in blub.py>))) (unlink-copy-hook
> (semantic--tag-unlink-copy-secondary-overlays) link-hook
> (semantic--tag-link-secondary-overlays) unlink-hook
> (semantic--tag-unlink-secondary-overlays) secondary-overlays (#<overlay
> from 1 to 16 in blub.py> #<overlay from 1 to 2 in blub.py> #<overlay
> from 15 to 28 in blub.py>)) #<overlay from 1 to 28 in blub.py>) ("blub"
> function (:template (("Y" type (:type "class") nil nil)) :type "void"
> :arguments (("rho" variable (:type ("Y::Complex" type (:type "class")
> nil nil)) (reparse-symbol arg-sub-list) #<overlay from 29 to 44 in
> blub.cc>))) (unlink-copy-hook
> (semantic--tag-unlink-copy-secondary-overlays) link-hook
> (semantic--tag-link-secondary-overlays) unlink-hook
> (semantic--tag-unlink-secondary-overlays) secondary-overlays (#<overlay
> from 1 to 19 in blub.cc> #<overlay from 1 to 2 in blub.cc> #<overlay
> from 18 to 61 in blub.cc>)) #<overlay from 1 to 61 in blub.cc>))
>    semantic-tag-similar-p-default(("blub" function (:arguments (("rho"
> variable nil (reparse-symbol function_parameters) #<overlay from 10 to
> 13 in blub.py>))) (unlink-copy-hook
> (semantic--tag-unlink-copy-secondary-overlays) link-hook
> (semantic--tag-link-secondary-overlays) unlink-hook
> (semantic--tag-unlink-secondary-overlays) secondary-overlays (#<overlay
> from 1 to 16 in blub.py> #<overlay from 1 to 2 in blub.py> #<overlay
> from 15 to 28 in blub.py>)) #<overlay from 1 to 28 in blub.py>) ("blub"
> function (:template (("Y" type (:type "class") nil nil)) :type "void"
> :arguments (("rho" variable (:type ("Y::Complex" type (:type "class")
> nil nil)) (reparse-symbol arg-sub-list) #<overlay from 29 to 44 in
> blub.cc>))) (unlink-copy-hook
> (semantic--tag-unlink-copy-secondary-overlays) link-hook
> (semantic--tag-link-secondary-overlays) unlink-hook
> (semantic--tag-unlink-secondary-overlays) secondary-overlays (#<overlay
> from 1 to 19 in blub.cc> #<overlay from 1 to 2 in blub.cc> #<overlay
> from 18 to 61 in blub.cc>)) #<overlay from 1 to 61 in blub.cc>) nil)
>    semantic-tag-similar-p(("blub" function (:arguments (("rho" variable
> nil (reparse-symbol function_parameters) #<overlay from 10 to 13 in
> blub.py>))) (unlink-copy-hook
> (semantic--tag-unlink-copy-secondary-overlays) link-hook
> (semantic--tag-link-secondary-overlays) unlink-hook
> (semantic--tag-unlink-secondary-overlays) secondary-overlays (#<overlay
> from 1 to 16 in blub.py> #<overlay from 1 to 2 in blub.py> #<overlay
> from 15 to 28 in blub.py>)) #<overlay from 1 to 28 in blub.py>) ("blub"
> function (:template (("Y" type (:type "class") nil nil)) :type "void"
> :arguments (("rho" variable (:type ("Y::Complex" type (:type "class")
> nil nil)) (reparse-symbol arg-sub-list) #<overlay from 29 to 44 in
> blub.cc>))) (unlink-copy-hook
> (semantic--tag-unlink-copy-secondary-overlays) link-hook
> (semantic--tag-link-secondary-overlays) unlink-hook
> (semantic--tag-unlink-secondary-overlays) secondary-overlays (#<overlay
> from 1 to 19 in blub.cc> #<overlay from 1 to 2 in blub.cc> #<overlay
> from 18 to 61 in blub.cc>)) #<overlay from 1 to 61 in blub.cc>))
>    #[(sbr point &optional reason) <Author: binary code omitted>
>    push-mark(nil nil t)
>    push-mark-command(nil)
>    set-mark-command(nil)
>    (if (not (wholenump (prefix-numeric-value arg))) (icicle-goto-marker)
> (setq this-command (quote set-mark-command)) (set-mark-command arg))
>    icicle-goto-marker-or-set-mark-command(nil)
>    call-interactively(icicle-goto-marker-or-set-mark-command nil nil)
> --------------------------------------
>
> I'm using svn emacs and bzr cedet.
>
> My guess is, semantic tries to parse the argument for the c++ function
> from the python definition - and makes assumptions on the syntax that
> the definition should have. Since the syntax is different (its python
> code after all), the semantic analyzer throws errors.
> Anyone else who's got this problem?
>
> Kind regards
> Thomas
>
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
>
>
>
> _______________________________________________
> cedet-semantic mailing list
> cedet-semantic@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cedet-semantic

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
cedet-semantic mailing list
cedet-semantic@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-semantic