forked from alexott/ecb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecb.texi
15976 lines (12957 loc) · 624 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 Copyright (C) 2000 - 2009 Jesper Nordenberg,
@c Klaus Berndl,
@c Kevin A. Burton,
@c Free Software Foundation, Inc.
@c Author: Klaus Berndl <klaus.berndl@sdm.de>
@c Maintainer: Klaus Berndl <klaus.berndl@sdm.de>
@c Keywords: browser, code, programming, tools
@c Created: 2001
@c This program is free software; you can redistribute it and/or modify it under
@c the terms of the GNU General Public License as published by the Free Software
@c Foundation; either version 2, or (at your option) any later version.
@c This program is distributed in the hope that it will be useful, but WITHOUT
@c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
@c FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
@c details.
@c You should have received a copy of the GNU General Public License along with
@c GNU Emacs; see the file COPYING. If not, write to the Free Software
@c Foundation, Inc., 59 Temple Place - Suite 330, 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{}
2.40
@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 - 2009 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". While (X)Emacs already has good
@strong{editing} support for many modes, its @strong{browsing} support
is somewhat lacking. That's where ECB comes in: it displays a number
of informational windows that allow for easy source code navigation
and overview.
The informational windows can contain:
@itemize @bullet
@item A directory tree,
@item a list of source files in the current directory
(with full support and display of the VC-state),
@item a list of functions/classes/methods/... in the current file,
(ECB uses the CEDET-Semantic, or Imenu, or etags, for getting this
list so all languages supported by any of these tools are
automatically supported by ECB too)
@item a history of recently visited files
(groupable by several criterias),
@item helpful informations and possible completions according to the current
context which is computed by the semantic-analyzer for some sort of
intellisense,
@item the Speedbar and
@item output from compilation (the "*compilation*" window) and other
modes like help, grep etc. or whatever a user defines to be displayed
in this window.
@end itemize
As an added bonus, ECB makes sure to keep these informational windows
visible, even when you use @kbd{C-x 1} and similar commands.
It goes without saying that you can configure the layout, ie which
informational windows should be displayed where. ECB comes with a
number of ready-made window layouts to choose from.
@iftex
@sp 1
@end iftex
@strong{Please 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
@strong{IMPORTANT}: Cause of extra appearance of SPAM in the
mailing-lists, SourceForge has changed its policy: Now it is only
possible to post to the mailing-list for users who have subscribed
this mailing-list. So please be aware you will not be able to send
comments, bug reports and improvement suggestions before you have
subscribed the ECB-mailing-list. See the section "Mailing-list" at the
ECB-website at
@ifhtml
@uref{http://ecb.sourceforge.net}
@end ifhtml
@ifnothtml
@url{http://ecb.sourceforge.net}
@end ifnothtml
how to do this.
@menu
* Install and first steps:: Installing ECB and first steps
* Overview:: Compact introducing of basic concepts
* Manual usage:: How to use this manual
* ECB-windows:: Description of all ECB-windows of ECB
* 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
* Common use-cases:: 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 file parsing with ECB
* First steps:: First steps after activating ECB first time
Installation of ECB
* Requirements:: Requirements for ECB
* ECB as XEmacs-package:: Installation of ECB as a XEmacs-package
* Standard ECB-Installation:: Standard installation of ECB for (X)Emacs
* Makefile customization:: Customizing build using Makefile.conf
How to set up Emacs for file parsing with ECB
* General hints:: General hints for a correct setup
* Setting up CEDET/semantic:: How to setup semantic correctly
* Non-semantic files:: Setup for file types not supported by semantic
All ECB-windows of ECB
* Basic ECB-windows:: Description of the basic ECB-windows
* Add-on ECB-windows:: Description of additional ECB-windows
The basic ECB-windows of ECB
* Tree-buffer basics:: General introduction into tree-buffers
* Tree-buffer styles:: Displaying the trees with different styles
* ECB Directories-window:: Contents of the ECB Directories-window
* ECB Sources-window:: Contents of the ECB Sources-window
* ECB Methods-window:: Contents of the ECB Methods-window
* ECB History-window:: Contents of the ECB History-window
Displaying the trees with different styles
* Style basics:: Basic knowledge about the styles
* Ascii-based styles:: How to customize the ascii-styles
* Tree-buffers with images:: Which images are used for the tree
* Images for Methods-buffer:: Images for the tags in the Methods-buffer
Add-on ECB-windows of ECB
* Semantic analyser:: Analyses and displays semantic context
* Symboldefinition:: Displays definition of current symbol
Activation and Deactivation
* Standard activation:: How to manually (de)activate ECB
* Automatic activation:: Automatically (de)activating ECB
Usage of ECB
* Using the mouse:: Working with the mouse
* Using the keyboard:: Working with the keyboard
* The edit-area:: How to use the edit-area
* Temp- and compile-buffers:: Displaying temp- and compilation-buffers
* The other window:: How the ``other window'' is determined
* The Methods window:: Using and customizing the Methods-window
* Filtering the tree-buffers:: Applying filters to the ECB-tree-buffers
* The ECB-layout:: Changing, customizing, redrawing, creating
* Hiding the ECB windows:: Hiding/Showing the ECB-windows
* Maximizing the ECB windows:: Maximizing the ECB-windows
* Back/forward navigation:: Back- and forward navigation like a browser
* ECB-window synchronizing:: Auto./manual synchronizing the ECB-windows
* Stealthy background tasks:: Stealthy background-tasks of ECB
* 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 tree-keybindings:: Adding personal keybindings to a tree-buffer
* Using popup-menus:: Using the popup-menus from keyboard.
Using and customizing the ECB-Methods window
* Visiting tags:: Possible actions after visiting a tag
* Expanding:: Explicit and automatic expanding
* Customizing the display:: How to customize the Methods-buffer display
* Updating Methods-window:: Updating Methods with contents of current buffer
* Updating for ind. buffers:: Updating Methods for indirect buffers
* Jumping to external tags:: Jumping to the definition of external types
Applying filters to the special ECB-tree-buffers
* Filtering Directories:: Applying filters to the Directories-buffer
* Filtering Sources:: Applying filters to the Sources--buffer
* Filtering History:: Applying filters to the History-buffer
* Filtering Methods:: Applying filters to 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
Synchronization of the ECB-windows
* General synchronization aspects:: General synchronization aspects
* Synchronization of basic ECB-windows:: Synchronization of basic ECB-windows
* Add-on synchronization:: Synchronization of add-on ECB-windows
Customizing ECB
* General aspects:: General aspects for customizing ECB
* Most important options:: Which option you must know
* Customizable options:: All customizable options of ECB
General aspects for customizing ECB
* setq or customize:: Should i use setq or customize?
* Site-wide customizing:: Site-wide customizing of ECB
All customizable options of ECB
* ecb-general:: General customizing ECB
* ecb-tree-buffer:: Customizing the general tree layout
* ecb-directories:: Customizing the ECB-directories-tree
* ecb-sources:: Customizing the ECB-sources-window
* ecb-methods:: Customizing the ECB-methods-window
* ecb-history:: Customizing the ECB-history-window
* ecb-analyse:: Customizing the ECB-analyse-window
* ecb-symboldef:: Customizing the ECB-symboldef-window
* ecb-layout:: Customizing the ECB-layout
* ecb-compilation:: Customizing the compile-window
* ecb-create-layout:: Customizing options for creating layouts
* ecb-face-options:: Customizing options for faces
* ecb-faces:: Customizing the faces
* ecb-help:: Customizing the online help of ECB
* ecb-eshell:: Customizing the eshell-integration
* ecb-speedbar:: Customizing the speedbar-integration
* ecb-non-semantic:: Customizing parsing non-semantic sources
* ecb-winman:: Customizing window-manager support
* ecb-mode-line:: Customizing the tree-buffer-modelines
* ecb-version-control:: Customizing the version-control-support
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
Handling of common use-cases
* 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
* Large directories:: Working with large directories
* Remote directories:: Working with remote directories
* Version-control support:: Supporting Version control systems
* 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
* Non-semantic sources:: Parsing and displaying non-semantic sources
* Hide-show:: Using hide-show from the methods-buffer-menu
* Window-managers and ECB:: Support of several Emacs-window-managers
* Virtual folders in History:: Simulating something like virtual folders
Supporting Version control systems
* Identifying backends:: How ECB identifies the VC-backend of a dir
* Checking the state:: How ECB checks the VC-state of a file
* Remote repositories:: What you should know about this
* Refreshing the VC-state:: How to refresh when state changed outside
* Adding new backends:: Necessary steps for adding new backends
* Known VC-problems:: Currently known problems of the VC-support
Entry points for Elisp programmers
* List of variables:: Which variables an Elisp-program can use
* List of hooks:: All available hooks
* tree-buffer:: Full description of the tree-buffer-library
* Adviced functions:: How to deal with the adviced functions
* The layout-engine:: Programming new layouts and special windows
The library tree-buffer.el
* Introduction:: General description of tree-buffers
* A new tree-buffer:: How to create a new tree-buffer
* A new tree-node:: How to add new tree-nodes to a tree-buffer
* Updating a tree-buffer:: How to update a tree-buffer after changes
* Tree-buffer keybindings:: Default and customizable keybindings
* The tree-buffer-API:: All functions for tree-buffers and -nodes
* Do not with tree-buffer:: Things which are strictly forbidden
* Tree-buffer How to:: Dealing with special situations
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
Conflicts and bugs of ECB
* Conflicts:: 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 file parsing with 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
This section describes how to install ECB.
@menu
* Requirements:: Requirements for ECB
* ECB as XEmacs-package:: Installation of ECB as a XEmacs-package
* Standard ECB-Installation:: Standard installation of ECB for (X)Emacs
* Makefile customization:: Customizing build using Makefile.conf
@end menu
@node Requirements, ECB as XEmacs-package, Installation, Installation
@subsection Requirements
This section describes the requirements of ECB. Just ensure that these
requirements of ECB are fulfilled.
The short story: With Emacs >= 23.2 there is nothing to do. With XEmacs or
Emacs < 23.2 you have to install the CEDET-suite.
The long story:
@enumerate
@item Emacs-version:
ECB works only with (X)Emacs >= 21! If you have an older one, please upgrade.
@item CEDET-suite:
If Emacs >= 23.2 is used then CEDET is already integrated into Emacs and there
is nothing to do.
For users of any XEmacs-version, any Emacs-version < 23.2 or the latest author
CEDET version: Get it from @url{http://cedet.sourceforge.net}, read the
setup-instructions in @url{http://cedet.sourceforge.net/setup.shtml} and read
also the shipped file @file{INSTALL}.
@strong{Please note}: If ECB detects an author version of CEDET (as available
at @url{http://cedet.sourceforge.net}) then ECB will ALWAYS try to use that
one even if you use Emacs >= 23.2! This is for users who want to use latest
Emacs >= 23.2 but still prefer using the latest author version of CEDET
instead of the Emacs-integrated one.
So if you want to use the Emacs-integrated CEDET-suite of Emacs >= 23.2 you
have to ensure that no author-version of CEDET is in the @code{load-path}!
This means that the library cedet.el of the author-version MUST NOT be loaded
into Emacs (as described in the file INSTALL of CEDET)! This is a valid check:
(locate-library "semantic-ctxt") must return nil!
@item Only for XEmacs-users:
If you use XEmacs you must have installed the
package c-support (contains hideshow.el). If you want to read the online-help
of ECB in HTML-format you must have the library browse-url (part of the
mail-lib XEmacs package) installed; this package is also needed for submitting
problem-reports to the ECB-maintainers!
@item Optional for Java-coding:
ECB works very well with the JDEE package (
@url{http://jdee.sourceforge.net}) but JDEE is not required by ECB.
@end enumerate
Do not install ECB before you have successfully installed the requirements!
@node ECB as XEmacs-package, Standard ECB-Installation, Requirements, Installation
@subsection Installation of ECB as a XEmacs-package
This section is only relevant for XEmacs-users!
In previous versions of ECB XEmacs-users could use the
package-management-system of XEmacs for first-time downloading/installing ECB
or for upgrading to a newer version of ECB.
Beginning with version 2.33 ECB does no longer support the old versions of
semantic, eieio and speedbar not part of the CEDET-suite. ECB >= 2.33 requires
fully installed CEDET-suite with version >= 1.0pre6. This one is not available as
XEmacs-package. Therefore ECB can also not be run as XEmacs-package. If cedet
will become a XEmacs-package then probably ECB will come back as
XEmacs-package. But in the meanwhile you have to install ECB ``by hand'' as
described in the next section (@pxref{Standard ECB-Installation}).
@c @strong{Recommendation}: If you are able to manually install ECB and its
@c requirements as described in @ref{Standard ECB-Installation} then go on and
@c proceed with that (you will see, it's easy). You will get a much more powerful
@c ECB and also CEDET/semantic.
@c
@c If you are desperate to use the package-management-system of ECB for
@c installing ECB, then here is a short guide (for details about the
@c package-manager of XEmacs see the related info-manual):
@c
@c @strong{Caution}: If ECB is already installed and you just want
@c upgrading to a newer version then it is recommended to deactivate ECB
@c before proceeding with the steps below!
@c
@c @enumerate
@c @item Choose a download-site
@c
@c This can be done via the menu ``Tools --> Packages --> Add Download
@c Site'': Choose one of the listed sites. Or you can customize the
@c option @code{package-get-remote} by hand and save it for future
@c sessions.
@c
@c @item Activate the packages list
@c
@c This can be done either by the menu ``Tools --> Packages --> List and
@c Install'' or via the command @code{pui-list-packages}. After that a
@c special packages-buffer is displayed where you can interactively
@c install or upgrade packages. At the end of this buffer there is a
@c short description how to use this buffer.
@c
@c @item Install ECB and all required packages
@c
@c Mark the package named ``ecb'' for install. Do this also for the
@c required packages ``semantic'', ``eieio'' and ``speedbar''. The
@c package ``mail-lib'' is needed for easy submitting of problem-reports
@c to the ECB-maintainers and the package ``c-support'' is needed for
@c easy using hideshow within the Methods-buffer of ECB@footnote{All
@c required packages can simply autom. marked by hitting @kbd{r} in the
@c packages buffer. But this installs a lot of packages more (e.g. the
@c Newsreader Gnus) which are really not essential for ECB. Therefore it
@c is recommended to mark the required packages by hand.}.
@c
@c After marking all needed packages for installation hit @kbd{x} to
@c install them.
@c
@c If you have already installed ECB and you want just upgrading to the
@c latest available version then proceed as described above - same if you
@c want to upgrade one of the required packages.
@c
@c @item Start ECB
@c
@c Now you can immediately start ECB via the command @code{ecb-activate};
@c there is no need to restart XEmacs! As an alternative you can first
@c read the online-help via @code{ecb-show-help}.
@c
@c @end enumerate
@c
@c If you do not like the package-manager of XEmacs but you want
@c installing ECB ``by hand'' direct from the ECB-website then you have
@c to follow the instructions in @ref{Standard ECB-Installation}.
@node Standard ECB-Installation, Makefile customization, ECB as XEmacs-package, Installation
@subsection Standard installation of ECB for (X)Emacs
Follow exatly these steps to install ECB:
@enumerate
@item
Fulfill all requirements ECB needs (@pxref{Requirements})
ECB performs two autom checks:
@itemize @minus
@item At load-time:
It checks if cedet is at least installed so ECB can be loaded. If not it
reports an error.
@item At start-time:
It checks if the correct versions of cedet and semantic are installed and
gives you proper feedback.
@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
Download and unpack the ECB archive (probably you have already done
this :-)
@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 but XEmacs may have
slightly different mechanisms; see the XEmacs documentation}.
So for example the needed entry for your @file{.emacs}-file could be:
@example
(add-to-list 'load-path
"/path/to/your/ecb/installation/directory")
@end example
@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! It will not work!
@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, eieio and speedbar 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,
eieio and speedbar 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}.
Regardless which method you prefer: In both cases the used statement
must be placed @strong{after} the statement of step 3!
Only for users of a manually installed author version of the CEDET-suite (not
that one integrated into Emacs >= 23.2): Instructions for loading CEDET into
Emacs must be placed somewhere before the statements needed for loading ECB
(s.a.)!
@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.)
@file{Mekefile} can be customized using @file{Makefile.conf}
(@pxref{Makefile customization}).
@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 Makefile customization, , Standard ECB-Installation, Installation
@subsection Customizing build using Makefile.conf
Platform specific vars and programs can be customized from a
command-line or by means of @file{Makefile.conf}, for which
@file{Makefile.conf.template} is a template. It contains descriptions
of all configuration options. Copy it to @file{Makefile.conf} and
override as needed.
If settings hasn't been changed, @file{Makefile} uses platform
specific defaults.
There is a target, that prints configuration values: @code{make
printconf}.
When you use CEDET built into Emacs and don't install help, then you
don't even need the @file{Makefile.conf}.
When you use CEDET from the repo and/or want to install info files,
then set appropriate variables in @file{Makefile.conf}, for example:
@example
CEDET = ~/projects/cedet-bzr
EMACSINFOPATH = ~/.emacs.d/info
@end example
@node Setting up Emacs, First steps, Installation, Install and first steps
@section How to set up Emacs for file parsing with ECB
@strong{Please note}: Normally it should not necessary for you to
bother with the following stuff unless you have problems getting ECB
working correctly for you.
@menu
* General hints:: General hints for a correct setup
* Setting up CEDET/semantic:: How to setup semantic correctly
* Non-semantic files:: Setup for file types not supported by semantic
@end menu
@node General hints, Setting up CEDET/semantic, Setting up Emacs, Setting up Emacs
@subsection General hints for a correct setup
ECB is for browsing files and therefore you have to setup your
Emacs-configuration properly so the file-parsing engines like semantic, imenu
or etags can be activated automatically for parsing your Emacs-Lisp, C, C++ or
Java buffers@footnote{semantic supports some more ``languages'' like Phython,
Makefiles and some more. 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 parsing information in the ECB-methods buffer.
@node Setting up CEDET/semantic, Non-semantic files, General hints, Setting up Emacs
@subsection Setting up CEDET/semantic
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 CEDET/semantic itself
This section implies that you either use Emacs >= 23.2 or that you have
already successfully installed the CEDET-suite.
For all semantic-supported file-types parsing files is done completely
by semantic. ECB just displays the parsing results.
@itemize
@item Users of Emacs >= 23.2:
You just have to enable semantic by activating the semantic-mode. This can be
done by adding code to your initialization-file (e.g. .emacs) like
this:
@lisp
(semantic-mode 1)
@end lisp
This should be placed BEFORE the statements which activate ECB.
As an alternative you can use the @code{ecb-before-activate-hook} like
follows:
@lisp
(add-hook 'ecb-before-activate-hook
(lambda () (semantic-mode 1)))
@end lisp
This is a smarter way when you need semantic only if ECB is active.
@item Users of XEmacs or Emacs < 23.2:
You should read carefully the file @file{INSTALL} shipped with the
cedet-suite. In addition the CEDET-website offers a link to a ``Gentle
introduction to Cedet''. It's worth to read it! You find it here:
@ifhtml
@uref{http://xtalk.msk.su/~ott/en/writings/emacs-devenv/EmacsCedet.html}
@end ifhtml
@ifnothtml
@url{http://xtalk.msk.su/~ott/en/writings/emacs-devenv/EmacsCedet.html}
@end ifnothtml
If CEDET is not correctly installed then ECB can not setup semantic for its
needs.
@end itemize
@strong{Minimum setup recommendation}: It is very useful to enable the
@code{global-semantic-idle-scheduler-mode} and
@code{global-semanticdb-minor-mode}. Read the manual of Emacs 23.2 or the
manual of cedet/semantic how to do this. With CEDET-versions >= 1.0pre6 this
can be done by adding @code{semantic-load-enable-minimum-features} to your
startup-file. Please read also the subsection ``Jumping to the definition of
external types'' in @ref{ECB Methods-window}.
@anchor{Checking your hooks}
@item Checking your hooks (Only for XEmacs and Emacs < 23.2!)
If you use Emacs > 23.2 you can ignore the following paragraphs.
If you have already checked point (1.) 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 - in
case of XEmacs or Emacs < 23.2 - correct major-mode hooks ECB and semantic
will do what you expect them doing!
@node Non-semantic files, , Setting up CEDET/semantic, Setting up Emacs
@subsection Setup for file types not supported by semantic
From version 1.94 on ECB supports also parsing and displaying
file-contents for file-types not supported by semantic (i.e. there is
no semantic-grammar available for such file-types).
Such non-semantic file-types can often be parsed by imenu and/or
etags. Both of these parsing methods are now supported: ECB can
display the results of imenu and/or etags in its Method-buffer. ECB
uses for this speedbar-logic. Therefore the following speedbar options
takes effect for this feature:
@itemize @minus
@item @code{speedbar-dynamic-tags-function-list}
@item @code{speedbar-tag-split-minimum-length}
@item @code{speedbar-tag-regroup-maximum-length}
@item @code{speedbar-tag-hierarchy-method}
@end itemize
Normally there should be no need for you to bother with these options,
because the default values are suitable for most situations! But if
you are not satisfied with the parsing/display results then you can
change some of these options.
@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}
simultaneously, 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 Take a look at the most important options of ECB
Call @code{M-x ecb-customize-most-important RET} and see a list of
options which you should at least know that these options exist.
@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 . h} or
@item using the menu ``ECB''.
@end itemize
(The section you are currently reading is part of the online-help of
ECB)
The chapter ``Common use-cases'' is also very interesting!
@item Start working with ECB.
@end enumerate
@node Overview, Manual usage, 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.
ECB offers some basic ECB-windows to browse your sources:
@itemize @minus
@item ECB-Directories for browsing directories
@item ECB-Sources for browsing source-files
@item ECB-Methods for browsing the contents of a source
@item ECB-History for a history for open or recently opened files
@end itemize
See @ref{Basic ECB-windows} for a detailled description what these
basic ECB-windows offer. See @ref{ECB-windows} for a general
introduction in the ECB-window-concept of ECB.
In addition ECB offers some add-on ECB-window for special purposes:
@itemize @minus
@item ECB-Analyse for some intellisense stuff like possible completions or
local variables
@item ECB-Symboldef for displaying the documentation of current symbol under
point
@end itemize
See @ref{Add-on ECB-windows} for a detailled description what these