[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to restrict find-tag-regexp to search only the symbol part of TAGS?

From: Sam Halliday
Subject: How to restrict find-tag-regexp to search only the symbol part of TAGS?
Date: Mon, 17 Aug 2015 06:02:03 -0700 (PDT)
User-agent: G2/1.0

Hi all,

I am getting a lot of false positives in my ctags lookups because a symbol 
appears in the line that matches another symbol.

For example, this is a line from a TAGS file for a Scala project

    val request = TypeAtPointReq(file, OffsetRange(100)): 

now, the actual symbol here is "request". Elsewhere are these lines:

    case class OffsetRange(from: Int, to: Int)^?OffsetRange^A338,9435
    object OffsetRange extends ((Int, Int) => OffsetRange) 

and they are both for the symbol "OffsetRange".

The problem is that if I find-tags for "OffsetRange" I go to the line for 
"request" which is just wrong.

Is there any way to restrict the find-tags matching to the name of the symbol 
rather than its "description"?

Unfortunately, it looks to me like `find-tag` explicitly only searches the 
first column and never looks at the tag itself. That's nasty.

>From etags-tags-completion-table

  ;; This monster regexp matches an etags tag line.
  ;;   \1 is the string to match;
  ;;   \2 is not interesting;
  ;;   \3 is the guessed tag name; XXX guess should be better eg DEFUN
  ;;   \4 is not interesting;
  ;;   \5 is the explicitly-specified tag name.
  ;;   \6 is the line to start searching at;
  ;;   \7 is the char to start searching at.

I've asked a variant of this question on stackexchange, linking for convenience:

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]