From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Zimmerman Newsgroups: gmane.emacs.help Subject: Re: `find-tag-regexp` doesn't find all the matches Date: Sat, 11 Jul 2015 14:40:47 -0700 Message-ID: <20150711213338.19049.31E6749D@ahiker.mooo.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1436650870 6195 80.91.229.3 (11 Jul 2015 21:41:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Jul 2015 21:41:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 11 23:41:10 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZE2WE-0006Bc-2p for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Jul 2015 23:41:10 +0200 Original-Received: from localhost ([::1]:49091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZE2WC-0000x9-Mu for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Jul 2015 17:41:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZE2W2-0000wt-EF for help-gnu-emacs@gnu.org; Sat, 11 Jul 2015 17:40:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZE2W1-0007r2-Ca for help-gnu-emacs@gnu.org; Sat, 11 Jul 2015 17:40:58 -0400 Original-Received: from disorder-1-pt.tunnel.tserv3.fmt2.ipv6.he.net ([2001:470:1f04:51a::2]:39170 helo=acedia.primate.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZE2W1-0007pI-3b for help-gnu-emacs@gnu.org; Sat, 11 Jul 2015 17:40:57 -0400 Original-Received: from acedia.primate.net (localhost [127.0.0.1]) by acedia.primate.net (8.14.9/8.14.9/Debian-2) with ESMTP id t6BLenmX014769 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 11 Jul 2015 14:40:49 -0700 Original-Received: (from itz@localhost) by acedia.primate.net (8.14.9/8.14.9/Submit) id t6BLem9W014764 for help-gnu-emacs@gnu.org; Sat, 11 Jul 2015 14:40:48 -0700 X-Authentication-Warning: acedia.primate.net: itz set sender to itz@buug.org using -f Original-Received: from itz by ahiker.mooo.com with local (Exim 4.80) (envelope-from ) id 1ZE2Vr-0004xz-Fy for help-gnu-emacs@gnu.org; Sat, 11 Jul 2015 14:40:47 -0700 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:470:1f04:51a::2 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105612 Archived-At: On 2015-07-11 18:24 +0200, Raffaele Ricciardi wrote: > When I use `find-tag` to lookup a symbol, I get more matches than with > `find-tag-regexp`. > > For example, to lookup "sscanf" with `find-tag`, I type `M-. sscanf RET` > and then `C-u M-.` repeatedly, and I get this matches, one after > another: > > # define sscanf __isoc99_sscanf > sscanf, > extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s, > > Then `C-u M-.` starts to find matches where "sscanf" is a substring, > therefore I stop. > > If instead I type `C-M-. \_ RET`, I get this match: > > sscanf, Are you sure the tags table buffer has a syntax table such that the symbol boundaries fall where you expect them? The tags table buffer is probably in fundamental mode, not C mode (or whatever that ugly language is :) So, at least as the next step in debugging this, I would try a more specific regexp. Something like [^a-zA-Z0-9_]sscanf[^a-zA-Z0-9_] You'll also need to handle the case where it's at the beginning of line, but that's an exercise for the reader. -- Please *no* private copies of mailing list or newsgroup messages. Rule 420: All persons more than eight miles high to leave the court.