unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Peter Münster" <pmlists@free.fr>
To: jch <jollyjerry@gmail.com>
Cc: Emacs Users <help-gnu-emacs@gnu.org>
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)	[thread overview]
Message-ID: <alpine.LNX.2.00.0907302133270.27205@gaston.couberia.bzh> (raw)
In-Reply-To: <5c5249e0-9d29-4315-9bbb-0974ff6c034e@m3g2000pri.googlegroups.com>

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/






  reply	other threads:[~2009-07-30 19:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30 18:38 Good place to regenerate tags file and reload it for a given project jch
2009-07-30 19:44 ` Peter Münster [this message]
2009-07-31 12:59 ` Scott Frazer

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=alpine.LNX.2.00.0907302133270.27205@gaston.couberia.bzh \
    --to=pmlists@free.fr \
    --cc=help-gnu-emacs@gnu.org \
    --cc=jollyjerry@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).