~ubuntu-branches/debian/lenny/ecb/lenny

« back to all changes in this revision

Viewing changes to html-help/ecb-directories.html

  • Committer: Bazaar Package Importer
  • Author(s): Joerg Jaspert
  • Date: 2004-02-16 23:16:24 UTC
  • Revision ID: james.westby@ubuntu.com-20040216231624-brlrnyp41twx033r
Tags: upstream-2.21
ImportĀ upstreamĀ versionĀ 2.21

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html lang="en">
 
2
<head>
 
3
<title>ECB - the Emacs Code Browser</title>
 
4
<meta http-equiv="Content-Type" content="text/html">
 
5
<meta name=description content="ECB - the Emacs Code Browser">
 
6
<meta name=generator content="makeinfo 4.2">
 
7
<link href="http://www.gnu.org/software/texinfo/" rel=generator-home>
 
8
</head>
 
9
<body>
 
10
<p>
 
11
Node:<a name="ecb-directories">ecb-directories</a>,
 
12
Next:<a rel=next accesskey=n href="ecb-sources.html#ecb-sources">ecb-sources</a>,
 
13
Previous:<a rel=previous accesskey=p href="ecb-tree-buffer.html#ecb-tree-buffer">ecb-tree-buffer</a>,
 
14
Up:<a rel=up accesskey=u href="Customizable-options.html#Customizable%20options">Customizable options</a>
 
15
<hr><br>
 
16
 
 
17
<h4>Group ecb-directories</h4>
 
18
 
 
19
<p>This group contains settings for the directories-buffer in the ECB:
 
20
 
 
21
<p>
 
22
<table width="100%">
 
23
<tr>
 
24
<td align="left"><b>add-path-for-not-matching-files</b><i>
 
25
</i></td>
 
26
<td align="right">User Option</td>
 
27
</tr>
 
28
</table>
 
29
<table width="95%" align="center">
 
30
<tr><td>
 
31
Add path of a file to <code>ecb-source-path</code> if not already contained. 
 
32
This is done during the auto. windows synchronization which happens if
 
33
a file is opened not via the file/directory-browser of ECB. In such a
 
34
situation ECB adds the path of the new file auto. to
 
35
<code>ecb-source-path</code> at least temporally for the current Emacs
 
36
session. This option defines two things:
 
37
 
 
38
<ol type=1 start=1>
 
39
</p><li>Should only the root-part (which means for Unix-like systems always
 
40
'/' and for windows-like systems the drive) of the new file be added
 
41
as source-path to <code>ecb-source-path</code> or the whole directory-part? 
 
42
<li>Should this path be added for future sessions too?
 
43
</ol>
 
44
 
 
45
<p>The value of this option is a cons-cell where the car is a boolean for
 
46
1. and the cdr is a boolean for 2.
 
47
 
 
48
<p>A value of not nil for the car (1.) is reasonably if a user often
 
49
opens files not via the ECB-browser which are not located in any of
 
50
the paths of <code>ecb-source-path</code> because then only one path for
 
51
each drive (windows) or the root-path (Unix) is added to the directory
 
52
buffer of ECB. 
 
53
</td></tr>
 
54
</table>
 
55
 
 
56
<p>
 
57
<table width="100%">
 
58
<tr>
 
59
<td align="left"><b>auto-expand-directory-tree</b><i>
 
60
</i></td>
 
61
<td align="right">User Option</td>
 
62
</tr>
 
63
</table>
 
64
<table width="95%" align="center">
 
65
<tr><td>
 
66
Automatically expand the directory tree to the current source file. 
 
67
There are three options:
 
68
 
 
69
<ul>
 
70
<li><code>best</code>: Expand the best-matching source-path
 
71
<li><code>first</code>: Expand the first matching source-path
 
72
<li><code>nil</code>: Do not automatically expand the directory tree. 
 
73
</ul>
 
74
</td></tr>
 
75
</table>
 
76
 
 
77
<p>
 
78
<table width="100%">
 
79
<tr>
 
80
<td align="left"><b>cache-directory-contents</b><i>
 
81
</i></td>
 
82
<td align="right">User Option</td>
 
83
</tr>
 
84
</table>
 
85
<table width="95%" align="center">
 
86
<tr><td>
 
87
Cache contents of directories.
 
88
 
 
89
<p>This can be useful if <code>ecb-source-path</code> contains directories with
 
90
many files and subdirs, especially if these directories are mounted
 
91
net-drives ("many" means here something &gt; 500, dependent of the speed
 
92
of the net-connection and the machine). For these directories
 
93
actualizing the sources- and/or directories- buffer of ECB (if
 
94
displayed in current layout!) can slow down dramatically so a caching
 
95
increases speed a lot.
 
96
 
 
97
<p>The value of this option is a list where each element is a cons-cell
 
98
and looks like:
 
99
 
 
100
<br><pre>  (&lt;dir-regexp&gt; . &lt;filenumber threshold&gt;) with
 
101
</pre>
 
102
 
 
103
<dl>
 
104
<dt><code>&lt;dir-regexp&gt;:</code>
 
105
<dd>Regular expression a directory must match to be cached. 
 
106
<br><dt><code>&lt;filenumber threshold&gt;:</code>
 
107
<dd>Number of directory contents must exceed this number. 
 
108
</dl>
 
109
 
 
110
<p>A directory will only be cached if and only if the directory-name
 
111
matches at least one rexexp of this option and its content-number
 
112
exceeds the related threshold AND the directory-name matches NOT any
 
113
regexp of <code>ecb-cache-directory-contents-not</code>!
 
114
 
 
115
<p>The cache entry for a certain directory will be refreshed and
 
116
actualized only by using the POWER-click (see
 
117
<code>ecb-primary-secondary-mouse-buttons</code>) in the directories-buffer
 
118
of ECB (see <a href="Using-the-mouse.html#Using%20the%20mouse">Using the mouse</a>).
 
119
 
 
120
<p>Examples:
 
121
 
 
122
<p>A value of <code>(("/usr/home/john_smith/bigdir*" . 1000))</code> means the
 
123
contents of every subdirectory of the home-directory of John Smith
 
124
will be cached if the directory contains more than 1000 entries and
 
125
its name begins with "bigdir".
 
126
 
 
127
<p>A value of <code>((".*" . 1000))</code> caches every directory which has more
 
128
than 1000 entries.
 
129
 
 
130
<p>A value of <code>((".*" . 0))</code> caches every directory regardless of the
 
131
number of entries."
 
132
 
 
133
<p>Please note: If you want your home-dir being cached then you MUST NOT
 
134
use "~" because ECB tries always to match full path-names! 
 
135
</td></tr>
 
136
</table>
 
137
 
 
138
<p>
 
139
<table width="100%">
 
140
<tr>
 
141
<td align="left"><b>cache-directory-contents-not</b><i>
 
142
</i></td>
 
143
<td align="right">User Option</td>
 
144
</tr>
 
145
</table>
 
146
<table width="95%" align="center">
 
147
<tr><td>
 
148
Do not cache the contents of certain directories. The value of this
 
149
option is a list where the each element is a regular expression a
 
150
directory must match if it should not being cached.
 
151
 
 
152
<p>If a directory-name matches at least one of the regexps of this option
 
153
the directory-contents will never being cached. See
 
154
<code>ecb-cache-directory-contents</code> to see when a directory will be
 
155
cached.
 
156
 
 
157
<p>This option can be useful when normally all directories with a certain
 
158
amount of content (files and subdirs) should be cached but some
 
159
special directories not. This can be achieved by:
 
160
 
 
161
<ul>
 
162
<li>Setting <code>ecb-cache-directory-contents</code> to ((".*" . 500)):
 
163
Caches all directories with more then 500 entries
 
164
 
 
165
<li>Setting <code>ecb-cache-directory-contents-not</code> to a value which
 
166
matches these directories which should not being cached (e.g. 
 
167
("/usr/home/john_smith") excludes the HOME-directory of John Smith
 
168
from being cached). 
 
169
</ul>
 
170
 
 
171
<p>Please note: If you want your home-dir exclude from being cached then
 
172
you MUST NOT use "~" because ECB tries always to match full
 
173
path-names! 
 
174
</td></tr>
 
175
</table>
 
176
 
 
177
<p>
 
178
<table width="100%">
 
179
<tr>
 
180
<td align="left"><b>directories-buffer-after-create-hook</b><i>
 
181
</i></td>
 
182
<td align="right">User Option</td>
 
183
</tr>
 
184
</table>
 
185
<table width="95%" align="center">
 
186
<tr><td>
 
187
Local hook running after the creation of the directories-buffer. Every
 
188
function of this hook is called once without arguments direct after
 
189
creating the directories-buffer of ECB and it's local key-map. So for
 
190
example a function could be added which performs calls of
 
191
<code>local-set-key</code> to define new keybindings only for the
 
192
directories-buffer of ECB.
 
193
 
 
194
<p>The following keys must not be rebind in the directories-buffer:
 
195
<kbd>F2</kbd>, <kbd>F3</kbd> and <kbd>F4</kbd>
 
196
</td></tr>
 
197
</table>
 
198
 
 
199
<p>
 
200
<table width="100%">
 
201
<tr>
 
202
<td align="left"><b>directories-buffer-name</b><i>
 
203
</i></td>
 
204
<td align="right">User Option</td>
 
205
</tr>
 
206
</table>
 
207
<table width="95%" align="center">
 
208
<tr><td>
 
209
Name of the ECB directory buffer. Because it is not a normal buffer
 
210
for editing you should enclose the name with stars, e.g. " *ECB
 
211
Directories*".
 
212
 
 
213
<p>If it is necessary for you you can get emacs-lisp access to the buffer-object of
 
214
the ECB-directory-buffer by this name, e.g. by a call of <code>set-buffer</code>.
 
215
 
 
216
<p>Changes for this option at runtime will take affect only after
 
217
deactivating and then activating ECB again! 
 
218
</td></tr>
 
219
</table>
 
220
 
 
221
<p>
 
222
<table width="100%">
 
223
<tr>
 
224
<td align="left"><b>directories-menu-sorter</b><i>
 
225
</i></td>
 
226
<td align="right">User Option</td>
 
227
</tr>
 
228
</table>
 
229
<table width="95%" align="center">
 
230
<tr><td>
 
231
Function which re-sorts the menu-entries of the directories buffer.
 
232
 
 
233
<p>If a function then this function is called to re-arrange the
 
234
menu-entries of the combined menu-entries of the user-menu-extensions
 
235
of <code>ecb-directories-menu-user-extension</code> and the built-in-menu
 
236
<code>ecb-directories-menu</code>. If nil then no special sorting will be
 
237
done and the user-extensions are placed in front of the
 
238
built-in-entries.
 
239
 
 
240
<p>The function get one argument, a list of menu-entries. For the format
 
241
of this argument see <code>ecb-directories-menu-user-extension</code>. The
 
242
function must return a new list in the same format. Of course this
 
243
function can not only re-arrange the entries but also delete entries
 
244
or add new entries. 
 
245
</td></tr>
 
246
</table>
 
247
 
 
248
<p>
 
249
<table width="100%">
 
250
<tr>
 
251
<td align="left"><b>directories-menu-user-extension</b><i>
 
252
</i></td>
 
253
<td align="right">User Option</td>
 
254
</tr>
 
255
</table>
 
256
<table width="95%" align="center">
 
257
<tr><td>
 
258
Static user extensions for the popup-menu of the directories buffer. 
 
259
Value is a list of elements of the following type: Each element
 
260
defines a new menu-entry and is either:
 
261
 
 
262
<ol type=1 start=1>
 
263
</p><li>Menu-command:
 
264
A list containing two sub-elements, whereas the first is the function
 
265
(a function symbol) being called if the menu-entry is selected and the
 
266
second is the name of the menu-entry.
 
267
 
 
268
<li>Separator:
 
269
A one-element-list and the element is the string "--": Then a
 
270
non-selectable menu-separator is displayed.
 
271
 
 
272
<li>Submenu:
 
273
A list where the first element is the title of the submenu displayed
 
274
in the main-menu and all other elements are either menu-commands (see
 
275
1) or separators (see 2).
 
276
</ol>
 
277
 
 
278
<p>The function of a menu-command must follow the following guidelines:
 
279
Such a function must be defined with the macro
 
280
<code>tree-buffer-defpopup-command</code>! This macro defines a new
 
281
popup-command whereas the newly defined command gets one argument
 
282
<var>NODE</var>. See the docstring of <code>tree-buffer-defpopup-command</code>
 
283
for further details.
 
284
 
 
285
<p>Example for the definition of such a menu-function:
 
286
 
 
287
<br><pre>(tree-buffer-defpopup-command ecb-my-special-dir-popup-function
 
288
  "Prints the name of the directory of the node under point."
 
289
  (let ((node-data=dir (tree-node-get-data node)))
 
290
     (message ``Dir under node: %s'' node-data=dir)))
 
291
</pre>
 
292
 
 
293
<p>Per default the static user-extensions are added at the beginning of
 
294
the built-in menu-entries of <code>ecb-directories-menu</code> but the whole
 
295
menu can be re-arranged with <code>ecb-directories-menu-sorter</code>.
 
296
 
 
297
<p>These menu-extensions are static. A dynamic menu-extension can be
 
298
achieved via <code>ecb-directories-menu-user-extension-function</code>. 
 
299
</td></tr>
 
300
</table>
 
301
 
 
302
<p>
 
303
<table width="100%">
 
304
<tr>
 
305
<td align="left"><b>directories-menu-user-extension-function</b><i>
 
306
</i></td>
 
307
<td align="right">User Option</td>
 
308
</tr>
 
309
</table>
 
310
<table width="95%" align="center">
 
311
<tr><td>
 
312
Dynamic user extensions for the popup-menu of the directories buffer. 
 
313
A function which has to return a list in the same format like the
 
314
option <code>ecb-directories-menu-user-extension</code>. This function is
 
315
called when the user opens the popup-menu for the directories buffer.
 
316
 
 
317
<p>Per default the dynamic user-extensions are added in front of the
 
318
static extensions of <code>ecb-directories-menu-user-extension</code> but
 
319
the whole menu can be re-arranged with
 
320
<code>ecb-directories-menu-sorter</code>. 
 
321
</td></tr>
 
322
</table>
 
323
 
 
324
<p>
 
325
<table width="100%">
 
326
<tr>
 
327
<td align="left"><b>display-default-dir-after-start</b><i>
 
328
</i></td>
 
329
<td align="right">User Option</td>
 
330
</tr>
 
331
</table>
 
332
<table width="95%" align="center">
 
333
<tr><td>
 
334
Automatically display current default-directory after activating ECB.
 
335
 
 
336
<p>If a file-buffer is displayed in the current active edit-window then
 
337
ECB synchronizes its tree-buffers to this file-buffer - at least if
 
338
the option <code>ecb-window-sync</code> it not nil. So for this situation
 
339
<code>ecb-display-default-dir-after-start</code> takes no effect but this
 
340
option is for the case if no file-buffer is displayed in the
 
341
edit-window after startup:
 
342
 
 
343
<p>If true then ECB selects autom. the current default-directory after
 
344
activation even if no file-buffer is displayed in the current active
 
345
edit-window. This is useful if ECB is autom. activated after startup
 
346
of Emacs and Emacs is started without a file-argument. So the
 
347
directory from which the startup has performed is auto. selected in
 
348
the ECB-directories buffer and the ECB-sources buffer displays the
 
349
contents of this directory. 
 
350
</td></tr>
 
351
</table>
 
352
 
 
353
<p>
 
354
<table width="100%">
 
355
<tr>
 
356
<td align="left"><b>excluded-directories-regexp</b><i>
 
357
</i></td>
 
358
<td align="right">User Option</td>
 
359
</tr>
 
360
</table>
 
361
<table width="95%" align="center">
 
362
<tr><td>
 
363
Directories that should not be included in the directories list. The
 
364
value of this variable should be a regular expression. 
 
365
</td></tr>
 
366
</table>
 
367
 
 
368
<p>
 
369
<table width="100%">
 
370
<tr>
 
371
<td align="left"><b>show-sources-in-directories-buffer</b><i>
 
372
</i></td>
 
373
<td align="right">User Option</td>
 
374
</tr>
 
375
</table>
 
376
<table width="95%" align="center">
 
377
<tr><td>
 
378
Show source files in directories buffer. 
 
379
</td></tr>
 
380
</table>
 
381
 
 
382
<p>
 
383
<table width="100%">
 
384
<tr>
 
385
<td align="left"><b>source-path</b><i>
 
386
</i></td>
 
387
<td align="right">User Option</td>
 
388
</tr>
 
389
</table>
 
390
<table width="95%" align="center">
 
391
<tr><td>
 
392
Paths where to find code sources. Each path can have an optional alias
 
393
that is used as it's display name. If no alias is set, the path is
 
394
used as display name. 
 
395
</td></tr>
 
396
</table>
 
397
 
 
398
<p>
 
399
<table width="100%">
 
400
<tr>
 
401
<td align="left"><b>use-speedbar-instead-native-tree-buffer</b><i>
 
402
</i></td>
 
403
<td align="right">User Option</td>
 
404
</tr>
 
405
</table>
 
406
<table width="95%" align="center">
 
407
<tr><td>
 
408
If true then uses speedbar for directories, sources or methods. This
 
409
means that speedbar is integrated in the ECB-frame and is displayed in
 
410
that window normally displaying the standard ECB-directories-buffer,
 
411
ECB-sources-buffer or ECB-methods-buffer.
 
412
 
 
413
<p>This option takes effect in all layouts which contain either a
 
414
directory window, a sources window or a method window.
 
415
 
 
416
<p>This option can have four valid values:
 
417
<ul>
 
418
<li><code>nil</code>: Do not use speedbar (default)
 
419
<li><code>dir</code>: Use speedbar instead of the standard directories-buffer
 
420
<li><code>source</code>: Use speedbar instead of the standard sources-buffer
 
421
<li><code>method</code>: Use speedbar instead of the standard methods-buffer
 
422
</ul>
 
423
 
 
424
<p>Note: For directories and sources a similar effect and usability is
 
425
available by setting this option to <code>nil</code> (or <code>method</code>) and
 
426
setting <code>ecb-show-sources-in-directories-buffer</code> to not
 
427
<code>nil</code>, because this combination displays also directories and
 
428
sources in one window.
 
429
 
 
430
<p><code>ecb-use-speedbar-instead-native-tree-buffer</code> is for people who
 
431
like the speedbar way handling directories and source-files or methods
 
432
and want it in conjunction with ECB. 
 
433
</td></tr>
 
434
</table>
 
435
 
 
436
</body></html>
 
437