Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 83 lines (65 sloc) 3.593 kb
3b1b53a8 »
2009-09-14 Adding README
1 Tags History Browsing
2 =====================
3
4 Overview
5 --------
6
7 This package offers functionality to supplement the different tags
8 operations, usually bound to M-./M-\*. It currently supports etags.el
9 and gtags.el, and should be easily extendable to other backends.
10
11 As you navigate through a source tree it can become easy to forget how
12 you got to your current location -- you could call M-\* repeatedly to
13 pop back up the stack, but this would lose your current location.
14 This module allows you to view the path taken, and if desired to jump
15 immediately back to any intermediate location, delete any extranous
16 locations, etc.
17
18 I wrote this for my own use, and my own amusement -- typically I'll
19 think about writing something for emacs, then have a quick hunt and
20 find something that already does the job. This time I followed
e819e054 »
2009-09-14 Readme tweaks
21 through to completion (I was stuck in an airport), but if you're after
22 an alternative then when I did go looking I found:
0194d4b4 »
2009-12-01 Correcting URL syntax in markdown.
23 [http://www.emacswiki.org/emacs/EtagsStack](http://www.emacswiki.org/emacs/EtagsStack).
24 I'd like to think that this offers something a little bit different;
25 it supports gtags as well as etags out of the box and in theory at
26 least can be extended to others, and it offers a few more operations
27 on the chronological trace. Of course, if you need any of that is up
28 to you :)
3b1b53a8 »
2009-09-14 Adding README
29
30 The functionality and interface is inspired by browse-kill-ring (and
31 in fact, I borrowed the navigation code from that package).
32
33 Installation and Usage:
34 -----------------------
35
36 Setup:
37
38 * clone the repository, or just copy tags-view.el somewhere
39 * Make sure it is in your path: `(add-to-list load-path checkout-location)`
40
41 When you want to use it, make sure that it is loaded
42 (`(require 'tags-view)` or similar), then call `M-x tv-view-history`.
43
44 This will pop open a buffer with your tag locations displayed,
45 optionally with surrounding lines of context from their source files,
46 with the most recent at the top. Type `C-h m` to see what commands
47 are available, but in summary:
48
49 * `n` and `p` navigate down and up the list;
50 * RETURN closes the history buffer and jumps to that location (without
51 alterating the tags stack);
52 * `o` displays the tag under point in another window, without leaving
53 the history buffer (useful to get greater context as you browse);
54 * `d` will delete the tag under point from the stack (useful if you
55 only want to think about a few key functions in the trace).
56
57 Customising:
58 ------------
59
60 The most likely variable you are going to want to customise is
61 `tv-context-lines`, which defaults to 0 -- this is the number of lines
62 of context displayed before and after the actual location of each tag.
63
64 The algorithm for determining which of etags, gtags etc is currently
65 in use is just to start either from the directory of the current
66 buffer (or `pwd` if no file is associated when you invoke it), then
67 search upwards until it finds one of TAGS or GTAGS (with preference
68 for the latter). You can customise this with your own algorithm
69 though by setting `tv-determine-backend-function`, which should be a
70 function of no arguments that returns a symbol denoting the backend to
71 use (eg, `'etags`), or `'none` if nothing can be determined.
72
73 If you want to add another backend you want to look at at the previous
74 function, and also `tv-backend-list`, whose format is documented in
75 the variable itself. Currently this just involves specifying
76 functions to return the list of data structures (buffer/position) for
77 the backend, and to delete a stack location if requested.
78
79 Bugs:
80 -----
81
82 Bound to be heaps. Does anyone want to write some tests?
Something went wrong with that request. Please try again.