From: Eli Zaretskii <eliz@gnu.org>
To: Ludovic Brenta <ludovic@ludovic-brenta.org>
Cc: 32510@debbugs.gnu.org
Subject: bug#32510: acknowledged by developer (control message for bug #32510)
Date: Sun, 14 Jul 2019 08:21:23 +0300 [thread overview]
Message-ID: <83k1clyywc.fsf@gnu.org> (raw)
In-Reply-To: <87o91xwwxp.fsf@samuel> (message from Ludovic Brenta on Sat, 13 Jul 2019 21:34:26 +0200)
> From: Ludovic Brenta <ludovic@ludovic-brenta.org>
> Date: Sat, 13 Jul 2019 21:34:26 +0200
>
> This bug report states that a useful functionality of find-tag is *not*
> provided by its official replacement, xref-find-definitions. This is a
> regression. Just because you think this missing functionality should be
> provided elsewhere is not a good reason to close this bug without
> providing any solution.
With the patch below, you should be able to have what you want if you
add tag-partial-file-name-match-p to the list in
etags-xref-find-definitions-tag-order. Please try this patch and see
if it works for you.
Thanks.
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 7bf5753..b092c63 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -2070,13 +2070,16 @@ etags--xref-find-definitions
(beginning-of-line)
(pcase-let* ((tag-info (etags-snarf-tag))
(`(,hint ,line . _) tag-info))
- (unless (eq hint t) ; hint==t if we are in a filename line
+ (unless (and (eq hint t) ; we are in a filename line
+ (not (eq order-fun
+ 'tag-partial-file-name-match-p)))
(let* ((file (file-of-tag))
(mark-key (cons file line)))
(unless (gethash mark-key marks)
(let ((loc (xref-make-etags-location
tag-info (expand-file-name file))))
- (push (xref-make hint loc) xrefs)
+ (push (xref-make (if (eq hint t) pattern hint) loc)
+ xrefs)
(puthash mark-key t marks)))))))))))
(nreverse xrefs)))
next prev parent reply other threads:[~2019-07-14 5:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87ftnazlz3.fsf@mouse.gnus.org>
2018-08-23 15:32 ` bug#32510: xref-find-definitions should return file names, too Ludovic Brenta
2019-07-13 2:50 ` Lars Ingebrigtsen
[not found] ` <handler.32510.C.15629862456126.notifdonectrl.0@debbugs.gnu.org>
2019-07-13 19:34 ` bug#32510: acknowledged by developer (control message for bug #32510) Ludovic Brenta
2019-07-13 23:25 ` Drew Adams
2019-07-14 5:21 ` Eli Zaretskii [this message]
2019-07-30 0:06 ` Dmitry Gutov
2019-07-30 14:00 ` Dmitry Gutov
2019-08-03 10:00 ` Eli Zaretskii
2019-07-15 13:54 ` bug#32510: Tags: wontfix -> patch Ludovic Brenta
2019-07-18 14:53 ` bug#32510: xref-find-definitions should return file names, too Ludovic Brenta
2019-07-18 15:16 ` Eli Zaretskii
2019-07-18 15:54 ` Ludovic Brenta
2019-07-18 16:07 ` Eli Zaretskii
2019-07-19 22:23 ` Dmitry Gutov
2019-07-20 7:17 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83k1clyywc.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=32510@debbugs.gnu.org \
--cc=ludovic@ludovic-brenta.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).