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>
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>
17
<h4>Group ecb-directories</h4>
19
<p>This group contains settings for the directories-buffer in the ECB:
24
<td align="left"><b>add-path-for-not-matching-files</b><i>
26
<td align="right">User Option</td>
29
<table width="95%" align="center">
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:
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?
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.
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
59
<td align="left"><b>auto-expand-directory-tree</b><i>
61
<td align="right">User Option</td>
64
<table width="95%" align="center">
66
Automatically expand the directory tree to the current source file.
67
There are three options:
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.
80
<td align="left"><b>cache-directory-contents</b><i>
82
<td align="right">User Option</td>
85
<table width="95%" align="center">
87
Cache contents of directories.
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 > 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.
97
<p>The value of this option is a list where each element is a cons-cell
100
<br><pre> (<dir-regexp> . <filenumber threshold>) with
104
<dt><code><dir-regexp>:</code>
105
<dd>Regular expression a directory must match to be cached.
106
<br><dt><code><filenumber threshold>:</code>
107
<dd>Number of directory contents must exceed this number.
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>!
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>).
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".
127
<p>A value of <code>((".*" . 1000))</code> caches every directory which has more
130
<p>A value of <code>((".*" . 0))</code> caches every directory regardless of the
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!
141
<td align="left"><b>cache-directory-contents-not</b><i>
143
<td align="right">User Option</td>
146
<table width="95%" align="center">
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.
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
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:
162
<li>Setting <code>ecb-cache-directory-contents</code> to ((".*" . 500)):
163
Caches all directories with more then 500 entries
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
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
180
<td align="left"><b>directories-buffer-after-create-hook</b><i>
182
<td align="right">User Option</td>
185
<table width="95%" align="center">
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.
194
<p>The following keys must not be rebind in the directories-buffer:
195
<kbd>F2</kbd>, <kbd>F3</kbd> and <kbd>F4</kbd>
202
<td align="left"><b>directories-buffer-name</b><i>
204
<td align="right">User Option</td>
207
<table width="95%" align="center">
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
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>.
216
<p>Changes for this option at runtime will take affect only after
217
deactivating and then activating ECB again!
224
<td align="left"><b>directories-menu-sorter</b><i>
226
<td align="right">User Option</td>
229
<table width="95%" align="center">
231
Function which re-sorts the menu-entries of the directories buffer.
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
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
251
<td align="left"><b>directories-menu-user-extension</b><i>
253
<td align="right">User Option</td>
256
<table width="95%" align="center">
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:
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.
269
A one-element-list and the element is the string "--": Then a
270
non-selectable menu-separator is displayed.
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).
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>
285
<p>Example for the definition of such a menu-function:
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)))
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>.
297
<p>These menu-extensions are static. A dynamic menu-extension can be
298
achieved via <code>ecb-directories-menu-user-extension-function</code>.
305
<td align="left"><b>directories-menu-user-extension-function</b><i>
307
<td align="right">User Option</td>
310
<table width="95%" align="center">
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.
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>.
327
<td align="left"><b>display-default-dir-after-start</b><i>
329
<td align="right">User Option</td>
332
<table width="95%" align="center">
334
Automatically display current default-directory after activating ECB.
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:
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.
356
<td align="left"><b>excluded-directories-regexp</b><i>
358
<td align="right">User Option</td>
361
<table width="95%" align="center">
363
Directories that should not be included in the directories list. The
364
value of this variable should be a regular expression.
371
<td align="left"><b>show-sources-in-directories-buffer</b><i>
373
<td align="right">User Option</td>
376
<table width="95%" align="center">
378
Show source files in directories buffer.
385
<td align="left"><b>source-path</b><i>
387
<td align="right">User Option</td>
390
<table width="95%" align="center">
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.
401
<td align="left"><b>use-speedbar-instead-native-tree-buffer</b><i>
403
<td align="right">User Option</td>
406
<table width="95%" align="center">
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.
413
<p>This option takes effect in all layouts which contain either a
414
directory window, a sources window or a method window.
416
<p>This option can have four valid values:
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
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.
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.