From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Rogers Newsgroups: gmane.emacs.bugs Subject: bug#22947: 25.0.92; xref-find-definitions fails for Perl & etags Date: Tue, 8 Mar 2016 13:27:30 -0500 Organization: Modular Genetics Inc. Message-ID: <22239.6546.544495.576771@gargle.gargle.HOWL> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1457464471 25428 80.91.229.3 (8 Mar 2016 19:14:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Mar 2016 19:14:31 +0000 (UTC) To: 22947@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 08 20:14:20 2016 Return-path: Envelope-to: geb-bug-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 1adN58-0001Sc-Hp for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Mar 2016 20:14:10 +0100 Original-Received: from localhost ([::1]:36769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adN58-0001M4-0O for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Mar 2016 14:14:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adN53-0001Ln-T0 for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 14:14:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adN50-00078g-M7 for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 14:14:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adN50-00078D-Ib for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 14:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1adN50-0006hn-CK for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 14:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bob Rogers Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Mar 2016 19:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22947 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145746440325714 (code B ref -1); Tue, 08 Mar 2016 19:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Mar 2016 19:13:23 +0000 Original-Received: from localhost ([127.0.0.1]:40010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adN4N-0006gg-9q for submit@debbugs.gnu.org; Tue, 08 Mar 2016 14:13:23 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46204) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adMyF-0006XC-CX for submit@debbugs.gnu.org; Tue, 08 Mar 2016 14:07:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adMy6-0004xg-1x for submit@debbugs.gnu.org; Tue, 08 Mar 2016 14:06:58 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adMy5-0004xc-Uw for submit@debbugs.gnu.org; Tue, 08 Mar 2016 14:06:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adMy4-0006cZ-QK for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 14:06:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adMy1-0004wZ-J8 for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 14:06:52 -0500 Original-Received: from [198.0.172.193] (port=42217 helo=granada.modulargenetics.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adMy1-0004wI-Ds for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 14:06:49 -0500 Original-Received: from persepolis.modulargenetics.com (persepolis.modulargenetics.com [192.168.23.34]) by granada.modulargenetics.com (Postfix on SuSE Linux) with ESMTP id A8C51110B82; Tue, 8 Mar 2016 13:27:30 -0500 (EST) Original-Received: by persepolis.modulargenetics.com (Postfix on SuSE Linux, from userid 503) id 92B38858C0; Tue, 8 Mar 2016 13:27:30 -0500 (EST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Tue, 08 Mar 2016 14:13:21 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114595 Archived-At: 1. In a top-level directory with Perl modules ("*.pm") underneath, create an etags file that indexes the modules, e.g. find . -type f -name '*.pm' | etags - 2. Invoke "emacs -Q" in this directory. 3. "M-x visit-tags-table RET RET" 4. "M-. perl_method_name RET" where "perl_method_name" is known to be defined. The bug is that, no matter how many perl_method_name definitions exist in the TAGS file, xref-find-definitions won't find any of them, because it's only looking for an exact match to what Perl considers the package-qualified name, namely the "Perl::Package::perl_method_name" as it appears in this TAGS line: sub perl_method_name ^?Perl::Package::perl_method_name^A23,321 FWIW, the patch I have included below "================" papers over the problem (though it's clearly much too kludgy to apply). Note that this has also been failing in master for some time now; sorry I didn't report it sooner. -- Bob Rogers http://www.rgrjr.com/ ------------------------------------------------------------------------ Configured using: 'configure --with-pop --without-dbus --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --sharedstatedir=/var/lib --libexecdir=/usr/lib --with-x --with-xpm=no --with-jpeg --with-tiff --with-gif=no --with-png --with-x-toolkit=yes --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib64 --build x86_64-suse-linux 'CFLAGS=-g -O2 -fno-optimize-sibling-calls' LDFLAGS=-s' Configured features: JPEG TIFF PNG RSVG SOUND GSETTINGS NOTIFY FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix ================ diff -u --label /usr/share/emacs/25.0.92/lisp/progmodes/etags.el.gz --label \#\ /tmp/rogers/jka-com1969tT2 /tmp/rogers/buffer-content-1969snL --- /usr/share/emacs/25.0.92/lisp/progmodes/etags.el.gz +++ # @@ -1617,7 +1617,11 @@ (or (and (eq (char-after (point)) ?\001) (eq (char-after (- (point) (length tag) 1)) ?\177)) ;; We are not on the explicit tag name, but perhaps it follows. - (looking-at (concat "[^\177\n]*\177" (regexp-quote tag) "\001")))) + (looking-at (concat "[^\177\n]*\177" (regexp-quote tag) "\001")) + ;; This works for perl. -- rgr, 8-Mar-16. + (save-excursion + (skip-chars-backward "^:\n") + (looking-at (concat (regexp-quote tag) "\001"))))) ;; t if point is at a tag line that has an implicit name. ;; point should be just after a string that matches TAG.