From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.emacs.help Subject: Re: Good place to regenerate tags file and reload it for a given project Date: Thu, 30 Jul 2009 21:44:01 +0200 (CEST) Message-ID: References: <5c5249e0-9d29-4315-9bbb-0974ff6c034e@m3g2000pri.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: ger.gmane.org 1248983128 24670 80.91.229.12 (30 Jul 2009 19:45:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jul 2009 19:45:28 +0000 (UTC) Cc: Emacs Users To: jch Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 30 21:45:19 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MWbYG-0003wu-JW for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jul 2009 21:44:33 +0200 Original-Received: from localhost ([127.0.0.1]:36596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWbYF-0000Xj-Ud for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jul 2009 15:44:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWbXt-0000Vb-IR for help-gnu-emacs@gnu.org; Thu, 30 Jul 2009 15:44:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWbXo-0000NF-VT for help-gnu-emacs@gnu.org; Thu, 30 Jul 2009 15:44:09 -0400 Original-Received: from [199.232.76.173] (port=33845 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWbXo-0000N6-Mn for help-gnu-emacs@gnu.org; Thu, 30 Jul 2009 15:44:04 -0400 Original-Received: from smtp2b.orange.fr ([80.12.242.144]:50422) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWbXo-0001t0-A0 for help-gnu-emacs@gnu.org; Thu, 30 Jul 2009 15:44:04 -0400 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2b29.orange.fr (SMTP Server) with ESMTP id 73DA57000085; Thu, 30 Jul 2009 21:44:02 +0200 (CEST) Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2b29.orange.fr (SMTP Server) with ESMTP id 66DBC700008A; Thu, 30 Jul 2009 21:44:02 +0200 (CEST) Original-Received: from gaston.couberia.bzh (ARennes-358-1-115-74.w92-129.abo.wanadoo.fr [92.129.26.74]) by mwinf2b29.orange.fr (SMTP Server) with ESMTP id 3D4C77000085; Thu, 30 Jul 2009 21:44:02 +0200 (CEST) X-ME-UUID: 20090730194402251.3D4C77000085@mwinf2b29.orange.fr Original-Received: by gaston.couberia.bzh (Postfix, from userid 1000) id BF0A53016E; Thu, 30 Jul 2009 21:44:01 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by gaston.couberia.bzh (Postfix) with ESMTP id AFE6C30159; Thu, 30 Jul 2009 21:44:01 +0200 (CEST) X-X-Sender: peter@gaston.couberia.bzh In-Reply-To: <5c5249e0-9d29-4315-9bbb-0974ff6c034e@m3g2000pri.googlegroups.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66543 Archived-At: On Thu, 30 Jul 2009, jch wrote: > 2. What's a good way to automatically load a tags file for a > project? The way I've thought about doing is to look for a tags file > in the current directly, and then recursively look for a tags file in > my parent directory. Does anyone adopt this approach, or something > similar? Something similar: (defun my-find-tag(tagname) "Fast version of find-tag." (interactive (find-tag-interactive "Find tag: ")) (tags-reset-tags-tables) (if (file-exists-p "TAGS") (visit-tags-table "TAGS") (if (file-exists-p "../TAGS") (visit-tags-table "../TAGS") (visit-tags-table "../../TAGS"))) (find-tag tagname)) (define-key esc-map "." 'my-find-tag) But very probably someone will show up with a far better (and cleaner) solution... Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/