all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#22947: 25.0.92; xref-find-definitions fails for Perl & etags
@ 2016-03-08 18:27 Bob Rogers
  2016-03-09  1:52 ` Dmitry Gutov
  0 siblings, 1 reply; 30+ messages in thread
From: Bob Rogers @ 2016-03-08 18:27 UTC (permalink / raw)
  To: 22947

   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 \#\<buffer\ etags.el.gz\> /tmp/rogers/jka-com1969tT2 /tmp/rogers/buffer-content-1969snL
--- /usr/share/emacs/25.0.92/lisp/progmodes/etags.el.gz
+++ #<buffer 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.





^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2022-04-27 12:14 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-08 18:27 bug#22947: 25.0.92; xref-find-definitions fails for Perl & etags Bob Rogers
2016-03-09  1:52 ` Dmitry Gutov
2016-03-09  2:43   ` Bob Rogers
2016-03-10 13:20     ` Eli Zaretskii
2016-03-10 13:36       ` Dmitry Gutov
2016-03-10 14:16         ` Eli Zaretskii
2016-03-10 14:34           ` Dmitry Gutov
2016-03-10 15:31         ` Eli Zaretskii
2016-03-10 15:50           ` Dmitry Gutov
2016-03-10 16:22             ` Eli Zaretskii
2016-03-11  1:45               ` Dmitry Gutov
2016-03-11  8:04                 ` Eli Zaretskii
2016-03-11 12:46                   ` Dmitry Gutov
2016-03-11 14:59                     ` Eli Zaretskii
2016-03-12  1:08                       ` Dmitry Gutov
2016-03-12  7:41                         ` Eli Zaretskii
2016-03-12 12:10                           ` Dmitry Gutov
2016-03-12 12:33                             ` Eli Zaretskii
2016-03-12 12:46                               ` Dmitry Gutov
2016-03-12 16:09                                 ` Eli Zaretskii
2016-03-10 19:07           ` Bob Rogers
2016-03-10 20:32             ` Eli Zaretskii
2016-03-11 18:08               ` Bob Rogers
2016-03-11 18:34                 ` Eli Zaretskii
2016-03-11 19:05                   ` Bob Rogers
2016-03-12  0:50                     ` Dmitry Gutov
2022-04-26 12:40                       ` Lars Ingebrigtsen
2022-04-26 17:00                         ` Bob Rogers
2022-04-27 12:14                           ` Lars Ingebrigtsen
2016-03-11  1:28             ` Dmitry Gutov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.