forked from ChasManRors/ecb
-
Notifications
You must be signed in to change notification settings - Fork 21
/
ecb.texi
7430 lines (6036 loc) · 276 KB
/
ecb.texi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\input texinfo @c -*-texinfo-*-
@c
@c This manual covers the tool "ECB", and is a part of it's
@c distribution.
@c This manual is free software; you can redistribute it and/or modify
@c it under the terms of the GNU General Public License as published by
@c the Free Software Foundation; either version 2, or (at your option)
@c any later version.
@c This manual is distributed in the hope that it will be useful,
@c but WITHOUT ANY WARRANTY; without even the implied warranty of
@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@c GNU General Public License for more details.
@c You should have received a copy of the GNU General Public License
@c along with GNU Emacs; see the file COPYING. If not, write to the
@c Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@c Boston, MA 02111-1307, USA.
@c $Id$
@setfilename ecb.info
@settitle ECB - the Emacs Code Browser
@c If we want only one index for concepts, functions and variables
@c @syncodeindex vr cp
@c @syncodeindex fn cp
@c in info we do not want paragraph indenting
@ifinfo
@paragraphindent 0
@end ifinfo
@exampleindent 3
@footnotestyle end
@c The version number is auto-frobbed from the Makefile, so you should
@c edit the Makefile to change the version number. mechanism stolen
@c from Tramp
@macro ecbver{}
1.93
@end macro
@dircategory GNU Emacs Lisp
@direntry
* ECB: (ecb). Emacs Code Browser
@end direntry
@titlepage
@sp 10
@center @titlefont{ECB version @ecbver{} - User manual}
@vskip 0pt plus 1 fill
Copyright @copyright{} 2000, 2001, 2002 Jesper Nordenberg, Klaus Berndl
@end titlepage
@node Top, Install and first steps, (dir), (dir)
@comment node-name, next, previous, up
@ifnottex
This is the user manual for ECB version @ecbver{}.
@end ifnottex
ECB stands for ``Emacs Code Browser'' and is a source code browser for
(X)Emacs. It is a global minor-mode which displays a couple of windows
that can be used to browse directories, files and file-contents like
methods and variables. It supports source-code parsing for Java, C,
C++, Elisp, Scheme and some more.
@iftex
@sp 1
@end iftex
@strong{NOTE}: Experienced ECB users find a complete alphabetical list
of all commands and user-options in @ref{Interactive ECB commands} and
@ref{Customizable options}.
@c In the following two paragraphs we distinct between HTML-, info-,
@c and tex-format concerning the display of the URLs.
@ifinfo
The latest version of ECB can always be found at the URL
@url{http://ecb.sourceforge.net}.
To send bug reports, or participate in discussions about ECB, use the
mailing list @email{ecb-list@@lists.sourceforge.net} via the URL
@url{http://lists.sourceforge.net/lists/listinfo/ecb-list}.
@end ifinfo
@iftex
@sp 1
The latest version of ECB can always be found at the URL @*
@url{http://ecb.sourceforge.net}.
@sp 1
To send bug reports, or participate in discussions about ECB, use the
mailing list @*@email{ecb-list@@lists.sourceforge.net} via the URL @*
@url{http://lists.sourceforge.net/lists/listinfo/ecb-list}.
@end iftex
@ifhtml
The latest version of ECB can always be found at
@uref{http://ecb.sourceforge.net}
To send bug reports, or participate in discussions about ECB, use the
mailing list @email{ecb-list@@lists.sourceforge.net} via
@uref{http://lists.sourceforge.net/lists/listinfo/ecb-list}
@end ifhtml
@menu
* Install and first steps:: Installing ECB and first steps
* Overview:: Introduce basic concepts
* Activation and Deactivation:: How to start and end ECB
* Usage of ECB:: How to use ECB
* Customizing:: How to customize ECB
* Submitting problem report:: What to do when problems occur
* Upgrading:: Upgrading and downloading packages
* Tips and tricks:: Useful hints and tips
* Elisp programming:: Entry points for elisp programmers
* Conflicts and bugs:: Known Conflicts with other packages and bugs
* FAQ:: Frequently asked questions
* Command Index:: Index for interactive commands
* Option Index:: Index for user options
* Concept Index:: Index for concepts and terms
@comment * Index::
@detailmenu
--- The Detailed Node Listing ---
Installation and first steps of ECB
* Installation:: Installation of ECB
* Setting up Emacs:: How to set up Emacs for semantic and ECB
* First steps:: First steps after activating ECB first time
Overview
* ECB Directories-buffer:: Contents of the ECB Directories-buffer
* ECB Sources-buffer:: Contents of the ECB Sources/history-buffer
* ECB Methods-buffer:: Contents of the ECB Methods-buffer
Activation and Deactivation
* Standard activation:: How to manually (de)activate ECB
* Automatic activation:: Automaticaly (de)activating ECB
Usage of ECB
* Using the mouse:: Working with the mouse
* Using the keyboard:: Working with the keyboard
* The edit-window:: How to use the edit-window(s)
* Temp- and compile-buffers:: Displaying temp- and compilation-buffers
* The Methods buffer:: Using and customizing he Methods-buffer
* The ECB-layout:: Changing, customizing, redrawing, creating
* Hiding the ECB windows:: Hiding/Showing the ECB-windows
* Back/forward navigation:: Back- and forward navigation like a browser
* ECB-window synchronizing:: Auto./manual synchronizing the ECB-windows
* Interactive ECB commands:: All interactive user-commands of ECB
Working with the keyboard in the ECB-windows
* Navigation/Selection:: Keyboard navigation/selection in a tree-buffer
* Incremental search:: Find nodes as fast as possible
* Personal keybindings:: Adding personal keybindings to a tree-buffer
Using and customizing the ECB-Methods buffer
* Expanding:: Explicit and automatic expanding
* Customizing the display:: How to customize the Methods-buffer display
* Rebuilding the Methods:: When to rebuild the Methods-buffer
Changing, customizing, redrawing and creating layouts
* Changing the ECB-layout:: How to change and customize the layout
* Redrawing the ECB-layout:: How and when redrawing the layout
* Changing window sizes:: Changing sizes of the ECB-windows
* Fixing window sizes:: Fixing sizes of the ECB-windows
* Creating a new ECB-layout:: Interactively creating new layouts
Customizing ECB
* General aspects:: General aspects for customizing ECB
* Most important options:: Which option you must know
* Customizable options:: All customizable options of ECB
All customizable options of ECB
* ecb-general:: General customizing ECB
* ecb-directories:: Customizing the ECB-directories
* ecb-sources:: Customizing the ECB-sources
* ecb-methods:: Customizing the ECB-methods
* ecb-history:: Customizing the ECB-history
* ecb-layout:: Customizing the ECB-layout
* ecb-compilation-content:: Customizing the compile-window contents
* ecb-create-layout:: Customizing options for creating layouts
* ecb-face-options:: Customizing options for faces
* ecb-faces:: Customizing the faces
* ecb-download:: Customizing how to download ECB
* ecb-help:: Customizing the online help of ECB
* ecb-eshell:: Customizing the eshell-integration
Upgrading and downloading packages
* Downloading new versions:: How to download newer versions of packages
* Auto. option-upgrading:: ECB can auto. upgrade your options
Automatic upgrading of options
* User interface:: Options and commands you should know
* Background information:: Maybe some interesting informations
Tips and tricks
* Changing faces:: Changing faces in the ECB tree-buffers
* Small screens:: Working with small screens
* Big screens:: Working with big screens
* Simulating speedbar:: Simulating speedbar without an extra frame
* Integrating speedbar:: Integrating speedbar in the ECB-frame
* Optimize scrolling:: Optimize scrolling in the edit-window
* Large directories:: Working with large directories
* Using eshell:: Optimal using of eshell in ECB
* Grepping directories:: Grepping directories with ECB
* Working with JDEE:: Working best with ECB and JDEE
* Compile-window on demand:: Displaying the compile-window on demand
Entry points for elisp programmers
* List of variables:: Which variables an elisp-program can use
* List of hooks:: All available hooks
* tree-buffer:: Some words to the tree-buffer-library
* Adviced functions:: How to deal with the adviced functions
* The layout-engine:: Programming new layouts and special windows
How to program new layouts and new special windows
* Programming a new layout:: How to program a new layout
* Programming special windows:: Aspects of programming special windows
* Possible layout-outlines:: The wide range of possible layouts
* The layout-engine API:: The complete layout-engine API
Known conflicts and bugs of ECB
* Conflicts:: Known conflicts with other packages
* Bugs:: Known bugs
@end detailmenu
@end menu
@node Install and first steps, Overview, Top, Top
@chapter Installation and first steps of ECB
This chapter describes how to install ECB and setup (X)Emacs correctly
and what are the first steps after activation of ECB.
@menu
* Installation:: Installation of ECB
* Setting up Emacs:: How to set up Emacs for semantic and ECB
* First steps:: First steps after activating ECB first time
@end menu
@node Installation, Setting up Emacs, Install and first steps, Install and first steps
@section Installation of ECB
@strong{IMPORTANT}: The following steps 1 to 8. describe installation
tasks if you got the archive in the format available at the ECB
website. If you use XEmacs and got ECB as a regular XEmacs-package
(e.g. downloaded and installed by the net-installer or package-manager
of XEmacs) then there is nothing to do for you, but you can
immediately start ECB with @code{ecb-activate} or read the online-help
with @code{ecb-show-help}!
@enumerate
@item
Unpack the ECB archive (probably you have already done this :-)
@item
Read the file @file{README} in the ECB-directory and install the
required semantic- and eieio-version.
@strong{Note}: ECB maybe requires a newer version of these libraries
than shipped with (X)Emacs. You have to install exactly a version ECB
requires and also to make sure that the correct version is loaded into
(X)Emacs!
But ECB performs two autom checks:
@itemize @minus
@item At load-time:
It checks if the packages semantic and eieio are at
least installed so ECB can be loaded. If not it offers to download and
install them.
@item At start-time:
It checks if the correct versions of semantic and eieio are installed
and gives you proper feedback. @xref{Download required packages}.
@end itemize
So if you are not sure if you have installed the required packages at
all or if you have installed the correct versions of these packages
then do not worry about this, just go on with the following
installation steps: If ECB is missing something it will give you
proper feedback and support not later than at load-time or start-time!
@item
Add the new ECB-directory to your @code{load-path} variable.
You @strong{MUST} add the ECB-install-directory to the
@code{load-path} either by changing the @code{load-path} variable
directly in your @file{.emacs} or @file{site-lisp/site-start.el} or by
working with a file @file{subdirs.el}@footnote{This works at least for
Emacs 20.X and Emacs 21.X but XEmacs may have slightly different
mechanisms; see the XEmacs documentation}.
@strong{ATTENTION}:
ECB is NOT properly installed if it's directory is not added to
@code{load-path} and for example just loaded by
@example
(load-file "/path/to/ecb/ecb.el")
@end example
Do not do this!
@item
Load ECB by adding code to your @file{.emacs}:
If you want to load the complete ECB at (X)Emacs-loadtime (Advantage:
All ECB-options available after loading ECB. Disadvantage: Increasing
loadtime@footnote{Cause of full loading of ECB itself and also the
packages semantic and eieio regardless if ECB is started.}):
@example
(require 'ecb)
@end example
If you want to load the ECB first after starting it by
@code{ecb-activate} (Advantage: Fast loading@footnote{ECB, semantic
and eieio are first loaded after starting ECB or with other words: ECB
and semantic are not loaded if you do not use/need them}.
Disadvantage: ECB- and semantic-options first available after starting
ECB):
@example
(require 'ecb-autoloads)
@end example
This loads all available autoloads of ECB, e.g. @code{ecb-activate},
@code{ecb-minor-mode}, @code{ecb-byte-compile} and
@code{ecb-show-help}.
@item Restart (X)Emacs.
@end enumerate
ECB is now ready for use and can be activated by calling @code{M-x
ecb-activate} or @code{ecb-minor-mode}. Now you can either starting
using ECB or you can do these optional installation steps:
@enumerate 6
@item Reading the online help with @code{ecb-show-help}
Maybe you are interested to read the online-help of ECB before first
start.
@item Bytecompiling ECB with @code{ecb-byte-compile}
This byte compiles ECB. You can safely ignore all messages if there
are any. (You can also bytecompile ECB from the command-line either by
using the @file{Makefile} or by using the batch-file @file{make.bat};
just read the comments in that file you choose.)
@item Installing the Info-help of ECB
The ECB distribution contains a subdirectory @file{info-help} which
contains the online-help of ECB in Info-format. You can install this
online help so it's available in the Top-directory of Info. There are
two ways to do this:
@itemize @minus
@item Use ``install-info'' (recommended):
@enumerate
@item
Copy the files of the subdirectory @file{info-help} into the
info-directory of Emacs
@item
Install the file @file{info-help/ecb.info} with the command
``install-info'' (if available on your system) in the @file{dir}-file.
@end enumerate
The supplied @file{Makefile} offers a target @code{install-help} which
does both of these steps. You have just to call @code{make
install-help} with the correct EMACSINFOPATH set (see the comment in
@file{Makefile}). Here is an example:
@example
make EMACSINFOPATH=/path/to/emacs/info install-help
@end example
@item Manual Installation:
Copy the files of the subdirectory @file{info-help} into the
info-directory of Emacs and modify the file @file{dir} manually.
@end itemize
But it doesn't matter if you do not execute this step (8.) because the
online help of ECB is always available though, see
@code{ecb-show-help} (@pxref{Interactive ECB commands}).
@end enumerate
@node Setting up Emacs, First steps, Installation, Install and first steps
@section How to set up Emacs for file parsing
@strong{NOTE}: Normally it should not necessary for you to bother with
the following stuff unless you have problems getting ECB working
correctly for you.
To ensure ECB and semantic are working correctly for all by semantic
supported languages you have to pay attention to the following aspects
concerning your Emacs-setup:
@enumerate
@item Setting up semantic
Parsing files is done completely by semantic. ECB just displays the
parsing results. For all needs of ECB semantic is completely setup by
ECB itself, i.e. ECB sets up semantic for you! You have only to add
the installation directory of semantic to your @code{load-path} (in an
appropriate way)!
@strong{NOTE}: If you setup semantic for yourself following the
recommendations in the installation instructions of semantic then you
have probably added code to your startup-file like:
@example
(setq semantic-load-turn-everything-on t)
(require 'semantic-load)
@end example
Be aware that this also enables the minor-modes
@code{semantic-show-dirty-mode} and
@code{semantic-show-unmatched-syntax-mode} where the former one
highlights all code which has to be reparsed with dark background
(which results in large portions of dark background ;-) and the latter
one underlines all syntax which can not be parsed. Especially the
former one can be really annoying.
To switch off these modes you can add to your startup-file:
@example
(global-semantic-show-dirty-mode -1)
(global-semantic-show-unmatched-syntax-mode -1)
@end example
@item Activating the correct major-mode
ECB is for browsing source-files and therefore you have to setup your
Emacs-configuration properly so semantic can be activated
automatically for parsing your Emacs-Lisp, C, C++ or Java
buffers@footnote{semantic supports some more ``languages'' like
Makefiles etc. but these are the most important ones.}. For this Emacs
must activate the correct @code{major-mode} for the source-files and
Emacs can only do this if the option @code{auto-mode-alist} is setup
correctly. The correct major-modes and possible
file-extensions@footnote{Especially for C++ and C you can use any
extension you want but these are the most common ones!} are:
@multitable @columnfractions 0.20 0.50 0.30
@item
@ifnotinfo
@strong{Language}
@end ifnotinfo
@ifinfo
LANGUAGE
@end ifinfo
@tab
@ifnotinfo
@strong{Major-mode}
@end ifnotinfo
@ifinfo
MAJOR-MODE
@end ifinfo
@tab
@ifnotinfo
@strong{Extension(s)}
@end ifnotinfo
@ifinfo
EXTENSION(S)
@end ifinfo
@item Emacs Lisp @tab @code{emacs-lisp-mode} @tab .el
@item C @tab @code{c-mode} @tab .h, .c
@item C++ @tab @code{c++-mode} @tab .h, .hxx, .hh, .HH, .cxx, .cpp,
.cc, .CC
@item Java @tab @code{java-mode} or @code{jde-mode} (if you use JDEE)
@tab .java
@end multitable
Example: If you want files with extension ``.cpp'' being c++-parsed by
semantic and ECB, your @code{auto-mode-alist} must contain an entry
like:
@example
("\\.cpp\\'" . c++-mode)
@end example
After this ECB will correctly parse your ``.cpp''-sources and display
all the semantic information in the ECB-methods buffer.
@anchor{Checking your hooks}
@item Checking your hooks
If you have already checked points (1.) and (2.) and if you have still
problems getting ECB/semantic working properly for your sources you
should check the related major-mode hook. Every major-mode X has a
hook with name ``X-hook'' which is evaluated after activating the
major-mode (see above, 2.), e.g. the hook for the major-mode
@code{c++-mode} is @code{c++-mode-hook}.
Semantic adds automatically during load-time a special
``semantic-setup'' to these major-mode hooks@footnote{Of course only
for major-modes supported by semantic!} in form of a
``setup-function''. Example: For c and c++ modes semantic adds
@code{semantic-default-c-setup} to @code{c-mode-hook} and
@code{c++-mode-hook}.
If your own Emacs-setup (e.g. in @file{.emacs} or
@file{site-lisp/site-start.el}) overwrites such a major-mode-hook then
semantic can not be activated for this major-mode and in consequence
ECB can not work properly too!
Check if your Emacs-setup uses somewhere @code{setq} for adding code
to a major-mode-hook. @strong{IMPORTANT}: Use @code{add-hook} instead of
@code{setq}@footnote{@code{setq} replaces/overwrites the current
value of a hook with the new value whereas @code{add-hook}
@strong{adds} the new value to the old-value of the hook!}!
@end enumerate
If your source-files are ``running'' with correct @code{major-mode}
and correct major-mode hooks ECB and semantic will do what you expect
them doing!
@node First steps, , Setting up Emacs, Install and first steps
@section First steps after activating ECB first time
This section of the ECB online-help is displayed automatically by ECB
after activating ECB first time and describes what are the first basic
steps:
@enumerate
@item Configure where ECB can find your sources:
Call @code{M-x customize-option RET ecb-source-path RET}@footnote{This
means first hitting the keys @kbd{M} (Meta- or Alt-key) and @kbd{x}
simultaniously, inserting ``customize-option'' in the minibuffer,
hitting RETURN, inserting ``ecb-source-path'' in the minibuffer and
finally hitting RETURN again}. This lets you customize the option
@code{ecb-source-path} with the customize-feature of Emacs. This opens
a customize-buffer where you can insert all the directories where ECB
can find your source-files. Save your changes with the button ``Save
for future sessions'' and then throw away this customize-buffer either
by killing it with @code{M-x kill-buffer} or clicking at the button
``Finish''.
@item Read the online-help of ECB:
The online-help of ECB is available via
@itemize @minus
@item calling @code{M-x ecb-show-help},
@item pressing @kbd{C-c . o} or
@item using the menu ``ECB''.
@end itemize
(The section you are currently reading is part of the online-help of
ECB)
@item Start working with ECB.
@end enumerate
@node Overview, Activation and Deactivation , Install and first steps, Top
@chapter Overview
@cindex tree-buffer
@cindex ECB-windows
ECB is a global minor-mode which offers a couple of @dfn{ECB-windows}
for browsing your sources comfortable with the mouse and the keyboard.
These ``special'' windows are also called @dfn{tree-buffer} in this
manual. Every @dfn{item} in such a tree-buffer, i.e. every line, is
also called a @dfn{node} of this tree-buffer. There are currently
three different types of ECB-windows/tree-buffers:
@itemize @minus
@item ECB-Directories
@item ECB-Sources
@item ECB-Methods
@end itemize
In addition to these ``special'' ECB-windows you have always one or
two @dfn{edit-windows} (@pxref{The edit-window}) in the ECB-frame and
at the bottom a @dfn{compilation-window} (optional), where all the
output of Emacs-compilation (compile, grep etc.) is shown
(@pxref{Temp- and compile-buffers}).
The following ``ascii-screenshot'' illustrates the typical layout of
the ECB-frame@footnote{This is only one example of the layouts ECB
offers, see @ref{Changing the ECB-layout}}:
@example
@group
------------------------------------------------------------------
| | |
| Directories | |
| | |
|--------------| |
| | |
| Sources | |
| | |
|--------------| Edit-window(s) |
| | (can be splitted in two windows) |
| Methods | |
| | |
|--------------| |
| | |
| History | |
| | |
------------------------------------------------------------------
| |
| Compilation-window (optional) |
| |
------------------------------------------------------------------
@end group
@end example
In the following subsections the ``special'' ECB-windows will be
explained in detail.
@menu
* ECB Directories-buffer:: Contents of the ECB Directories-buffer
* ECB Sources-buffer:: Contents of the ECB Sources/history-buffer
* ECB Methods-buffer:: Contents of the ECB Methods-buffer
@end menu
@node ECB Directories-buffer, ECB Sources-buffer, Overview, Overview
@section ECB Directories-buffer
@cindex Directories
@itemize @bullet
@item
Select directories (and - if enabled - source files) in the
@dfn{ECB-Directories} buffer by clicking a mouse button on the directory
name or by hitting RETURN when the cursor is placed on the item line,
see @ref{Usage of ECB}.
IMPORTANT: If you use the POWER-click (i.e. hold down the SHIFT-key
while clicking with the primary mouse button (@pxref{Using the mouse})
or RETURN (@pxref{Using the keyboard})) on a directory node in the
this buffer then the directory-contents-cache for this directory will
be refreshed and actualized.
@item
Directory names with a ``[+]'' symbol after (or before) them can be
expanded/collapsed by clicking on the symbol, pressing the TAB key
(@pxref{Using the keyboard}) when the cursor is placed on the package
line or clicking a mouse button on the item, see @ref{Using the mouse}.
@item
Right clicking on an item will open a popup menu where different
operations on the item under the mouse cursor can be performed.
@item
Pressing F2 will open the ECB customization group
(@pxref{Customizing}) in the edit window. F3 shows the online help in
the edit-window. Pressing F4 in the ECB-directories buffer will offer
adding a new source-path.
@end itemize
@node ECB Sources-buffer, ECB Methods-buffer, ECB Directories-buffer, Overview
@section ECB Sources-buffer
@cindex Sources
@cindex History
@itemize @bullet
@item
Source files can be selected by clicking a mouse button (@pxref{Using
the mouse}) or hitting RETURN (@pxref{Using the keyboard}) on the
source row in the @dfn{ECB-Sources} or @dfn{ECB- History} windows.
IMPORTANT: If you use the POWER-click (i.e. hold down the SHIFT-key
while clicking with the primary mouse button (@pxref{Using the mouse})
or RETURN (@pxref{Using the keyboard})) on a source row in the
ECB-Sources or ECB-History windows then the source will not be
displayed in the edit-window but it will be scanned in the background
and all its contents (e.g. methods and variables) are listed in the
@dfn{ECB Methods} window (@pxref{ECB Methods-buffer}. So you can get an
overlook over the source without changing the buffer in the
edit-window.
@item
Clicking on the source file with the secondary mouse button or
C-RETURN (@pxref{Usage of ECB}) will open the source file in
the other edit window.
@item
Right clicking on a source file will open a popup menu where different
operation on the item under the mouse cursor can be performed.
@end itemize
@node ECB Methods-buffer, , ECB Sources-buffer, Overview
@section ECB Methods-buffer
@cindex Methods
@cindex Methods
@itemize @bullet
@item
The @dfn{ECB-Methods} buffer contains the methods (and variables, if
you want) in the selected source file. When a method/variable is
selected with the primary mouse button (@pxref{Using the mouse}) or
RETURN (@pxref{Using the keyboard}) the edit buffer will jump to the
method/variable.
IMPORTANT: If you use the POWER-click (i.e. hold down the SHIFT-key
while clicking with the primary mouse button (@pxref{Using the mouse})
or RETURN (@pxref{Using the keyboard})) on a node in this buffer then
the edit-buffer will be narrowed to the selected token (see also
option @code{ecb-token-jump-narrow}).
@item
Clicking on a method/variable with the secondary mouse button or C-RETURN
(@pxref{Usage of ECB}) will jump to the method in the other edit window.
@end itemize
@node Activation and Deactivation, Usage of ECB, Overview, Top
@chapter Activation and Deactivation
@noindent
This chapter describes all aspects of activating and deactivating ECB.
@menu
* Standard activation:: How to manually (de)activate ECB
* Automatic activation:: Automaticaly (de)activating ECB
@end menu
@node Standard activation, Automatic activation, Activation and Deactivation, Activation and Deactivation
@section Standard activation and deactivation
Call @kbd{M-x ecb-activate} and @kbd{M-x ecb-deactivate} to activate or
deactivate ECB. If you want ECB started in a new frame see the option
@code{ecb-new-ecb-frame} (default is nil). @code{ecb-activate} always
raises and selects the ECB-frame even if ECB is already started.
@cindex minor mode
Because ECB is a global minor-mode it can also be
(de)activated/toggled by @kbd{M-x ecb-minor-mode}.
@cindex Activation hook-sequence
@anchor{Activation hook-sequence}
The following sequence of hooks is evaluated during activation of ECB:
@enumerate
@item @code{ecb-before-activate-hook}
@item <All actions for activation but no layout drawing>
@item @code{ecb-activate-before-layout-draw-hook}
@item @code{ecb-redraw-layout-before-hook}
@item <Drawing the layout>
@item @code{ecb-redraw-layout-after-hook}
@item @code{ecb-activate-hook}
@end enumerate
@anchor{Deactivation hook-sequence}
@cindex Deactivation hook-sequence
The following sequence of hooks is evaluated during deactivation of
ECB:
@enumerate
@item @code{ecb-before-deactivate-hook}
@item <All actions for deactivation of ECB>
@item @code{ecb-deactivate-hook}
@end enumerate
@node Automatic activation, , Standard activation, Activation and Deactivation
@section Automatic activation and deactivation
@cindex Automatic activation
@cindex Automatic deactivation
There are three options for auto. (de)activation ECB after Emacs-start
and also major-mode based.
@table @code
@item ecb-auto-activate
This option is for auto. activating ECB after Emacs-startup. Set this
to not nil and ECB will automaticaly be started after Emacs comes up.
@item ecb-major-modes-activate
@itemx ecb-major-modes-deactivate
These option give you the possibility to activate (rsp. deactivate)
ECB on a major-mode basis, means you can define for which major-modes
ECB should be activated and for which modes it should deactivated (See
@ref{Activation hook-sequence} and @ref{Deactivation hook-sequence}).
If activating or deactivating is too strong you can also customize ECB
with these two option only hiding/showing it's ECB-windows
(tree-buffers) on a major-mode basis. At last this is nothing more
than auto. calling @code{ecb-toggle-ecb-windows} (@pxref{Interactive
ECB commands} depending which major-mode is active.
@end table
If you activate ECB on a major-mode basis you probably want switch off
displaying the tip of the day. You can do this with the option
@code{ecb-tip-of-the-day}.
@node Usage of ECB, Customizing, Activation and Deactivation, Top
@chapter Usage of ECB
This chapter describes in a detailed manner all aspects of using the
Emacs Code Browser.
@menu
* Using the mouse:: Working with the mouse
* Using the keyboard:: Working with the keyboard
* The edit-window:: How to use the edit-window(s)
* Temp- and compile-buffers:: Displaying temp- and compilation-buffers
* The Methods buffer:: Using and customizing he Methods-buffer
* The ECB-layout:: Changing, customizing, redrawing, creating
* Hiding the ECB windows:: Hiding/Showing the ECB-windows
* Back/forward navigation:: Back- and forward navigation like a browser
* ECB-window synchronizing:: Auto./manual synchronizing the ECB-windows
* Interactive ECB commands:: All interactive user-commands of ECB
@end menu
@node Using the mouse, Using the keyboard, Usage of ECB, Usage of ECB
@section Working with the mouse in the ECB-windows
@cindex primary button
@cindex secondary button
@cindex mouse button
Normally you get best usage if you use ECB with a mouse. ECB
distinguishes between a @dfn{primary} and a @dfn{secondary}
mouse-button.
With the option @code{ecb-primary-secondary-mouse-buttons} the following
combinations of primary and secondary mouse-buttons are possible:
@itemize @minus
@item
primary: mouse-2, secondary: C-mouse-2@footnote{means mouse-2 while CTRL-key
is pressed.}. This is the default.
@item
primary: mouse-1, secondary: C-mouse-1
@item
primary: mouse-1, secondary: mouse-2
@end itemize
If you change this during ECB is activated you must deactivate and activate
ECB again to take effect.
@subsection The primary mouse-button
A click with the primary button causes the main effect in each ECB-buffer:
@itemize @minus
@item ECB Directories:
Expanding/collapsing nodes and displaying files in the ECB-Sources
buffer.
@item ECB sources/history:
Opening the file in that edit-window specified by the option
@code{ecb-primary-mouse-jump-destination}.
@item ECB Methods:
Jumping to the method in that edit-window specified by the option
@code{ecb-primary-mouse-jump-destination}.
@end itemize
@subsection The POWER- or SHIFT-click
@cindex SHIFT-click
@cindex POWER-click
A click with the primary mouse-button while the SHIFT-key is pressed
is called the POWER-click and does the following (depending on the
ECB-buffer where the POWER-click occurs):
@itemize @minus
@item ECB Directory:
Refreshing the directory-contents-cache (see
@code{ecb-cache-directory-contents}).
@item ECB sources/history:
Only displaying the source-contents in the method-buffer but not
displaying the source-file in the edit-window. This means it opens the
clicked source only in the background and shows all its
methods/variables in ECB-Methods; the buffer of the edit-window is not
changed! This is very useful to get only an overlook for a certain
source.
@item ECB Methods:
Narrowing to the clicked method/variable/ect... (see
@code{ecb-token-jump-narrow}).
@end itemize
Per default the complete node-name of an item in a tree-buffer is
displayed in the echo-area if the mouse moves over it, regardless if
the related window is the active one or not. You get the same effect
always after a POWER-click. In general: Via
@code{ecb-show-node-info-in-minibuffer} you can specify in a detailled
manner for every ECB tree-buffer when and which node-info should be
displayed in the minibuffer.
@subsection The secondary mouse-button
The secondary mouse-button is for opening (jumping to) the file in the other
window (see the documentation @code{ecb-primary-mouse-jump-destination}).
@subsection The right mouse-button
In each ECB-buffer mouse-3 (= right button) opens a special context popup-menu
for the clicked item where you can choose several senseful actions.
With the options @code{ecb-directories-menu-user-extension},
@code{ecb-sources-menu-user-extension},
@code{ecb-methods-menu-user-extension} and
@code{ecb-history-menu-user-extension} you can add new commands to the
popup-menues.
With the options @code{ecb-directories-menu-sorter},
@code{ecb-sources-menu-sorter}, @code{ecb-methods-menu-sorter} and
@code{ecb-history-menu-sorter} you can even re-arrange all the entries
of the popup-menues.
@subsection Horizontal scrolling with the mouse
In each tree-buffer of ECB you can easily scroll left and right with
the mouse if the option @code{ecb-tree-easy-hor-scroll} is not
@code{nil}.
The reason for this is: XEmacs has horizontal scroll-bars so invisible
parts beyond the right window-border of a tree-buffer can always made
visible very easy.
GNU Emacs does not have hor. scroll-bars so especially with the mouse
it is quite impossible to scroll smoothly right and left. The
functions @code{scroll-left} and @code{scroll-right} can be annoying
and are also not bound to mouse-buttons.
So if @code{ecb-tree-easy-hor-scroll} is a positive integer-value S
then in all ECB-tree-buffers the keys @kbd{M-mouse-1} and
@kbd{M-mouse-3} are bound to scrolling left resp. right with
scroll-step S. Additionally @kbd{C-M-mouse-1} and @code{C-M-mouse-3}
are bound to scrolling left resp. right with scroll-step
@code{window-width} - 2.
This is NOT done for XEmacs cause of its horizontal scrollbars. If you
want scroll left and right with the mouse in XEmacs then activate the
horizontal scrollbars.
@node Using the keyboard, The edit-window, Using the mouse, Usage of ECB
@section Working with the keyboard in the ECB-windows
ECB offers the @code{ecb-mode-map} which binds the most important
functions of ECB to keys so you can easily use ECB in every
window@footnote{Regardless if a tree-window or an edit-window} without
a mouse.
IMPORTANT: Do not modify @code{ecb-mode-map} directly! The option
@code{ecb-key-map} defines all ECB keybindings, including a common
prefixkey (This is by default @kbd{C-c .}). If there are conflicts
with other minor-modes or packages you can define very easy another
prefix. Please read carefully the description of @code{ecb-key-map}
(@pxref{ecb-general}).!
The following sections describe special topics about using the
keyboard in the ECB-tree-buffers:
@menu
* Navigation/Selection:: Keyboard navigation/selection in a tree-buffer
* Incremental search:: Find nodes as fast as possible
* Personal keybindings:: Adding personal keybindings to a tree-buffer
@end menu
@node Navigation/Selection, Incremental search, Using the keyboard, Using the keyboard
@subsection Navigation and Selection in a tree-buffer
@cindex RETURN key
@cindex TAB key