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