From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#23164: 25.1.50; xref-find-definitions with local tags-file-name fails Date: Mon, 4 Apr 2016 04:29:30 +0300 Message-ID: <87a497cc-15b1-504b-fd4a-8fb3e484e507@yandex.ru> References: <87egar3czt.fsf@bredband.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1459733424 26143 80.91.229.3 (4 Apr 2016 01:30:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2016 01:30:24 +0000 (UTC) To: Johan Claesson , 23164@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 04 03:30:12 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 1amtLI-0000ec-5J for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Apr 2016 03:30:12 +0200 Original-Received: from localhost ([::1]:56032 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amtLH-0004AC-0f for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Apr 2016 21:30:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amtLD-00048D-I6 for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 21:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amtL9-00013Z-Nx for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 21:30:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amtL9-000139-Jo for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 21:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1amtL9-0007wy-Cq for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 21:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Apr 2016 01:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23164 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23164-submit@debbugs.gnu.org id=B23164.145973338030511 (code B ref 23164); Mon, 04 Apr 2016 01:30:03 +0000 Original-Received: (at 23164) by debbugs.gnu.org; 4 Apr 2016 01:29:40 +0000 Original-Received: from localhost ([127.0.0.1]:50455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amtKl-0007w3-ST for submit@debbugs.gnu.org; Sun, 03 Apr 2016 21:29:40 -0400 Original-Received: from mail-lb0-f182.google.com ([209.85.217.182]:36827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amtKj-0007vp-VN for 23164@debbugs.gnu.org; Sun, 03 Apr 2016 21:29:38 -0400 Original-Received: by mail-lb0-f182.google.com with SMTP id qe11so137939544lbc.3 for <23164@debbugs.gnu.org>; Sun, 03 Apr 2016 18:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=uj4dg0pn1Yn2wuki+SWyKqW2bFXPqrpi4N+vLW3fsJU=; b=nt6Kkbb3+eqn/K3wHSUOxBpQtf8crAgUsoxzPVUPN2ilV8tW0YgT7DGQqdLsNCv0xV gFhyUn+nmf8rSCNn6EeI19/jXcQ/3DTHEe6qZDIxjjovSZ2Q4cVuBt0O/gX52QBk/tkI 1WCn5jdi3/PSmafMKCaUtu1LKNT+WW8pAILn0l+q7lPwDlwzRVobaAg/GZNv/ypNU/bb 1CJgk52VQ9w9Wi6sR1yYZSK2uZQm899BqMtkILciZBpGA+10PEJMLJQhVqMKXqOIohL3 1OXN2cWFM5nOpFdbeIMzV3eEfzUL3+AvAjnGE1+EJuPCFqZh2ZcYCn0H4AQ2zMNI4tdj kn5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=uj4dg0pn1Yn2wuki+SWyKqW2bFXPqrpi4N+vLW3fsJU=; b=m6CRy4xbuaCvsycknvNaRskguvlR5HyltZS4Hb4cPqp4HBSUsfbG4u7czmYGDk+jRn 0UbNM/DEOZecPCP1TxMoSVC5LivhI0tHlGTXwdJIqZX3bmrALzcyXFiz0yBJkFkCQOf8 Qis4jo7jNU7Ik/TdJNTItUgWQ3p6ysZo020Xm3Ne0kUOZ//hVUgnMz2tTA0MJnVvCR90 V5FkiRJ7Op1jviWm+WZcXUWdTbJDHUFapbPo26qovsQeGFM4Q0a/nGYnqIooXNmtjdK4 CkiIQ97hTYyZgBuPtVUffn7lRFrLngpCq9P+2jy5nQzjP2HBhKQ0D1NBBdFiIH7k+pqC WsPg== X-Gm-Message-State: AD7BkJK6IjO6PIxgOX1au9IbuOcHPW5fiO94hHeE0xcM+RgSJKn5hJrjMmG3Uu0k9XbDtg== X-Received: by 10.28.12.80 with SMTP id 77mr9530679wmm.19.1459733372040; Sun, 03 Apr 2016 18:29:32 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id ll9sm26396347wjc.29.2016.04.03.18.29.30 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 03 Apr 2016 18:29:31 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 In-Reply-To: <87egar3czt.fsf@bredband.net> 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:115997 Archived-At: Hi there! On 03/30/2016 11:52 PM, Johan Claesson wrote: > emacs -Q > > (fundamental-mode) > (setq-local tags-file-name "/dev/zero") > (xref-find-definitions "foo") > > Fails with (wrong-type-argument stringp nil) in > visit-tags-table-buffer. I do see the error with tags-file-name set to /dev/zero. > The problem also occurs when tags-file-name points to a valid TAGS > file (the invalid /dev/zero was chosen just to make the recipe > short). Thanks for the report, but that doesn't seem to be the case here. At least if I replace "/dev/zero" with "~/vc/emacs/src/TAGS", the scenario doesn't lead to an error (I just get "not found"), and if I also use e.g. "CALLN" instead of "foo", the jump to the destination occurs as expected. To be 100% sure we're trying the same code, could you build Emacs from the branch emacs-25? Is there anything else you can tell us to help reproduce the problem? > If tags-file-name have a global value there is no problem. > > It is the following line in visit-tags-table-buffer that fails. > > (setq tags-file-name (tags-expand-table-name tags-file-name)) > > If this is protected with (when tags-file-name ...) then the problem > do not occur. The same if the line is moved down and inside the > unless sexp that follows immediately. If either is the right thing to > do i don't know. But it seem a bit strange to assume that > tags-file-name shall be non-nil at that point. The preceding form tries to make sure to set it to the current value. Depending on the value of CONT, it will ask the user, use the current value, or delegate to some guessing logic. It's not 100% solid, though. > The problem occurs > when etags--xref-find-definitions calls visit-tags-table-buffer for > the second time. The assumption here is that the second time visit-tags-table-buffer is called from the tags file buffer. And that the previous invocation either set tags-file-name locally in that buffer, or at least set tags-table-list.