From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#28403: 25.2; find-tag works, but xref-find-definitions doesn't; bug? Date: Sun, 10 Sep 2017 02:10:02 +0300 Message-ID: <296550ac-ab86-a7a5-59a5-bc906886a65e@yandex.ru> References: <201709092240.v89MeFUo014854@psr.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1504998689 30641 195.159.176.226 (9 Sep 2017 23:11:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 9 Sep 2017 23:11:29 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 To: Winston , 28403@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 10 01:11:22 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dqou1-0006s9-Ny for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Sep 2017 01:11:05 +0200 Original-Received: from localhost ([::1]:51132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqou8-00078I-It for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Sep 2017 19:11:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqou3-00077Z-Dm for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2017 19:11:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqoty-0004Vi-BF for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2017 19:11:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49367) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dqoty-0004VZ-67 for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2017 19:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dqotx-00024O-Tj for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2017 19:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Sep 2017 23:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28403 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28403-submit@debbugs.gnu.org id=B28403.15049986147891 (code B ref 28403); Sat, 09 Sep 2017 23:11:01 +0000 Original-Received: (at 28403) by debbugs.gnu.org; 9 Sep 2017 23:10:14 +0000 Original-Received: from localhost ([127.0.0.1]:58048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dqotB-00023D-PE for submit@debbugs.gnu.org; Sat, 09 Sep 2017 19:10:13 -0400 Original-Received: from mail-lf0-f48.google.com ([209.85.215.48]:36483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dqotA-000230-6l for 28403@debbugs.gnu.org; Sat, 09 Sep 2017 19:10:12 -0400 Original-Received: by mail-lf0-f48.google.com with SMTP id m199so11659868lfe.3 for <28403@debbugs.gnu.org>; Sat, 09 Sep 2017 16:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=o4uEJzIoIUVww6A6QOLS4vcjpH/nP9pLs4LwjQrKVqE=; b=DKloTEk+Cw5GZbsVjNg/Hg5cy+6w11OxEJW/f2AXVCrMHk9tdlKpxhMM40CMkWonRc RlEcBQjBTOj5AClzcu/9z+I29ol6WLf/1PjqvIX7SRRd2yMvnv/hKWN5JAPXYU4FHgbg wCVfvwQ1k3z4P+NhcAI5NvvJH3gsW4nA43FXoq5qyArqQOzowAWPzdk1UsmpVERAjU7b KUINS54ffrTbf2yYWW+0DHtcv9FJY5JtT2/2fsvWmdDxkyEDKF59Uviy7384EFmASs28 k8ngN6Ya7bBByuyHZy9PczuI0BCmrxBr6mP+FN9Jm2byby4Vwrh3+f1fR9SGlS6r8+J7 fD/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=o4uEJzIoIUVww6A6QOLS4vcjpH/nP9pLs4LwjQrKVqE=; b=aTKhvJ7U54EarTO3KNgq6yOU0wxq7qrn2XXHdYOfI2f8JAQKlA9NSgA5vSSkM/75mO 1MD/1AMK4gs474ANQbMrAW7LdAbV6WdYidZimhQb7FTvLEWlTJ8vuxekXUdAGhCrjPqZ GJPkrVpkEI9bUpOwPerTPJlAo6ix8YUnrLIz46/VaBF1VHKsifZQScbiuExD8ZWQ9hh2 f3VbPv6wsz/7Cia+ZnclszrDxDaFopdR1IhGVF+QvHP4f+QLRp/cfl1GEzVtDhWvvKTN AXGxQlD1dRGtCMlDWWLG8jofCRDeOidhY08Y1eBk7R+vWF949xmmxUj9q0IimbLJ8J5s L8bw== X-Gm-Message-State: AHPjjUjtSZjTC5NTLzSCORw6HxJVJTmFoxSUvr090pA8lARMxw4ZYFVL TYe1vYcgiKqJIhgmo0c= X-Google-Smtp-Source: ADKCNb4LtlDoxxsSRY7l21HGzIhos4vjKXVJqySMz+ku7qnTL6bNcYrKLNgMIHh2CcAGuTr8q02k6g== X-Received: by 10.46.19.17 with SMTP id 17mr2339375ljt.31.1504998605846; Sat, 09 Sep 2017 16:10:05 -0700 (PDT) Original-Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id g11sm982865lji.95.2017.09.09.16.10.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Sep 2017 16:10:04 -0700 (PDT) In-Reply-To: <201709092240.v89MeFUo014854@psr.com> Content-Language: en-US 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" Xref: news.gmane.org gmane.emacs.bugs:136720 Archived-At: On 9/10/17 1:39 AM, Winston wrote: > The C code in question uses macros around function arguments in its > definitions. E.g., > > name _ARGS1(type,variable) > > find-tag (and etags) work just fine with that, and such function > definition lines appear in the TAGS file (as they should), but > xref-find-definitions fails to find such function tags, saying instead > "No definitions found for: name". Which program are you generating TAGS with? Is it etags that comes with Emacs? xref-find-definitions is somewhat stricter about its input than find-tag. What does the entry for this function inside TAGS look like? You can paste it into the reply. The TAGS format is close to plain text. I'm guessing it looks like: name _ARGS1( which is an "implicit tag name" entry for "_ARGS1", but not for "name". IOW, etags doesn't understand macros. > So, xref-find-definitions is not yet a complete replacement for > find-tag. Since etags puts such lines in TAGS and xref-find-definitions > is unable to match up the name with the tag, it looks like a bug / > deficiency in xref-find-definitions. Try adding `tag-symbol-match-p' to etags-xref-find-definitions-tag-order. This example should work then, but you'll get more false positives (like treating return types as function names).