From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32510: acknowledged by developer (control message for bug #32510) Date: Sun, 14 Jul 2019 08:21:23 +0300 Message-ID: <83k1clyywc.fsf@gnu.org> References: <87ftnazlz3.fsf@mouse.gnus.org> <87o91xwwxp.fsf@samuel> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="151890"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 32510@debbugs.gnu.org To: Ludovic Brenta Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 14 07:22:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hmWxi-000dHW-7G for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Jul 2019 07:22:14 +0200 Original-Received: from localhost ([::1]:58994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmWxZ-0004OJ-Nl for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Jul 2019 01:22:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44895) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmWxX-0004Mx-Hj for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 01:22:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmWxW-00070d-Kk for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 01:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34900) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmWxW-00070U-Gf for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 01:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmWxW-0003Sk-AI for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 01:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Jul 2019 05:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32510 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 32510-submit@debbugs.gnu.org id=B32510.156308170913292 (code B ref 32510); Sun, 14 Jul 2019 05:22:02 +0000 Original-Received: (at 32510) by debbugs.gnu.org; 14 Jul 2019 05:21:49 +0000 Original-Received: from localhost ([127.0.0.1]:43721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmWxI-0003SJ-T0 for submit@debbugs.gnu.org; Sun, 14 Jul 2019 01:21:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmWxG-0003S7-UV for 32510@debbugs.gnu.org; Sun, 14 Jul 2019 01:21:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hmWxB-0006rA-5c; Sun, 14 Jul 2019 01:21:41 -0400 Original-Received: from [176.228.60.248] (port=4015 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hmWxA-0002aX-Ib; Sun, 14 Jul 2019 01:21:40 -0400 In-reply-to: <87o91xwwxp.fsf@samuel> (message from Ludovic Brenta on Sat, 13 Jul 2019 21:34:26 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:162963 Archived-At: > From: Ludovic Brenta > 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)))