all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Johan Claesson <johanclaesson@bredband.net>
Cc: "Óscar Fuentes" <ofv@wanadoo.es>, 23164@debbugs.gnu.org
Subject: bug#23164: 25.1.50; xref-find-definitions with local tags-file-name fails
Date: Thu, 7 Apr 2016 06:15:19 +0300	[thread overview]
Message-ID: <0cbc0981-a763-39f4-89da-ea955cae3a71@yandex.ru> (raw)
In-Reply-To: <87r3elm5j4.fsf@bredband.net>

On 04/05/2016 12:24 AM, Johan Claesson wrote:

> It also occur with other simple TAGS files that do not include other
> TAGS files.  And the TAGS file i was using when observing the problem
> the first time was this kind of simple TAGS file.

Right, thank you.

Apparently, the long-standing way to make it work is to call 
visit-tags-table with non-nil second argument, instead of just using 
setq-local. So, this seems to work correctly:

(fundamental-mode)
(visit-tags-table "~/examples/ruby/TAGS" t)
(xref-find-definitions "a")

It performs more work in advance, though, and I'm not sure what's the 
big picture with keeping variables like tags-table-list global anyway.

Here's a patch you can try that makes etags--xref-find-definitions work 
with your original scenario, but I'm not 100% sure it's good code. The 
proper solution to setting tags-file-name locally probably looks different.

diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index a2a0df2..856d26b 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -2111,6 +2111,7 @@ etags--xref-find-definitions
                                 tags-case-fold-search
                               case-fold-search)))
      (save-excursion
+      (visit-tags-table-buffer) ; Workaround for bug#23164
        (while (visit-tags-table-buffer (not first-time))
          (setq first-time nil)
          (dolist (order-fun (cond (regexp? find-tag-regexp-tag-order)






  reply	other threads:[~2016-04-07  3:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 20:52 bug#23164: 25.1.50; xref-find-definitions with local tags-file-name fails Johan Claesson
2016-04-04  1:29 ` Dmitry Gutov
2016-04-04  1:52   ` Óscar Fuentes
2016-04-04  8:53     ` Johan Claesson
2016-04-04 21:14     ` Johan Claesson
2016-04-04 21:24       ` Johan Claesson
2016-04-07  3:15         ` Dmitry Gutov [this message]
2016-04-09 15:00           ` Johan Claesson
2016-11-22 18:49 ` Josiah Schwab

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0cbc0981-a763-39f4-89da-ea955cae3a71@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=23164@debbugs.gnu.org \
    --cc=johanclaesson@bredband.net \
    --cc=ofv@wanadoo.es \
    /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 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.