annotate man/speedbar.texi @ 32674:4cbd3d907ee5

First Edition.
author Eric M. Ludlam <zappo@gnu.org>
date Fri, 20 Oct 2000 01:53:35 +0000
parents
children 788c194fbcd1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32674
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1 \input texinfo @c -*-texinfo-*-
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
2 @c
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
3 @c $Id$
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
4 @c
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
5
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
6 @c This file is part of GNU Emacs
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
7
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
8 @c GNU Emacs is free software; you can redistribute it and/or modify it
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
9 @c under the terms of the GNU General Public License as published by the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
10 @c Free Software Foundation; either version 2 of the License, or (at
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
11 @c your option) any later version.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
12
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
13 @c GNU Emacs is distributed in the hope that it will be useful, but
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
14 @c WITHOUT ANY WARRANTY; without even the implied warraonty of
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
15 @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
16 @c General Public License for more details.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
17
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
18 @c You should have received a copy of the GNU General Public License
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
19 @c along with Eshell; see the file COPYING. If not, write to the Free
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
20 @c Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
21
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
22 @setfilename ../info/speedbar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
23 @settitle Speedbar: File/Tag summarizing utility
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
24
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
25 @ifinfo
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
26 @format
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
27 START-INFO-DIR-ENTRY
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
28 * Speedbar: (speedbar). File/Tag summarizing utility.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
29 END-INFO-DIR-ENTRY
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
30 @end format
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
31 @end ifinfo
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
32
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
33 @titlepage
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
34 @sp 10
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
35 @center @titlefont{speedbar}
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
36 @vskip 0pt plus 1 fill
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
37 Copyright @copyright{} 1999, 2000 Eric M. Ludlam
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
38 @end titlepage
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
39
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
40 @node Top, , , (dir)Top
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
41 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
42
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
43 Copyright @copyright{} 1999 Eric M. Ludlam
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
44
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
45 Speedbar is a program for Emacs which can be used to summarize
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
46 information related to the current buffer. Its original inspiration
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
47 is the "explorer" often used in modern development environments, office
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
48 packages, and web browsers.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
49
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
50 Speedbar displays a narrow frame in which a tree view is shown. This
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
51 tree view defaults to containing a list of files and directories. Files
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
52 can be "expanded" to list tags inside. Directories can be expanded to
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
53 list the files within itself. Each file or tag can be jumped to
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
54 immediately.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
55
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
56 Speedbar expands upon "explorer" windows by maintaining context with the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
57 user. For example, when using the file view, the current buffer's file
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
58 is highlighted. Speedbar also mimics the explorer windows by providing
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
59 multiple display modes. These modes come in two flavors. Major display
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
60 modes remain consistent across buffers, and minor display modes appear
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
61 only when a buffer of the applicable type is shown. This provides
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
62 authors of other packages to provide speedbar summaries customized to
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
63 the needs of that mode.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
64
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
65 Throughout this manual, activities are defined as "clicking on", or
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
66 "expanding" items. Clicking means using using @kbd{mouse-2} on a
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
67 button. Expanding refers to clicking on an expansion button to display
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
68 an expanded summary of the entry the exapansion button is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
69 on. @xref{Basic Navigation}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
70
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
71 @menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
72 * Introduction:: Basics of speedbar.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
73 * Basic Navigation:: Basics of speedbar common between all modes.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
74 * File Mode:: Summerizing files.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
75 * Buffer Mode:: Summerizing buffers.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
76 * Minor Modes:: Additional minor modes such as Info and RMAIL.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
77 * Customizing:: Changing speedbar behaviors.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
78 * Extending:: Extend speedbar for your own project.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
79 * Index::
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
80 @end menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
81
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
82 @node Introduction, Basic Navigation, , Top
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
83 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
84 @chapter Introduction
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
85 @cindex introduction
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
86
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
87 To start using speedbar use the command @kbd{M-x speedbar RET} or select
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
88 it from the Tools menu in versions of Emacs with speedbar installed by
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
89 default. This command will open a new frame to summarize the local
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
90 files. On X windows, or under Windows NT, speedbar's frame is twenty
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
91 characters wide, and will mimic the height of the frame from which it
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
92 was started. It positions itself to the left or right of the frame you
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
93 started it from.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
94
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
95 To use speedbar effectivly, it is important to understand its
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
96 relationship with the frame you started it from. This frame is the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
97 "attached frame" which speedbar will use as a reference point. Once
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
98 started speedbar will watch the contents of this frame, and attempts to
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
99 make it's contents relevant to the buffer loaded into the attached
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
100 frame. In addition, all requests made in speedbar that require the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
101 display of another buffer will display in the attached frame.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
102
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
103 When used in terminal mode, the new frame appears the same size as the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
104 terminal. Since it is not visible while working in the attached frame,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
105 speedbar will save time by using "slowbar" mode, where no tracking is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
106 done until speedbar is requested to show itself.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
107
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
108 The function to use when switching between frames using the keyboard is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
109 @code{speedbar-get-focus}. This function will toggle between frames, and
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
110 useful to bind to a key in terminal mode @xref{Customizing}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
111
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
112 @node Basic Navigation, File Mode, Introduction, Top
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
113 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
114 @chapter Basic Navigation
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
115
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
116 Speedbar can display different types of data, and has several display
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
117 and behavior modes. These modes all have a common behavior, menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
118 system, and look. If one mode is learned, then the other modes are easy
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
119 to use.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
120
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
121 @menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
122 * Basic Keybindings::
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
123 * Basic Visuals::
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
124 * Mouse Bindings::
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
125 * Displays Submenu::
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
126 @end menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
127
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
128 @node Basic Keybindings, Basic Visuals, Basic Navigation, Basic Navigation
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
129 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
130 @section Basic Keybindings
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
131 @cindex keybindings
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
132
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
133 These keybindings are common across all modes:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
134 @table @kbd
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
135 @item delete, SPC
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
136 @cindex scrolling
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
137 Scroll up and down one page.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
138 @item Q
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
139 @cindex quitting
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
140 Quit speedbar, and kill the frame.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
141 @item q
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
142 Quit speedbar, and hide the frame. This makes it faster to restore the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
143 speedbar frame.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
144 @item g
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
145 @cindex refresh
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
146 Refresh whatever contents are in speedbar.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
147 @item t
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
148 @cindex slowbar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
149 Toggle speedbar to and from slowbar mode. In slowbar mode, frame
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
150 tracking is not done.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
151 @item n, p
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
152 @cindex navigation
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
153 Move to the next or previous item. A summary of that item will be
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
154 displayed in the attached frame's minibuffer.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
155 @item M-n, M-p
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
156 Move to the next or previous item in a restricted fashion. If a list is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
157 open, the cursor will skip over it. If the cursor is in an open list,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
158 it will not leave it.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
159 @item C-M-n, C-M-n
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
160 Move forwards and backwards across extended groups. This lets you
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
161 quickly skip over all files, or directories, or other common sub-item at
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
162 the same current depth.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
163 @item C-x b
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
164 Switch buffers in the attached frame.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
165 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
166
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
167 Speedbar can handle multiple modes. Two are provided by default.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
168 These modes are File mode, and Buffers mode. There are accelerators to
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
169 switch into these different modes.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
170
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
171 @cindex mode switching hotkeys
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
172 @table @kbd
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
173 @item b
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
174 Switch into Quick Buffers mode @xref{Buffer Mode}. After one use, the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
175 previous display mode is restored.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
176 @item f
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
177 Switch into Files mode.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
178 @item r
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
179 Switch back to the previous mode.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
180 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
181
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
182 Some modes provide groups, lists and tags. @xref{Basic Visuals}. When
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
183 these are available some additional common bindings are available.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
184
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
185 @cindex common keys
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
186 @table @kbd
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
187 @item RET, e
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
188 Edit/Open the current group or tag. This behavior is dependent on the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
189 mode. In general, files or buffers are opened in the attached frame,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
190 and directories or group nodes are expanded locally.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
191 @item +,=
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
192 Expand the current group, displaying sub items.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
193 When used with a prefix argument, any data that may have been cached is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
194 flushed. This is similar to a power click. @xref{Mouse Bindings}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
195 @item -
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
196 Contract the current group, hiding sub items.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
197 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
198
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
199 @node Basic Visuals, Mouse Bindings, Basic Keybindings, Basic Navigation
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
200 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
201 @section Basic Visuals
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
202 @cindex visuals
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
203
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
204 Speedbar has visual cues for indicating different types of data. These
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
205 cues are used consistently across the different speedbar modes to make
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
206 them easier to understand.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
207
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
208 At a high level, in Files mode, there are directory buttons, sub
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
209 directory buttons, file buttons, tag buttons, and expansion buttons.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
210 This makes it easy to use the mouse to navigate a directory tree, and
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
211 quickly view files, or a summary of those files.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
212
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
213 The most basic visual effect used to distinguis between these button
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
214 types is color and mouse highlighting. Anything the mouse highlights
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
215 can be clicked on and is called a button @xref{Mouse Bindings}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
216 Anything not highlighted by the mouse will not be clickable.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
217
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
218 Text in speedbar consists of four different types of data. Knowing how
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
219 to read these textual elements will make it easier to navigate by
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
220 identifying the types of data available.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
221
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
222 @subsubsection Groups
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
223 @cindex groups
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
224
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
225 Groups summarize information in a single line, and provide a high level
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
226 view of more complex systems, like a directory tree, or manual chapters.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
227
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
228 Groups appear at different indentation levels, and are prefixed with a
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
229 @code{+} in some sort of "box". The group name will summarize the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
230 information within it, and the expansion box will display that
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
231 information inline. In files mode, directories and files are "groups"
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
232 where the @code{+} is surrounded by brackets like this:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
233
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
234 @example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
235 <+> include
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
236 <-> src
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
237 [+] foo.c
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
238 @end example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
239
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
240 In this example, we see both open and closed directories, in addition to
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
241 a file. The directories have a box consisting of angle brackets, and a
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
242 file uses square brackets.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
243
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
244 In all modes, a group can be "edited" by pressing @kbd{RET}, meaning a
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
245 file will be opened, or a directory explicitly opened in speedbar. A
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
246 group can be expanded or contracted using @kbd{+} or
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
247 @kbd{-}. @xref{Basic Keybindings}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
248
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
249 Sometimes groups may have a @code{?} in it's indicator box. This means
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
250 that it is a group type, but there are no contents, or no known way of
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
251 extracting contents of that group.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
252
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
253 When a group has been expanded, the indicator button changes from
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
254 @code{+} to @code{-}. This indicates that the contents are being shown.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
255 Click the @code{-} button to contract the group, or hide the contents
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
256 currently displayed.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
257
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
258 @subsubsection Tags
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
259 @cindex tags
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
260
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
261 Tags are the leaf nodes of the tree system. Tags are generally prefixed
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
262 with a simple character, such as @code{>}. Tags can only be jumped to using
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
263 @kbd{RET} or @kbd{e}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
264
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
265 @subsubsection Boolean Flags
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
266
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
267 Sometimes a group or tag is given a boolean flag. These flags appear as
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
268 extra text characters at the end of the line. Files mode uses boolean
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
269 flags, such as a @code{*} to indicate that a file has been checked out
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
270 of a versioning system.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
271
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
272 For additional flags,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
273 @c Note to self, update these to sub-nodes which are more relevant.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
274 @xref{File Mode}, @xref{Version Control}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
275
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
276 @subsubsection Unadorned Text
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
277
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
278 Unadorned text generally starts in column 0, without any special symbols
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
279 prefixing them. In buffers mode different buffer groups are prefixed
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
280 with a description of what the following buffers are (Files, scratch
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
281 buffers, and invisible buffers.)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
282
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
283 Unadorned text will generally be colorless, and not be clickable.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
284
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
285 @subsubsection Color Cues
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
286
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
287 Each type of Group, item indicator, and label is given a different
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
288 color. The colors chosen are dependent on a light or dark background.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
289 Of important note is that the "current item", which may be a buffer or
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
290 file name, is highlighted red, and underlined.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
291
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
292 Colors can be customized from the group @code{speedbar-faces}. Some
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
293 modes, such as for Info, will use the Info colors instead of default
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
294 speedbar colors as an indication of what is currently being displayed.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
295
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
296 The face naming convention mirrors the File display mode. Modes which
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
297 do not use files will attempt to use the same colors on analogous
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
298 entries.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
299
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
300 @node Mouse Bindings, Displays Submenu, Basic Visuals, Basic Navigation
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
301 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
302 @section Mouse Bindings
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
303 @cindex mouse bindings
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
304
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
305 The mouse has become a common information navigation tool. Speedbar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
306 will use the mouse to navigate file systems, buffer lists, and other
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
307 data. The different textual cues provide buttons which can be clicked
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
308 on @xref{Basic Visuals}. Anything that highlights can be clicked on
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
309 with the mouse, or effected by the menu.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
310
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
311 The mouse bindings are:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
312 @table @kbd
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
313 @item mouse-1
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
314 Move cursor to that location
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
315 @item mouse-2, double-mouse-1
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
316 Activate the current button. @kbd{double-mouse-1} is called a "double
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
317 click" on other platforms, and is useful for windows users with two
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
318 button mice.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
319 @item SHIFT-mouse-2, SHIFT-double-mouse-1
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
320 @cindex power click
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
321 This has the same effect as @kbd{mouse-2}, except it is called a power
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
322 click. This means that if a group with an expansion button @code{+} is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
323 clicked, any caches are flushed, and subitems re-read. If it is a name,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
324 it will be opened in a new frame.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
325 @item mouse-3
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
326 Activate the speedbar menu. The item selected effects the line clicked,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
327 not the line where the cursor was.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
328 @item mode-line mouse-1
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
329 Activate the menu. This effects the item the cursor is on before the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
330 click, since the mouse was not clicked on anything.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
331 @item C-mouse-1
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
332 Buffers sub-menu. The buffer in the attached frame is switched.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
333 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
334
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
335 When the mouse moves over buttons in speedbar, details of that item
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
336 should be displayed in the minibuffer of the attached frame. Sometimes
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
337 this can contain extra information such as file permissions, or tag
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
338 location.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
339
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
340 @node Displays Submenu, , Mouse Bindings, Basic Navigation
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
341 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
342 @section Displays Submenu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
343 @cindex displays submenu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
344
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
345 You can display different data by using different display modes. These
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
346 specialized modes make it easier to navigate the relevent pieces of
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
347 information, such as files and directories, or buffers.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
348
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
349 In the main menu, found by clicking @kbd{mouse-3}, there is a submenu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
350 labeled "Displays". This submenu lets you easily choose between
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
351 different display modes.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
352
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
353 The contents are modes currently loaded into emacs. By default, this
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
354 would include Files, Quick Buffers, and Buffers. Other major display
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
355 modes such as Info are loaded separately.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
356
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
357 @node File Mode, Buffer Mode, Basic Navigation, Top
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
358 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
359 @chapter File Mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
360 @cindex file mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
361
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
362 File mode displays a summary of your current directory. You can display
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
363 files in the attached frame, or summarize the tags found in files. You
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
364 can even see if a file is checked out of a version control system, or
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
365 has some associated object file.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
366
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
367 Advanced behaviors, like copying and renaming files is also provided.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
368
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
369 @menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
370 * Directory Display:: What the display means.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
371 * Hidden Files:: How to display hidden files.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
372 * File Keybindings:: Performing file operations.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
373 @end menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
374
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
375 @node Directory Display, Hidden Files, File Mode, File Mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
376 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
377 @section Directory Display
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
378 @cindex directory display
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
379
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
380 There are three major sections in the display. The first line or two is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
381 the root directory speedbar is currently viewing. You can jump to one
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
382 of the parent directories by clicking on the name of the directory you
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
383 wish to jump to.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
384
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
385 Next, directories are listed. A directory starts with the group
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
386 indicator button @code{<+>}. Clicking the directory name makes speedbar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
387 load that directory as the root directory for its display. Clicking the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
388 @code{<+>} button will list all directories and files beneath.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
389
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
390 Next, files are listed. Files start with the group indicator @code{[+]}
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
391 or @code{[?]}. You can jump to a file in the attached frame by clicking
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
392 on the file name. You can expand a file and look at it's tags by
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
393 clicking on the @code{[+]} symbol near the file name.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
394
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
395 A typical session might look like this:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
396 @example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
397 ~/lisp/
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
398 <+> checkdoc
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
399 <+> eieio
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
400 <-> speedbar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
401 [+] Makefile
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
402 [+] rpm.el #
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
403 [+] sb-gud.el #
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
404 [+] sb-info.el #
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
405 [+] sb-rmail.el #
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
406 [+] sb-w3.el
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
407 [-] speedbar.el *!
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
408 @{+@} Types
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
409 @{+@} Variables
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
410 @{+@} def (group)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
411 @{+@} speedbar-
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
412 [+] speedbar.texi *
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
413 <+> testme
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
414 [+] align.el
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
415 [+] autoconf.el
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
416 @end example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
417
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
418 In this example, you can see several directories. The directory
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
419 @file{speedbar} has been opened inline. Inside the directory
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
420 @file{speedbar}, the file @file{speedbar.el} has it's tags exposed.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
421 These tags are extensive, and they are summarized into tag groups.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
422
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
423 Files get additional boolean flags associated with them. Valid flags are:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
424 @cindex file flags
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
425 @table @code
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
426 @item *
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
427 This file has been checked out of a version control
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
428 system. @xref{Version Control}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
429 @item #
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
430 This file has an up to date object file associated with it. The
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
431 variable @code{speedbar-obj-alist} defines how speedbar determines this
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
432 value.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
433 @item !
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
434 This file has an out of date object file associated with it.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
435 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
436
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
437 A Tag group is prefixed with the symbol @samp{@{+@}}. Clicking this
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
438 symbol will show all symbols that have been organized into that group.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
439 Different types of files have unique tagging methods as defined by their
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
440 major mode. Tags are generated with either the @file{imenu} package, or
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
441 through an @file{etags} interface.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
442
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
443 Tag groups are defined in multiple ways which make it easier to find the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
444 tag you are looking for. Imenu keywords explicitly create groups, and
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
445 speedbar will automatically create groups if tag lists are too long.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
446
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
447 In our example, Imenu created the groups @samp{Types} and
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
448 @samp{Variables}. All remaining top-level symbols are then regrouped
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
449 based on the variable @code{speedbar-tag-hierarchy-method}. The
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
450 subgroups @samp{def} and @samp{speedbar-} are groupings where the first
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
451 few characters of the given symbols are specified in the group name.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
452 Some group names may say something like @samp{speedbar-t to speedbar-v},
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
453 indicating that all symbols which alphabetically fall between those
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
454 catagories are included in that sub-group. @xref{Tag Hierarchy Methods}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
455
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
456 @node Hidden Files, File Keybindings, Directory Display, File Mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
457 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
458 @section Hidden Files
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
459 @cindex hidden files
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
460
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
461 On unix, a hidden file is a file whose name starts with a period. They
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
462 are hidden from a regular directory listing because the user is not
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
463 generally interested in them.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
464
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
465 In speedbar, a hidden file is a file which isn't very interesting and
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
466 might prove distracting to the user. Any uninteresting files are
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
467 removed from the File display. There are two levels of interest in
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
468 speedbar. The first level of uninterest are files which have no
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
469 expansion method, or way of extracting tags. The second level is any
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
470 file that matches the same pattern used for completion in
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
471 @code{find-file}. This is derived from the variable
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
472 @code{completion-ignored-extensions}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
473
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
474 You can toggle the display of uninteresting files from the toggle menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
475 item "Show All Files". This will display all level one hidden files.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
476 These files will be shown with a @code{?} indicator. Level 2 hidden
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
477 files will still not be shown.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
478
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
479 Object files fall into the catagory of level 2 hidden files. You can
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
480 determine their presense by the @code{#} and @code{!} file indicators
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
481 @xref{Directory Display}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
482
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
483 @node File Keybindings, , Hidden Files, File Mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
484 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
485 @section File Keybindings
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
486 @cindex file keybindings
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
487
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
488 Files mode has keybindings permitting different file system operations
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
489 such as copy or rename. These commands all operate on "the current
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
490 file." In this case, the current file is the file at point, or clicked
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
491 on when pulling up the menu.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
492
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
493 @table @kbd
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
494 @item U
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
495 Move the entire speedbar display up one directory.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
496 @item I
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
497 Display information in the minibuffer about this line. This is the same
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
498 information shown when navigating with @kbd{n} and @kbd{p}, or moving
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
499 the mouse over an item.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
500 @item B
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
501 Byte compile the Emacs Lisp file on this line.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
502 @item L
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
503 Load the Emacs Lisp file on this line. If an elc file exists, optionally load
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
504 that.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
505 @item C
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
506 Copy the current file to some other location.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
507 @item R
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
508 Rename the current file, possibly moving it to some other location.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
509 @item D
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
510 Delete the current file.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
511 @item O
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
512 Delete the current file's object file. Use the symbols @samp{#} and
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
513 @samp{!} to determine if there is an object file available.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
514 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
515
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
516 One menu item toggles the display of all available files. By default,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
517 only files which Emacs understands, and knows how to convert into a tag
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
518 list. By showing all files, additional files such as text files are
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
519 also displayed, but they are prefixed with the @samp{[?]} symbol. This
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
520 means that it is a file, but that Emacs doesn't know how to expand it.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
521
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
522 @node Buffer Mode, Minor Modes, File Mode, Top
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
523 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
524 @chapter Buffer Mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
525 @cindex buffer mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
526
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
527 Buffer mode is very similar to file mode, except that instead of
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
528 tracking the current directory and all files available there, the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
529 current list of buffers already loaded into Emacs is shown.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
530
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
531 These buffers can have their tags expanded in the same way as files
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
532 and uses the same unknown file indicator @xref{File Mode}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
533
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
534 Buffers mode does not have file operation bindings, but the following
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
535 buffer specific keybindings are available:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
536 @table @kbd
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
537 @item k
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
538 Kill this buffer. Do not touch it's file.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
539 @item r
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
540 Revert this buffer, reloading from disk.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
541 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
542
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
543 In addition to buffers mode, there is also Quick Buffers mode. In fact,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
544 Quick Buffers is bound to the @kbd{b} key. The only difference between
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
545 Buffers and Quick Buffers is that after one operation is is performed
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
546 which effects the attached frame, the display is immediately reverted to
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
547 the last displayed mode.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
548
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
549 Thus, if you are in Files mode, and you need quick access to a buffer,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
550 press @kbd{b}, click on the buffer you want, and speedbar will revert
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
551 back to Files mode.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
552
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
553 @node Minor Modes, Customizing, Buffer Mode, Top
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
554 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
555 @chapter Minor Display Modes
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
556 @cindex minor display modes
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
557
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
558 For some buffers, a list of files and tags makes no sense. This could
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
559 be because files are not currently in reference (such as web pages), or
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
560 that the files you might be interested have special properties (such as
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
561 email folders.)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
562
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
563 In these cases, a minor display mode is needed. A minor display mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
564 will override any major display mode currently being displayed for the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
565 duration of the specialized buffer's use. Minor display modes
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
566 will follow the general rules of their major counterparts in terms of
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
567 keybindings and visuals, but will have specialized behaviors.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
568
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
569 @menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
570 * RMAIL:: Managing folders in speedbar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
571 * Info:: Browsing topics in speedbar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
572 * GDB:: Managing the current stack trace in speedbar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
573 @end menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
574
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
575 @node RMAIL, Info, Minor Modes, Minor Modes
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
576 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
577 @section RMAIL
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
578 @cindex RMAIL
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
579
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
580 When using RMAIL, speedbar will display two sections. The first is a
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
581 layer one reply button. Clicking here will initialize a reply buffer
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
582 showing only this email address in the @samp{To:} field.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
583
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
584 The second section lists all RMAIL folders in the same directory as your
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
585 main RMAIL folder. The general rule is that RMAIL folders always appear
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
586 in all caps, or numbers. It is possible to save mail in folders with
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
587 lower case letters, but there is no clean way detecting RMAIL folders
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
588 without opening them all.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
589
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
590 Each folder can be visited by clicking the name. You can move mail from
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
591 the current RMAIL folder into a different folder by clicking the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
592 @samp{<M>} button. The M stands for Move.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
593
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
594 In this way you can manage your existing RMAIL folders fairly easily
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
595 using the mouse.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
596
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
597 @node Info, GDB, RMAIL, Minor Modes
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
598 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
599 @section Info
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
600 @cindex Info
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
601
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
602 When browsing Info files, all local relevant information is displayed in
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
603 the info buffer and a topical high-level view is provided in speedbar.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
604 All top-level info nodes are shown in the speedbar frame, and can be
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
605 jumped to by clicking the name.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
606
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
607 You can open these nodes with the @samp{[+]} button to see what sub-topics
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
608 are available. Since these sub-topics are not examined until you click
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
609 the @samp{[+]} button, sometimes a @samp{[?]} will appear when you click on
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
610 a @samp{[+]}, indicating that there are no sub-topics.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
611
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
612 @node GDB, , Info, Minor Modes
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
613 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
614 @section GDB
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
615 @cindex gdb
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
616 @cindex gud
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
617
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
618 If you are debugging an application with GDB in emacs, speedbar can show
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
619 you the current stack when the current buffer is the @file{*gdb*}
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
620 buffer. Usually, it will just report that there is no stack, but when
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
621 the application is stopped, the current stack will be shown.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
622
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
623 You can click on any stack element and gdb will move to that stack
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
624 level. You can then check variables local to that level at the GDB
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
625 prompt.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
626
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
627 This mode has the unfortunate side-effect of breaking GDB's repeat
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
628 feature when you hit @kbd{RET} since your previous command is overridden
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
629 with a stack fetching command.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
630
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
631 @node Customizing, Extending, Minor Modes, Top
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
632 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
633 @chapter Customizing
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
634 @cindex customizing
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
635
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
636 Speedbar is highly customizable, with a plethora of control elements.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
637 Since speedbar is so visual and reduces so much information, this is an
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
638 important aspect of it's behavior.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
639
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
640 In general, there are three custom groups you can use to quickly modify
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
641 speedbar's behavior.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
642
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
643 @table @code
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
644 @item speedbar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
645 Basic speedbar behaviors.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
646 @item speedbar-vc
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
647 Customizations regarding version control handling.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
648 @item speedbar-faces
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
649 Customize speedbar's many colors and fonts.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
650 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
651
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
652 @menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
653 * Frames and Faces:: Visible behaviors.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
654 * Tag Hierarchy Methods:: Customizing how tags are displayed.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
655 * Version Control:: Adding new VC detection modes.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
656 * Hooks:: The many hooks you can use.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
657 @end menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
658
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
659 @node Frames and Faces, Tag Hierarchy Methods, Customizing, Customizing
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
660 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
661 @section Frames and Faces
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
662 @cindex faces
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
663 @cindex frame parameters
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
664
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
665 There are several faces speedbar generates to provide a consistent
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
666 colorscheme across display types. You can customize these faces using
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
667 your favorite method. They are:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
668
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
669 @table @asis
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
670 @item speedbar-button-face
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
671 Faced used on expand/contract buttons.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
672 @item speedbar-file-face
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
673 Face used on Files. Should also be used on non-directory like nodes.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
674 @item speedbar-directory-face
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
675 Face used for directories, or nodes which consist of groups of other nodes.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
676 @item speedbar-tag-face
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
677 Face used for tags in a file, or leaf items.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
678 @item speedbar-selected-face
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
679 Face used to highlight the "selected" item. This would be the current
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
680 file being edited.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
681 @item speedbar-highlight-face
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
682 Face used when the mouse passes over a button.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
683 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
684
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
685 You can also customize speedbar's initial frame parameters. How this is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
686 accomplished is dependent on your platform being Emacs or XEmacs.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
687
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
688 In Emacs, change the alist @code{speedbar-frame-parameters}. This
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
689 variable is used to set up initial details. Height is also
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
690 automatically added when speedbar is created, though you can override
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
691 it.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
692
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
693 In XEmacs, change the plist @code{speedbar-frame-plist}. This is the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
694 XEmacs way of doing the same thing.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
695
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
696 @node Tag Hierarchy Methods, Version Control, Frames and Faces, Customizing
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
697 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
698 @section Tag Hierarchy Methods
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
699 @cindex tag hierarchy
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
700 @cindex tag groups
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
701 @cindex tag sorting
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
702
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
703 When listing tags within a file, it is possible to get an annoyingly
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
704 long list of entries. Imenu (which generates the tag list in Emacs)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
705 will group some classes of items automatically. Even here, however,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
706 some tag groups can be quite large.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
707
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
708 To solve this problem, tags can be grouped into logical units through a
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
709 hierarchy processor. The specific variable to use is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
710 @code{speedbar-tag-hierarchy-method}. There are several methods that
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
711 can be applied in any order. they are:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
712
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
713 @table @code
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
714 @item speedbar-trim-words-tag-hierarchy
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
715 Find a common prefix for all elements of a group, and trim it off.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
716 @item speedbar-prefix-group-tag-hierarchy
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
717 If a group is too large, place sets of tags into bins based on common
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
718 prefixes.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
719 @item speedbar-simple-group-tag-hierarchy
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
720 Take all items in the top level list not in a group, and stick them into
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
721 a `Tags' group.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
722 @item speedbar-sort-tag-hierarchy
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
723 Sort all items, leaving groups on top.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
724 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
725
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
726 You can also add your own functions to reorganize tags as you see fit.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
727
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
728 Some other control variables are:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
729
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
730 @table @code
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
731 @item speedbar-tag-group-name-minimum-length
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
732 Default Value: 4.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
733
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
734 The minimum length of a prefix group name before expanding. Thus, if
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
735 the @code{speedbar-tag-hierarchy-method} includes
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
736 @code{speedbar-prefix-group-tag-hierarchy} and one such group's common
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
737 characters is less than this number of characters, then the group name
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
738 will be changed to the form of:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
739
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
740 @example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
741 worda to wordb
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
742 @end example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
743
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
744 instead of just
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
745
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
746 @example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
747 word
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
748 @end example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
749
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
750 This way we won't get silly looking listings.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
751
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
752 @item speedbar-tag-split-minimum-length
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
753 Default value: 20
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
754
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
755 Minimum length before we stop trying to create sub-lists in tags.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
756 This is used by all tag-hierarchy methods that break large lists into
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
757 sub-lists.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
758
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
759 @item speedbar-tag-regroup-maximum-length
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
760 Default value: 10
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
761
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
762 Maximum length of submenus that are regrouped.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
763 If the regrouping option is used, then if two or more short subgroups
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
764 are next to each other, then they are combined until this number of
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
765 items is reached.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
766
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
767 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
768
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
769 @node Version Control, Hooks, Tag Hierarchy Methods, Customizing
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
770 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
771 @section Version Control
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
772 @cindex version control
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
773 @cindex vc extensions
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
774
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
775 When using the Files mode in speedbar, information regarding a version
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
776 control system adds small details to the display. If a file is in a
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
777 version control system, and is "checked out", or "locked" locally, an
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
778 asterisk @asis{*} is placed at the end of the file name. In addition,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
779 the directory name for Version Control systems are left out of the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
780 speedbar display.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
781
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
782 You can easily add new version control systems into speedbar's detection
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
783 scheme. To make a directory "disappear" from the list, use the variable
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
784 @code{speedbar-directory-unshown-regexp}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
785
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
786 Next, you need to write entries for two hooks. The first is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
787 @code{speedbar-vc-path-enable-hook} which will enable a VC check in the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
788 current directory for the group of files being checked. Your hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
789 function should take one parameter (the directory to check) and return
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
790 @code{t} if your VC method is in control here.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
791
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
792 The second function is @code{speedbar-vc-in-control-hook}. This hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
793 takes two parameters. The @var{PATH} of the file to check, plus the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
794 @var{FILE} name. Return @code{t} if you want to have the asterisk
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
795 placed near this file.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
796
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
797 Lastly, you can change the VC indicator using the variable
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
798 @code{speedbar-vc-indicator}, and specify a single character string.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
799
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
800 @node Hooks, , Version Control, Customizing
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
801 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
802 @section Hooks
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
803
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
804 There are several hooks in speedbar allowing custom behaviors to be
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
805 added. Available hooks are:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
806
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
807 @table @code
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
808 @item speedbar-visiting-file-hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
809 Hooks run when speedbar visits a file in the selected frame.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
810 @item speedbar-visiting-tag-hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
811 Hooks run when speedbar visits a tag in the selected frame.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
812 @item speedbar-load-hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
813 Hooks run when speedbar is loaded.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
814 @item speedbar-reconfigure-keymaps-hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
815 Hooks run when the keymaps are regenerated. Keymaps are reconfigured
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
816 whenever modes change. This will let you add custom keybindings.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
817 @item speedbar-before-popup-hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
818 Hooks called before popping up the speedbar frame.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
819 New frames are often popped up when "power clicking" on an item to view
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
820 it.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
821 @item speedbar-before-delete-hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
822 Hooks called before deleting or hiding the speedbar frame.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
823 @item speedbar-mode-hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
824 Hooks called after creating a speedbar buffer.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
825 @item speedbar-timer-hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
826 Hooks called after running the speedbar timer function.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
827 @item speedbar-scanner-reset-hook
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
828 Hook called whenever generic scanners are reset.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
829 Set this to implement your own scanning / rescan safe functions with
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
830 state data.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
831 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
832
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
833 @node Extending, Index, Customizing, Top
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
834 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
835 @chapter Extending
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
836 @cindex extending
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
837
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
838 Speedbar can run different types of Major display modes such as Files
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
839 @xref{File Mode}, and Buffers @xref{Buffer Mode}. It can also manage
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
840 different minor display modes for use with buffers handling specialized
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
841 data.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
842
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
843 These major and minor display modes are handled through an extension
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
844 system which permits specialized keymaps and menu extensions, in
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
845 addition to a unique rendering function. You can also specify a wide
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
846 range of tagging functions. The default uses @file{imenu}, but new
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
847 tagginging methods can be easilly added. In this chapter, you will
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
848 learn how to write your own major or minor display modes, and how to
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
849 create specialized tagging functions.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
850
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
851 @menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
852 * Minor Display Modes:: How to create a minor display mode.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
853 * Major Display Modes:: How to create a major display mode.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
854 * Tagging Extentions:: How to create your own tagging methods.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
855 * Creating a display:: How to insert buttons and hierarchies.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
856 @end menu
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
857
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
858 @node Minor Display Modes, Major Display Modes, Extending, Extending
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
859 @section Minor Display Modes
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
860 @cindex create minor display mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
861
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
862 A minor display mode is a mode useful when using a specific type of
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
863 buffer. This mode might not be useful for any other kind of data or
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
864 mode, or may just be more useful that a files or buffers based mode when
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
865 working with a specialized mode.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
866
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
867 Examples that already exist for speedbar include RMAIL, Info, and gdb.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
868 These modes display information specific to the major mode shown in the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
869 attached frame.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
870
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
871 To enable a minor display mode in your favorite Major mode, follow these
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
872 steps. The string @samp{<name>} is the name of the major mode being
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
873 augmented with speedbar.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
874
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
875 @enumerate
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
876 @item
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
877 Create the keymap variable @code{<name>-speedbar-key-map}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
878 @item
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
879 Create a function named whatever you like which assigns values into your
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
880 keymap. Use this command to create the keymap before assigning
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
881 bindings:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
882 @example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
883 (setq <name>-speedbar-key-map (speedbar-make-specialized-keymap))
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
884 @end example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
885 This function creates a special keymap for use in speedbar.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
886 @item
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
887 Call your install function, or assign it to a hook like this:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
888 @example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
889 (if (featurep 'speedbar)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
890 (<name>-install-speedbar-variables)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
891 (add-hook 'speedbar-load-hook '<name>-install-speedbar-variables))
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
892 @end example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
893 @item
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
894 Create an easymenu compatible vector named @code{<name>-speedbar-menu-items}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
895 This will be spliced into speedbar's control menu.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
896 @item
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
897 Create a function called @code{<name>-speedbar-buttons}. This function
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
898 should take one variable, which is the buffer for which it will create
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
899 buttons. At this time @code{(current-buffer)} will point to the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
900 uncleared speedbar buffer.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
901 @end enumerate
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
902
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
903 When writing @code{<name>-speedbar-buttons}, the first thing you will
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
904 want to do is execute a check to see if you need to re-create your
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
905 display. If it needs to be cleared, you need to erase the speedbar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
906 buffer yourself, and start drawing buttons. @xref{Creating a display}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
907
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
908 @node Major Display Modes, Tagging Extentions, Minor Display Modes, Extending
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
909 @section Major Display Modes
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
910 @cindex create major display mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
911
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
912 Creating a Major Display Mode for speedbar requires authoring a keymap,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
913 an easy-menu segment, and writing several functions. These items can be
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
914 given any name, and are made the same way as in a minor display mode
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
915 @xref{Minor Display Modes}. Once this is done, these items need to be
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
916 registered.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
917
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
918 Because this setup activity may or may not have speedbar available when
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
919 it is being loaded, it is necessary to create an install function. This
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
920 function should create and initialize the keymap, and add your
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
921 expansions into the customization tables.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
922
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
923 When creating the keymap, use the function
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
924 @code{speedbar-make-specialized-keymap} instead of other keymap making
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
925 functions. This will provide you with the initial bindings needed.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
926 Some common speedbar functions you might want to bind are:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
927
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
928 @table @code
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
929 @item speedbar-edit-line
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
930 Edit the item on the current line.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
931 @item speedbar-expand-line
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
932 Expand the item under the cursor.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
933 With universal argument @key{C-u}, flush cached data before expanding.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
934 @item speedbar-contract-line
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
935 Contract the item under the cursor.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
936 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
937
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
938 These function require that function @code{speedbar-line-path} be
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
939 correctly overloaded to work.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
940
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
941 Next, register your extension like this;
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
942
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
943 @example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
944 (speedbar-add-expansion-list '("MyExtension"
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
945 MyExtension-speedbar-menu-items
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
946 MyExtension-speedbar-key-map
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
947 MyExtension-speedbar-buttons))
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
948 @end example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
949
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
950 There are no limitations to the names you use.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
951
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
952 The first parameter is the string representing your display mode.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
953 The second parameter is a variable name containing an easymenu compatible
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
954 menu definition. This will be stuck in the middle of speedbar's menu.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
955 The third parameter is the variable name containing the keymap we
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
956 discussed earlier.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
957 The last parameter is a function which draws buttons for your mode.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
958 This function must take two parameters. The directory currently being
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
959 displayed, and the depth at which you should start rendering buttons.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
960 The function will then draw (starting at the current cursor position)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
961 any buttons deemed necessary based on the input parameters.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
962 @xref{Creating a display}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
963
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
964 Next, you need to register function overrides. This may look something
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
965 like this:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
966
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
967 @example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
968 (speedbar-add-mode-functions-list
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
969 '("MYEXTENSION"
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
970 (speedbar-item-info . MyExtension-speedbar-item-info)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
971 (speedbar-line-path . MyExtension-speedbar-line-path)))
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
972 @end example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
973
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
974 The first element in the list is the name of you extension. The second
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
975 is an alist of functions to overload. The function to overload is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
976 first, followed by what you want called instead.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
977
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
978 For @code{speedbar-line-path} your function should take an optional DEPTH
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
979 parameter. This is the starting depth for heavily indented lines. If
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
980 it is not provided, you can derive it like this:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
981
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
982 @example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
983 (save-match-data
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
984 (if (not depth)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
985 (progn
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
986 (beginning-of-line)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
987 (looking-at "^\\([0-9]+\\):")
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
988 (setq depth (string-to-int (match-string 1)))))
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
989 @end example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
990
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
991 where the depth is stored as invisible text at the beginning of each
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
992 line.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
993
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
994 The path returned should be the full path name of the file associated
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
995 with that line. If the cursor is on a tag, then the file containing
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
996 that tag should be returned. This is critical for built in file based
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
997 functions to work (meaning less code for you to write). If your display
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
998 does not deal in files, you do not need to overload this function.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
999
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1000 The function @code{speedbar-item-info}, however, is very likely to need
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1001 overloading. This function takes no parameters and must derive a text
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1002 summary to display in the minibuffer.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1003
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1004 There are several helper functions you can use if you are going to use
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1005 built in tagging. These functions can be @code{or}ed since each one
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1006 returns non-nil if it displays a message. They are:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1007
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1008 @table @code
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1009 @item speedbar-item-info-file-helper
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1010 This takes an optional FILENAME parameter. You can derive your own
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1011 filename, or it will derive it using a (possibly overloaded) function
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1012 @code{speedbar-line-file}. It shows details about a file.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1013 @item speedbar-item-info-tag-helper
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1014 If the current line is a tag, then display information about that tag,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1015 such as it's parent file, and location.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1016 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1017
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1018 Your custom function might look like this:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1019
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1020 (defun MyExtension-item-info ()
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1021 "Display information about the current line."
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1022 (or (speedbar-item-info-tag-helper)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1023 (message "Interesting detail.")))
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1024
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1025 Once you have done all this, speedbar will show an entry in the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1026 Displays menu declaring that your extension is available.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1027
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1028 @node Tagging Extentions, Creating a display, Major Display Modes, Extending
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1029 @section Tagging Extentions
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1030
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1031 It is possible to create new methods for tagging files in speedbar.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1032 To do this, you need two basic functions. One function will fetch the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1033 tags from a buffer, and the second will insert them below the filename.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1034
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1035 @defun my-fetch-dynamic-tags file
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1036 Parse @var{file} for a list of tags. Return the list, or t if there was
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1037 an error.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1038 @end defun
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1039
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1040 The non-error return value can be anything, as long as it can be
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1041 inserted by it's paired function:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1042
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1043 @defun my-insert-tag-list level lst
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1044 Insert a list of tags @var{lst} started at indentation level
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1045 @var{level}. Creates buttons for each tag, and provides any other
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1046 display information requried.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1047 @end defun
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1048
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1049 It is often useful to use @code{speedbar-create-tag-hierarchy} on your
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1050 token list. See that functions documentation for details on what it
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1051 requires.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1052
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1053 Once these two functions are written, modify the variable
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1054 @code{speedbar-dynamic-tags-function-list} to include your parser at the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1055 beginning, like this:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1056
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1057 @example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1058 (add-to-list 'speedbar-dynamic-tags-function-list
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1059 '(my-fetch-dynamic-tags . my-insert-tag-list))
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1060 @end example
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1061
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1062 If your parser is only good for a few types of files, make sure that it
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1063 is either a buffer local modification, or that the tag generator returns
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1064 t for non valid buffers.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1065
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1066 @node Creating a display, , Tagging Extentions, Extending
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1067 @section Creating a display
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1068 @cindex creating a display
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1069
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1070 Rendering a display in speedbar is completely flexible. When your
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1071 button function is called, @xref{Minor Display Modes}, @xref{Major
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1072 Display Modes}, you have control to @code{insert} anything you want.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1073
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1074 The conventions allow almost anything to be inserted, but several helper
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1075 functions are provided to make it easy to create the standardized
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1076 buttons.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1077
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1078 To understand the built in functions, each "button" in speedbar consists
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1079 of four important pieces of data. The text to be displayed, token
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1080 data to be associated with the text, a function to call, and some face to
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1081 display it in.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1082
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1083 When a function is provided, then that text becomes mouse activated,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1084 meaning the mouse will highlight the text.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1085
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1086 Additionally, for data which can form deep trees, each line is given a
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1087 depth which indicates how far down the tree it is. This information is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1088 stored in invisible text at the beginning of each line, and is used by
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1089 the navigation commands.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1090
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1091 @defun speedbar-insert-button text face mouse function @@optional token prevline
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1092 This function inserts one button into the current location.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1093 @var{text} is the text to insert. @var{face} is the face in which it
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1094 will be displayed. @var{mouse} is the face to display over the text
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1095 when the mouse passes over it. @var{function} is called whenever the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1096 user clicks on the text.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1097
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1098 The optional argument @var{token} is extra data to associated with the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1099 text. Lastly @var{prevline} should be non-nil if you want this line to
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1100 appear directly after the last button which was created instead of on
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1101 the next line.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1102 @end defun
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1103
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1104 @defun speedbar-make-tag-line exp-button-type exp-button-char exp-button-function exp-button-data tag-button tag-button-function tag-button-data tag-button-face depth
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1105
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1106 Create a tag line with @var{exp-button-type} for the small expansion
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1107 button. This is the button that expands or contracts a node (if
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1108 applicable), and @var{exp-button-char} the character in it (+, -, ?,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1109 etc). @var{exp-button-function} is the function to call if it's clicked
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1110 on. Button types are @code{'bracket}, @code{'angle}, @code{'curly},
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1111 @code{'expandtag}, @code{'statictag}, or nil. @var{exp-button-data} is
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1112 extra data attached to the text forming the expansion button.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1113
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1114 Next, @var{tag-button} is the text of the tag.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1115 @var{tag-button-function} is the function to call if clicked on, and
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1116 @var{tag-button-data} is the data to attach to the text field (such a
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1117 tag positioning, etc). @var{tag-button-face} is a face used for this
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1118 type of tag.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1119
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1120 Lastly, @var{depth} shows the depth of expansion.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1121
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1122 This function assumes that the cursor is in the speedbar window at the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1123 position to insert a new item, and that the new item will end with a CR
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1124 @end defun
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1125
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1126 @defun speedbar-insert-generic-list level list expand-fun find-fun
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1127
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1128 At @var{LEVEL}, (the current indentation level desired) insert a generic
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1129 multi-level alist @var{list}. Associations with lists get @samp{@{+@}}
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1130 tags (to expand into more nodes) and those with positions or other data
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1131 just get a > as the indicator. @samp{@{+@}} buttons will have the
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1132 function @var{expand-fun} and the token is the @code{cdr} list. The
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1133 token name will have the function @var{find-fun} and not token.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1134
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1135 Each element of the list can have one of these forms:
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1136 @table @code
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1137 @item ("name" . marker-or-number)
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1138 one tag at this level
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1139 @item ("name" ("name" . marker-or-number) ("name" . marker-or-number) ... )
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1140 One group of tags
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1141 @item ("name" marker-or-number ("name" . marker-or-number) ... )
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1142 One Group of tags where the group has a starting position
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1143 @end table
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1144
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1145 When you use @code{speedbar-insert-generic-list}, there are some
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1146 variables you can set buffer-locally to change the behavior. The most
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1147 obvious is @code{speedbar-tag-hierarchy-method}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1148 @xref{Tag Hierarchy Methods}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1149
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1150 @defvar speedbar-generic-list-group-expand-button-type
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1151 This is the button type used for groups of tags, weather expanded,
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1152 or added in via a hierarchy method. Two good values are
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1153 @code{'curly} and @code{'expandtag}. Curly is the default button, and
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1154 @code{'expandtag} is useful if the groups also has a position.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1155 @end defvar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1156
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1157 @defvar speedbar-generic-list-tag-button-type
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1158 This is the button type used for a single tag.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1159 Two good values are @code{nil} and @code{'statictag}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1160 @code{nil} is the default, and @code{'statictag} has the same width as
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1161 @code{'expandtag}.
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1162 @end defvar
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1163
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1164 @end defun
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1165
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1166 @node Index, , Extending, Top
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1167 @comment node-name, next, previous, up
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1168 @unnumbered Concept Index
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1169 @printindex cp
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1170
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1171 @unnumbered Function Index
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1172 @printindex fn
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1173
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1174 @bye
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1175 @c LocalWords: speedbar's xref Keybindings slowbar kbd subsubsection
4cbd3d907ee5 First Edition.
Eric M. Ludlam <zappo@gnu.org>
parents:
diff changeset
1176 @c LocalWords: keybindings