From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Lopez Newsgroups: gmane.emacs.help Subject: Choosing tags tables Date: Thu, 20 Jul 2017 04:17:23 +0100 Message-ID: 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 1500525783 2807 195.159.176.226 (20 Jul 2017 04:43:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2017 04:43:03 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 20 06:42:57 2017 Return-path: Envelope-to: geh-help-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 1dY3Id-0000NA-Nu for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Jul 2017 06:42:55 +0200 Original-Received: from localhost ([::1]:36057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY3Ij-0004He-Bf for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Jul 2017 00:43:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY1zO-0001S2-E6 for help-gnu-emacs@gnu.org; Wed, 19 Jul 2017 23:18:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dY1zJ-00027i-Ft for help-gnu-emacs@gnu.org; Wed, 19 Jul 2017 23:18:58 -0400 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:38663) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dY1zJ-00026w-A1 for help-gnu-emacs@gnu.org; Wed, 19 Jul 2017 23:18:53 -0400 Original-Received: by mail-wm0-x233.google.com with SMTP id w191so14805115wmw.1 for ; Wed, 19 Jul 2017 20:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=LRF9m1zbuxrc6L9Y9P98jb4Ry43Z/bM/rz3RSF2Hbbc=; b=hNyyYon0M5BgpykOQ77USE5H8G9B1hTZA6VC09pXP0d7dOPsNQVtIJ5DFOR6qHE3MK QKg4iewGPMkv+L7GMB2ow1U1zHX+37iX2V5rLfRzX/7G17CGa7KMHKFozTZVrHRyJK6s BMhqgu1oHIKg3znvoyGyrFXh+j8DakOOZHCAOW7h/3+rGLn77eTzuBe7nDr8rLuswxHe IiZiap1MedxGxo2XZWIZ12m/bLs9BVT7Md2f4N7hVTGDzcuRM+lpmcw1INpBCAiWEaO0 /dWBgcxXTbftF98gBVXiIWHX7k0dLwmsMx+nu0Jq/+0SrAo8ufiTx0tVhrAL6PkXWSCF ONkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=LRF9m1zbuxrc6L9Y9P98jb4Ry43Z/bM/rz3RSF2Hbbc=; b=kSoL4yVxjeZVPpyiGpf/1MB1LRW/vcs9q6ZF/0tO1HOWWqkE5iKIs+THes+MD+S9X0 tKyjuP1TgFIqs1EENHKbd1n+3/NHUEJRg1kNYxsk5ghzB99sHLPF0+oIueNw7Evnpc/Q bBhR8IV0Vlre2bCH2KcalJsnZ3W1rjl+fY98BucIHeJwuwV0kbqnnNYc0XnsOG/juQVS NT2rWxWXo0fRCJxYqVzSbjm59tXgeckhFvwoYsHsw7zFugR47JVlZLK2r/EsNdz0RQbC 4WFAK9DMTWPhPYH3h8pksysqfFMc99K5pDzRtPTVpekS3EcSkhxiPmoDGI5z47jhObfG jFcg== X-Gm-Message-State: AIVw113gZ8UkbYdhE+94gRZY1laJd9+n0NSA7iHW/JWh2rbDR2zli//z LbWCR7QJASdDLJRpoM8= X-Received: by 10.28.47.67 with SMTP id v64mr1281881wmv.84.1500520730565; Wed, 19 Jul 2017 20:18:50 -0700 (PDT) Original-Received: from [192.168.2.2] (w-79.cust-5765.ip.static.uno.uk.net. [95.172.231.79]) by smtp.googlemail.com with ESMTPSA id f47sm2743118wrf.78.2017.07.19.20.18.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jul 2017 20:18:49 -0700 (PDT) Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 X-Mailman-Approved-At: Thu, 20 Jul 2017 00:41:49 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113790 Archived-At: Hi, After more than a decade of Emacs use I thought I'd finally try out the tags features. I regularly code in different languages so I'm gonna need to call on different tags tables in different buffers. And I tend to use libraries in each of those languages so I'll want to have more than one tags table in each search, ie. that of the utility library/libraries and that of the project I'm working on. So I set it up so that for example in my c++-mode-hook it sets tags-table-list with the multiple tags files I want to use for C++; the first is the library I use in all my C++ projects and the second is the project-specific tags file (assuming all project sources are in the same directory as TAGS, for now). I'm setting it as buffer-local so that it only applies to tag searches that are started when that buffer is current: (setq-local tags-table-list (list "/home/daniel/docs/code/c/reusable/checkout/dan/TAGS" (concat default-directory "TAGS"))) However when I then do a xref-find-definitions Emacs prompts me: "Visit tags table (default TAGS):" because (in visit-tags-table-buffer) it's not looking for the buffer-local value of tags-table-list, only the global which is nil. If I go along with it and enter something then Emacs sets tags-file-name to my entry which means now I only have one tags file and my tags-table-list gets ignored. I alternatively tried this in my c++-mode-hook: (visit-tags-table "/home/daniel/docs/code/c/reusable/checkout/dan/TAGS") (visit-tags-table (concat default-directory "TAGS")) but then whenever I open a file I get prompted about whether I want the second one to replace the first or be appended in consideration. I don't want to be prompted at all, I'd like to set most of this up in my init. I might want to call up such prompts to tweak things later but it's not likely. Does anyone know of a better way to get this effect? Regards, Daniel