Subject: bug#14466: 24.3.50; semantic-symref-find-tags-by-regexp + cscope is problematic

From: Jambunathan K <[email-masked]>
Date: Sat, 25 May 2013 13:44:39 +0530

Bug-1: Provide a key-binding for semantic-symref-find-tags-by-regexp

Bug-2: See below

1. emacs -Q
2. (semantic-mode 1)

3. Make sure that ~/src/emacs/trunk/src/ has cscope.out, so that
   semantic-symref will be provided be cedet-cscope.el.

   For setting up cscope see
   http://lists.gnu.org/archive/html/bug-gnu-emacs/2013-05/msg00644.html

4. In the context of Emacs C files do, 

       M-x semantic-symref-find-tags-by-regexp RET

   You will be presented with the following buffer

      ,---- "*Symbol Reference ADEBUG*"
      |  ] Name: "intervals_equal"
      |  ] Class: #'semantic-symref-result
      |  ] :created-by #<semantic-symref-tool-cscope semantic-symref-tool-cscope>
      |  ] :hit-files #unbound
      |  ] :hit-text #unbound
      |  ] :hit-lines #<list o' stuff: 10 entries>
      |  ] :hit-tags #unbound
      `----

5. In the context of Emacs C files do,

   M-: (cedet-cscope-search "intervals_equal" 'tagregexp 'line 'project)

   C-x b *CEDET CScope*

   You will see that there are some hits as below.

      ,----
      | intervals.h <global> 230 extern bool intervals_equal (INTERVAL, INTERVAL);
      | textprop.c <global> 956 while (next && intervals_equal (i, next)
      | textprop.c <global> 1052 while (previous && intervals_equal (previous, i)
      | intervals.c intervals_equal 184 intervals_equal (INTERVAL i0, INTERVAL i1)
      | intervals.c adjust_intervals_for_insertion 989 if (! intervals_equal (i, &newi))
      | intervals.c adjust_intervals_for_insertion 995 else if (! intervals_equal (prev, &newi))
      | intervals.c adjust_intervals_for_insertion 999 if (i && intervals_equal (prev, i))
      | intervals.c set_point_both 2053 && (! intervals_equal (from, to)
      | intervals.c set_point_both 2054 || ! intervals_equal (fromprev, toprev)))
      | intervals.c compare_string_intervals 2329 if (! intervals_equal (i1, i2))
      `----

   Expected behaviour: 4 should present me with a Symref buffer with
   search results.

In GNU Emacs 24.3.50.3 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2013-05-25 on debian-6.05
Bzr revision: 112729 [email-masked]
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
Important settings:
  value of $LANG: en_IN
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t