Hi Eric & David,

Logically, I don't see any difference between 'semantic-symref' and 'semantic-symref-symbol because eventually they both call 'cedet-gnu-global-search (searchtext texttype type scope)' with exactly the same arguments. In both cases, the arguments are: texttype=symbol, type=line, scope=project. So, what's the difference between these two command?

On the other hand, regarding my previous complaint of 'semantic-symref-symbol' command not working for me, I have figured out the reason. Since the symbol I searched for was a C++ class member variable, and it seems that the GNU Global doesn't consider member variable as 'TAG' thus member variable were never put into the file 'GTAGS', which was the reason why neither 'semantic-symref-symbol' nor 'semantic-symref' could find it. As an experiment, I changed the'cedet-gnu-global-search':

(defun cedet-gnu-global-search (searchtext texttype type scope)
  "Perform a search with GNU Global, return the created buffer.
SEARCHTEXT is text to find.
TEXTTYPE is the type of text, such as 'regexp, 'string, 'tagname,
'tagregexp, or 'tagcompletions.
TYPE is the type of search, meaning that SEARCHTEXT is compared to
filename, tagname (tags table), references (uses of a tag) , or
symbol (uses of something not in the tag table.)
SCOPE is the scope of the search, such as 'project or 'subdirs."
  (let ((flgs (cond ((eq type 'file)
    "-a")
   (t "-xa")))
(scopeflgs (cond
   ((eq scope 'project)
    ""
    )
   ((eq scope 'target)
    "l")))
(stflag (cond ((or (eq texttype 'tagname)
  (eq texttype 'tagregexp))
      "")
     ((eq texttype 'tagcompletions)
      "c")
     ((eq texttype 'regexp)
      "g")
      ;;
      ;; York's experient begins
     ((eq texttype 'symbol)
      "s")
      ;; York's experient ends
      ;;
     (t "r")))
)
    (cedet-gnu-global-call (list (concat flgs scopeflgs stflag)
searchtext))))

My change made 'semantic-symref-symbol' work but then 'semantic-symref' stopped working as both these two functions called 'cedet-gnu-global-search' with exactly the same arguments. What are your thoughts?


Thanks,

York