unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Good place to regenerate tags file and reload it for a given project
@ 2009-07-30 18:38 jch
  2009-07-30 19:44 ` Peter Münster
  2009-07-31 12:59 ` Scott Frazer
  0 siblings, 2 replies; 3+ messages in thread
From: jch @ 2009-07-30 18:38 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I'm very happy to have found:

http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/20d91bdd662cb7ea/3de64d350b9b31c0?lnk=gst&q=auto++tags+#3de64d350b9b31c0

which lets auto reloads a tag file after it has been regenerated.  I'm
2 questions away from a very amazing Etags experience.

1.  What's a good way to regenerate a tags file when the files that it
indexes have changed?  Currently, I naively reindex every 20 minutes
in a cron job.  Ideally, I would like incremental reindexes to update
the tags file with recent changes to files.  I'm not sure if etags is
capable of this, or if there's a combination of Unix tools that are.

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?

Thanks in advance,
Jerry


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Good place to regenerate tags file and reload it for a given project
  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
  2009-07-31 12:59 ` Scott Frazer
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Münster @ 2009-07-30 19:44 UTC (permalink / raw)
  To: jch; +Cc: Emacs Users

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/






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Good place to regenerate tags file and reload it for a given project
  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
@ 2009-07-31 12:59 ` Scott Frazer
  1 sibling, 0 replies; 3+ messages in thread
From: Scott Frazer @ 2009-07-31 12:59 UTC (permalink / raw)
  To: help-gnu-emacs

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?

I wrote this to find tags per-project or up from the current directory:

http://www.emacswiki.org/emacs/EtagsTable


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-31 12:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-07-31 12:59 ` Scott Frazer

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).