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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 14138 14139 14140 14141 14142 14143 14144 14145 14146 14147 14148 14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 14292 14293 14294 14295 14296 14297 14298 14299 14300 14301 14302 14303 14304 14305 14306 14307 14308 14309 14310 14311 14312 14313 14314 14315 14316 14317 14318 14319 14320 14321 14322 14323 14324 14325 14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 14336 14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 14350 14351 14352 14353 14354 14355 14356 14357 14358 14359 14360 14361 14362 14363 14364 14365 14366 14367 14368 14369 14370 14371 14372 14373 14374 14375 14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 14428 14429 14430 14431 14432 14433 14434 14435 14436 14437 14438 14439 14440 14441 14442 14443 14444 14445 14446 14447 14448 14449 14450 14451 14452 14453 14454 14455 14456 14457 14458 14459 14460 14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 14478 14479 14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 14518 14519 14520 14521 14522 14523 14524 14525 14526 14527 14528 14529 14530 14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587 14588 14589 14590 14591 14592 14593 14594 14595 14596 14597 14598 14599 14600 14601 14602 14603 14604 14605 14606 14607 14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630
|
\input texinfo @c -*-texinfo-*-
@c Copyright (C) 2000 - 2005 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: ecb.texi,v 1.209 2005/06/27 17:01:34 berndl Exp $
@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.32
@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". 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,
@item a list of functions/classes/methods/... in the current file,
(ECB uses the Semantic Bovinator, 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,
@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-interactors:: Description of all interactors 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
* 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 file parsing with ECB
* First steps:: First steps after activating ECB first time
Installation of ECB
* XEmacs Installation:: Installation of ECB for XEmacs users
* GNU Emacs Installation:: Installation of ECB for GNU Emacs users
How to set up Emacs for file parsing with ECB
* General hints:: General hints for a correct setup
* Setting up semantic:: How to setup semantic correctly
* Non-semantic files:: Setup for file types not supported by semantic
All interactors of ECB
* Basic interactors:: Description of the basic interactors
* Add-on interactors:: Description of additional interactors
The basic interactors of ECB
* Tree-buffer basics:: General introduction into tree-buffers
* Tree-buffer styles:: Displaying the trees with different styles
* 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
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 interactors 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 buffer:: Using and customizing the Methods-buffer
* 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 buffer
* Visiting tags:: Possible actions after visiting a tag
* Expanding:: Explicit and automatic expanding
* Customizing the display:: How to customize the Methods-buffer display
* Rebuilding the Methods:: When to rebuild the Methods-buffer
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
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-tree
* ecb-methods:: Customizing the ECB-methods-tree
* ecb-history:: Customizing the ECB-history-tree
* ecb-analyse:: Customizing the ECB-analyse-interactor
* 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-download:: Customizing how to download ECB
* 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
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
* 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
* Using semanticdb:: Using semanticdb for going to external nodes
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:: 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
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 available for tree-buffers
* 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
* XEmacs Installation:: Installation of ECB for XEmacs users
* GNU Emacs Installation:: Installation of ECB for GNU Emacs users
@end menu
@node XEmacs Installation, GNU Emacs Installation, Installation, Installation
@subsection Installation of ECB for XEmacs users
Basic requirement: ECB requires a XEmacs-version >= 21!
For XEmacs-users it is strongly recommended to use the
package-management-system of XEmacs for first-time
downloading/installing ECB or for upgrading to a newer version of ECB.
Here is a short guide (for details about the package-manager of XEmacs
see the related info-manual):
@strong{Caution}: If ECB is already installed and you just want
upgrading to a newer version then it is recommended to deactivate ECB
before proceeding with the steps below!
@enumerate
@item Choose a download-site
This can be done via the menu ``Tools --> Packages --> Add Download
Site'': Choose one of the listed sites. Or you can customize the
option @code{package-get-remote} by hand and save it for future
sessions.
@item Activate the packages list
This can be done either by the menu ``Tools --> Packages --> List and
Install'' or via the command @code{pui-list-packages}. After that a
special packages-buffer is displayed where you can interactively
install or upgrade packages. At the end of this buffer there is a
short description how to use this buffer.
@item Install ECB and all required packages
Mark the package named ``ecb'' for install. Do this also for the
required packages ``semantic'', ``eieio'' and ``speedbar''. The
package ``mail-lib'' is needed for easy submitting of problem-reports
to the ECB-maintainers and the package ``c-support'' is needed for
easy using hideshow within the Methods-buffer of ECB@footnote{All
required packages can simply autom. marked by hitting @kbd{r} in the
packages buffer. But this installs a lot of packages more (e.g. the
Newsreader Gnus) which are really not essential for ECB. Therefore it
is recommended to mark the required packages by hand.}.
After marking all needed packages for installation hit @kbd{x} to
install them.
If you have already installed ECB and you want just upgrading to the
latest available version then proceed as described above - same if you
want to upgrade one of the required packages.
@item Start ECB
Now you can immediately start ECB via the command @code{ecb-activate};
there is no need to restart XEmacs! As an alternative you can first
read the online-help via @code{ecb-show-help}.
@end enumerate
If you do not like the package-manager of XEmacs but you want
installing ECB ``by hand'' direct from the ECB-website then you have
to follow the instructions for GNU Emacs, see @ref{GNU Emacs Installation}.
@node GNU Emacs Installation, , XEmacs Installation, Installation
@subsection Installation of ECB for GNU Emacs users
Basic requirement: ECB requires an Emacs-version >= 21!
@strong{IMPORTANT}: If you are a XEmacs-user please read @ref{XEmacs
Installation} before proceeding with the following instructions!
@c TODO: Klaus Berndl <klaus.berndl@sdm.de>: Remove this when we
@c support upgrading also with cedet.
@strong{Using the new cedet 1.0 suite}: From beginning with version
2.01 ECB supports the next generation of the cedet-tools. But before
the cedet 1.0 suite becomes stable this means that ECB runs correctly
with loaded cedet 1.0 but the ECB-upgrading feature
(@pxref{Downloading new versions}) does not support autom. upgrading
to latest available cedet versions. This will be first available after
first stable release of the new cedet-library 1.0.
So, if the cedet 1.0 suite is loaded then the min- and max-version of
semantic, eieio and speedbar (mentioned in the Requirements-section of
the file @file{README}) have no relevance! If the new cedet 1.0 suite
should be used then just install and load cedet 1.0 like described in
the cedet-installation-instructions and go one with step 3. But ensure
you have loaded - as described in the cedet-@file{INSTALL}-file
- the file @file{/path/to/cedet/common/cedet.el} because otherwise
cedet is not properly installed and ECB can not savely recognize that
the new cedet-suite is loaded and should be used.
@enumerate
@item
Download and 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-, eieio- and speedbar-version@footnote{The
speedbar-version shipped with GNU Emacs <= 21.3 does not satisfy the
requirements for this feature - download a newer one!}.
@strong{Please 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, eieio and speedbar 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, eieio and speedbar 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 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!
@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!
@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 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 semantic:: How to setup semantic correctly
* Non-semantic files:: Setup for file types not supported by semantic
@end menu
@node General hints, Setting up 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 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 parsing information in the ECB-methods buffer.
@node Setting up semantic, Non-semantic files, General hints, Setting up Emacs
@subsection Setting up 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 semantic itself
For all semantic-supported file-types 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{Please 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
@anchor{Checking your hooks}
@item Checking your hooks
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 correct major-mode hooks ECB and semantic will do what you expect
them doing!
@node Non-semantic files, , Setting up 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 ``Tips and tricks'' 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
@cindex interactor
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{interactors} in this
manual.
ECB offers some basic interactors to browse your sources:
@itemize @minus
@item ECB-Directories for browsing directories
@item ECB-Sources for browsing source-files and a file-history
@item ECB-Methods for browsing the contents of a source
@end itemize
See @ref{Basic interactors} for a detailled description what these
basic interactors offer. See @ref{ECB-interactors} for a general
introduction in the interactor-concept of ECB.
In addition to these ``special'' ECB-windows you have always an
@dfn{edit-area} where you can edit your source-files. The edit-area
can be divided into several @dfn{edit-windows} - as many as you need
(@pxref{The edit-area}). And at the bottom of the ECB-frame a persistent
@dfn{compilation-window} (also called @dfn{compile-window}) can be
displayed (optional), where all the output of Emacs-compilation
(compile, grep etc.) is shown (@pxref{Temp- and compile-buffers}).
The following ``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-area |
| | (can be splitted in several edit-windows) |
| Methods | |
| | |
|--------------| |
| | |
| History | |
| | |
------------------------------------------------------------------
| |
| Persistent Compilation-window (optional) |
| |
------------------------------------------------------------------
@end group
@end example
@node Manual usage, ECB-interactors, Overview, Top
@chapter How to use this manual
@strong{IMPORTANT}: You should have read the chapter @ref{Overview}
before going on reading the current chapter.
This chapter describes shortly the contents of the following chapters
of this manual so maybe you can find faster what you are searching
for.
@table @asis
@item All interactors of ECB (@pxref{ECB-interactors})
Gives an introduction into the concept of interactors of ECB, what
they are, which different types exist, how they look, how they can be
used and last but not least what they do in detail, i.e. explains
every interactor of ECB in detail.
@item Activation and Deactivation (@pxref{Activation and Deactivation})
Describes how to activate and deactivate ECB and which different types
of activation are possible.
@item Usage of ECB (@pxref{Usage of ECB})
Describes in detail how to use ECB with mouse and keyboard, explains
the concept of the edit-area and the persistent compile-window,
describe how to change the window-layout and hide and show special
windows, which stealthy background-tasks ECB performs and so on...
@item Customizing ECB (@pxref{Customizing})
Gives an overview of the most important options of ECB and tell you
something about do's and don'ts concerning customization of ECB. Lists
all options of ECB and describe exactly the purpose of them.
@item Submitting a problem report (@pxref{Submitting problem report})
Instructions what to do if you encounters problems with ECB.
@item Upgrading and downloading ECB (@pxref{Upgrading})
Gives an introduction into the automatic option-upgrading-feature of
ECB and you can download and install a newer ECB-version from within
ECB.
@item Tips and tricks (@pxref{Tips and tricks})
How to deal with special situations and circumstances, so e.g. working
with big and small screens, working with large directories, using the
builtin version-control-support of ECB, parsing non-semantic-supported
sources like perl, using hide-show, working best with eshell and JDEE
and some window-managers of Emacs (like escreen or winring) and many
more...
@item Entry points for Elisp programmers (@pxref{Elisp programming})
All informations needed by programmers when using some ECB-concepts
from within other elisp-libraries. This includes a full description
how to use the ECB-independent library tree-buffer.el. Lists also all
available hooks and describes with full working example how to program
own layouts.
@item Conflicts and bugs of ECB (@pxref{Conflicts and bugs})
Lists all currently known bugs and problems and gives well working
work-arounds.
@item Frequently asked Questions (@pxref{FAQ})
Take a look...
@item Command Index (@pxref{Command Index})
List of all interactive commands of ECB
@item Option Index (@pxref{Option Index})
List of all user-customizable options of ECB
@item Concept Index (@pxref{Concept Index})
List of all concepts introduced by ECB
@end table
@node ECB-interactors, Activation and Deactivation, Manual usage, Top
@chapter All interactors of ECB
ECB displays a number of informational windows that allow for easy
source code navigation and overview. These informational windows are
called @dfn{interactors}. Each interactor is displayed in its own
special window/buffer which is dedicated and read-only.
There are some ``basic'' interactors (e.g. for browsing directories
and sources) and some ``add-on'' interactors for special purposes like
displaying the definition of the current symbol under point. This
chapter describes all interactors of ECB in detail.
@menu
* Basic interactors:: Description of the basic interactors
* Add-on interactors:: Description of additional interactors
@end menu
@node Basic interactors, Add-on interactors, ECB-interactors, ECB-interactors
@section The basic interactors of ECB
ECB offers basic interactors for browsing directory-structures, files
of a directory and contents of source-files (e.g. methods and
variables). These basic interactors are build from a special class of
interactors, called @dfn{tree-buffer}. See @ref{Tree-buffer basics}
for more details about the functionality of tree-buffers. See
@ref{Tree-buffer styles} to get an impression about the look&feel of
these tree-buffers.
In the following subsections these basic interactors of ECB will be
explained in detail.
@menu
* Tree-buffer basics:: General introduction into tree-buffers
* Tree-buffer styles:: Displaying the trees with different styles
* 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 Tree-buffer basics, Tree-buffer styles, Basic interactors, Basic interactors
@subsection General introduction into tree-buffers
ECB displays most of its informations (e.g. about directory-structures
or file-contents) in so called @dfn{tree-buffers} which means the
display of such a tree-buffer is structured in a tree consisting of
@dfn{tree-nodes}. Every line in a tree-buffer displays exactly one
tree-node. Each node can have any arbitrary number of
@dfn{children}-nodes. If a tree-node has no children then it is called
a @dfn{leaf}.
Each tree-buffer of ECB is displayed in an own special
ECB-window/buffer which is read-only ie. not editable.
The difference between a natural tree like a fir and an ECB-tree is
that the root(-node) of a tree-buffer is not visible but only its
children. In the example below the nodes parent-node-1 and
parent-node-2 are the children of the invisible root-node.
If a tree-node contains at least one child it is displayed with a
special expand/collapse-symbol (see the example below). This symbol
allows expanding (rsp. collapsing) the tree-node wheras expanding
means to display the children-nodes and collapsing means to hide the
childrens of a tree-node.
Here is an example of a tree-buffer:
@example
@group
[+] parent-node-1 -------.
[-] parent-node-2 -------|
[-] expanded --------|
leaf-node-1 -----|
leaf-node-2 -----|-----[tree-nodes]
leaf-node-3 -----|
leaf-node-4 -----|
[+] collapsed -------
|
`-----------------[expand/collapse-symbol]
@end group
@end example
In most cases an action is triggered when clicking with the mouse onto
a tree-node@footnote{Of course using the keyboard is also possible,
see @ref{Using the keyboard}.} (e.g. clicking onto ``leaf-node-1'' or
``parent-node-1'' in the example above). Which actions depends on the
type of the tree-buffer. For example clicking on a tree-node in the
ECB-sources-buffer (which is the name of a source-file) opens the
relelated file in the edit-area of ECB (@pxref{ECB Sources-buffer})
whereas clicking onto a node in the ECB-methods-buffer (which is the
name of a tag in the current source-file displayed in the edit-area)
``jumps'' to the location of this tag in the source-buffer in the
edit-area (@pxref{ECB Methods-buffer}).
Almost every interactor of ECB offers a special popup-menu when
clicking with the right mouse-button (of course also possible via
keyboard, see @ref{Using the keyboard}) onto a tree-node (e.g. some
senseful actions possible for directory-nodes like grepping this
directory or performing version-control actions for this directory or
something else).
See @ref{ECB Directories-buffer}, @ref{ECB Sources-buffer}, @ref{ECB
Methods-buffer} and @ref{Add-on interactors} for a detailed
description which actions are triggered and which popup-menus are
offered in all the interactors of ECB.
@node Tree-buffer styles, ECB Directories-buffer, Tree-buffer basics, Basic interactors
@subsection Displaying the trees with different styles
ECB offers three different styles for the tree-buffers in the
ECB-windows. Two of the styles are ascii-based and one style uses
images for drawing the tree-structure.
@menu
* 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
@end menu
@node Style basics, Ascii-based styles, Tree-buffer styles, Tree-buffer styles
@subsubsection Basic knowledge about the styles
There are nine image-names which define the control- and guide-symbols
to draw the tree. Here is the list of the allowed image-names and the
related corresponding ascii-symbols:
@itemize @minus
@item open (``[-]''):
The control-symbol displayed for an opened tree-node which has several
subnodes. Clicking onto this control closes the node.
@item close (``[+]''):
The control-symbol displayed for a closed tree-node, i.e. an
expandable node with subnodes but all subnodes are hidden. Clicking
onto this control opened the node and displays its subnodes - if
there are any. If it has no subnodes the empty-symbol will be
displayed.
@item empty (``[x]''):
The symbol displayed for an empty node. An empty node is a
node which could have subnodes but has currently none.
@item leaf (``*''):
The symbol displayed for a node which can not have any subnodes so it
is a ``leaf'' in the tree.
@item guide (`` |''):
The symbol used for drawing vertical ``guide-lines'' for opened nodes.
See the example below.
@item no-guide (`` ''):
Sometimes invisible guide-lines are needed to draw the tree.
@item end-guide (`` `''):
The symbol used for the guide-line of the last subnode of an opened
node.
@item handle (``-''):
The symbol displayed before every subnode. Each handle is connected to
a guide-line - either a normal guide or an end-guide.
@item no-handle (`` ''):
An invisible handle.
@end itemize
A tree will be build-up with these elements like follows:
@example
@group
[-] node-with-subnodes (open)
|-[+] not-empty-subnode1 (guide+handle+close)
|-[x] empty-subnode (guide+handle+empty)
`-[-] not-empty-subnode2 (end-guide+handle+open)
|-* leaf-1 (no-guide+no-handle+guide+handle+leaf)
`-* leaf-2 (no-guide+no-handle+end-guide+handle+leaf)
@end group
@end example
@node Ascii-based styles, Tree-buffers with images, Style basics, Tree-buffer styles
@subsubsection How to customize the ascii-styles
The ECB-option @code{ecb-tree-buffer-style} offers two different
styles completely drawn with ascii-controls and -guides.
Ascii-style with guide-lines (value @code{ascii-guides})@footnote{For
a better look&feel of such a tree-buffer ECB displays only the last
subnode of an opened node with a handle!}:
@example
@group
[-] ECB
| [+] code-save
`- [-] ecb-images
| [-] directories
| | [-] height-15
| | | * close.xpm
| | | * empty.xpm
| | | * leaf.xpm
| | `- * open.xpm
| | [+] height-17
| | [+] height-19
| `- [+] height-21
| [x] history
| [x] methods
`- [x] sources
@end group
@end example
Ascii-style without guide-lines (value @code{ascii-no-guides}) - this
is the style used by ECB <= 1.96:
@example
@group
[-] ECB
[+] code-save
[-] ecb-images
[-] directories
[-] height-15
* close.xpm
* empty.xpm
* leaf.xpm
* open.xpm
[+] height-17
[+] height-19
[+] height-21
[x] history
[x] methods
[x] sources
@end group
@end example
The tree-layout of both ascii-styles can be affected with the options
@code{ecb-tree-indent} and @code{ecb-tree-expand-symbol-before} (the
examples above have set 4 for the former and true for the latter one).
For the guide-style the face and color of the guide- and
handle-symbols can be customized with the option
@code{ecb-tree-guide-line-face} (default is the equal-named face).
@node Tree-buffers with images, Images for Methods-buffer, Ascii-based styles, Tree-buffer styles
@subsubsection Which images are used for the tree
Depending on the value of @code{ecb-tree-buffer-style} and the
image-support of (X)Emacs, the tree-buffer try to use images instead
of strings to draw a nice-looking tree.
If images can and should be used then the option
@code{ecb-tree-image-icons-directories} tells ECB where to search for
suitable image-icons for each of the nine image-names (see above). An
image is used for displaying a control with name ``XXX'' if one of the
directories of @code{ecb-tree-image-icons-directories} contains an
image-file with basename ``ecb-XXX'' and an extension which is
supported by (X)Emacs. Currently supported extensions are ``.xpm'',
``.png'', ``.gif'', ``.jpeg'', .''jpg'' and ``.xbm''.
Example: To display the control with name ``open'' with a suitable
image then one of the directories of
@code{ecb-tree-image-icons-directories} must contain a file with name
``ecb-open.xpm'' or ``ecb-open.png'' etc. See the description of this
option to get all important details how and in which sequence ECB
searches the directories of @code{ecb-tree-image-icons-directories}.
ECB comes with predefined default-images usable for every tree-buffer
and special images for the Directories- and the Methods-tree-buffer.
They are defined in several different heights - so for the most
senseful font-heights of a tree-buffer a fitting image-size should be
available. The shipped images reside either in the subdirectory
"ecb-images" of the ECB-installation or - if ECB is installed as
regular XEmacs-package - in the ECB-etc data-directory (the directory
returned by evaluating (locate-data-directory "ecb"). If you do not
want to change the images then you normally have nothing to do because
the default value of @code{ecb-tree-image-icons-directories} points
already to the correct image-directories.
A special remark for XEmacs:
At least XEmacs 21.14 (but probably previous versions too) has a bug
in its display-engine which prevents adjacent images to be displayed
correctly. The effect is, that in a row of two or more adjacent images
(e.g. end-guide+handle+open - see the tree-example above) always all
images are masked by the last one, means only the last one is visible.
If at least one normal character (e.g. a space) is placed between two
images then the images are displayed correctly. Therefore ECB has
implemented the following work-around to get best possible results
with XEmacs: open-, close-, empty-, leaf-, guide-, end-guide- and
no-guide-images are displayed with images and the handle- and the
no-handle-images are displayed with the corresponding ascii-symbols
(which is ``-'' rsp. `` ''). The face (the color) of the handle-symbol
is customizable via the option @code{ecb-tree-guide-line-face}.
This bug is already reported to the XEmacs-team. If your XEmacs has
fixed this bug then add the following to your @file{.emacs}-file (or
whereever your emacs-setup is located):
@lisp
(setq tree-buffer-enable-xemacs-image-bug-hack nil)
@end lisp
Then ECB uses images without any special work-around with XEmacs too.
Just try it - if the tree-buffers look ugly then the XEmacs-bug is
probably not fixed correctly.
@node Images for Methods-buffer, ,Tree-buffers with images, Tree-buffer styles
@subsubsection Special images for the Methods-buffer
ECB can display all the semantic-tags in the Method-buffer with
special icons for methods, variables and classes - each of them with a
different icon dependend of the protection of the tag. This feature
can be disabled/enabled via the option
@code{ecb-display-image-icons-for-semantic-tags}. All the special
images are located in that directory where the option
@code{ecb-tree-image-icons-directories} point to for methods.
@node ECB Directories-buffer, ECB Sources-buffer, Tree-buffer styles, Basic interactors
@subsection ECB Directories-interactor
@cindex Directories
The ECB directories interactor is for browsing directories. The direct
children of the invisible root-node are called @dfn{source-path} and
can be defined with the option @code{ecb-source-path}. Each
source-path is the starting-node of the complete directory-structure
below this path and can be browsed with the directories-interactor.
When a sources interactor is contained in the current layout then per
default only directories and subdirectories are displayed in the
directories tree-buffer (the source-files are displayed in the sources
tree-buffer - see @ref{ECB Sources-buffer}) but this can be changed
with the option @code{ecb-show-sources-in-directories-buffer}.
@subsubsection Usage of the directories interactor
@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. This
popup-menu offers operations for version-control, dired, grep, some
file-operations like creating a directory and commands to make a
directory a source-path in the sense of @code{ecb-source-path}.
@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
When source-files-nodes are displayed in the directories-buffer (see
@code{ecb-show-sources-in-directories-buffer}) then for these nodes
all descriptions of section @ref{ECB Sources-buffer} are valid.
@subsubsection Activating/Displaying the directories interactor
Either use one of the predefined layouts which contain the directories
interactor (@pxref{Changing the ECB-layout}) (e.g. via @kbd{C-c . l
c}) or create a new ecb-layout via the command
@code{ecb-create-new-layout} and add a buffer of type ``directories''
into this new layout (@pxref{Creating a new ECB-layout}).
@subsubsection Customizing the directories interactor
See @ref{ecb-directories} for a list of all options currently
available for customizing this interactors to your needs.
@node ECB Sources-buffer, ECB Methods-buffer, ECB Directories-buffer, Basic interactors
@subsection ECB Sources- and history-interactor
@cindex Sources
@cindex History
ECB offers two interactors for displaying source-file-names: The
sources- and the history-interactor. The former one displays all
source-file names of the currently selected directory of the
directories-interactor (@pxref{ECB Directories-buffer}) whereas the
latter one displays the names of all currently loaded source-files
regardless in which directory they reside so it works as a ``history''
of source-files.
Both the sources- and the history-tree-buffer are ``flat''
tree-buffers means all nodes are direct children of the invisible
root-node and can not be expanded.
@subsubsection Usage of the sources/history interactor
@itemize @bullet
@item
Source files can be selected by clicking with the primary 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. The buffer of the selected source-file will
be displayed in an edit-window - which one depends on the setting in
@code{ecb-mouse-click-destination}.
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 an 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
another edit window - which one depends on the setting in
@code{ecb-mouse-click-destination}.
@item
Right clicking on a source file (mouse-button 3) will open a popup
menu where different operation on the item under the mouse cursor can
be performed. This popup-menu offers operations for version-control,
dired, grep, filtering the file-names and some file-operations like
deleting the related file from disk.
@end itemize
@subsubsection Activating/Displaying the sources/history interactor
Either use one of the predefined layouts which contain the sources
(rsp. history) interactor (@pxref{Changing the ECB-layout}) (e.g. via
@kbd{C-c . l c}) or create a new ecb-layout via the command
@code{ecb-create-new-layout} and add a buffer of type ``sources''
(rsp. ``history'') into this new layout (@pxref{Creating a new
ECB-layout}).
@subsubsection Customizing the sources/history interactor
See @ref{ecb-sources} and @ref{ecb-history} for a list of all options
currently available for customizing these interactors to your needs.
@node ECB Methods-buffer, , ECB Sources-buffer, Basic interactors
@subsection The ECB Methods interactor
@cindex Methods
The @dfn{ECB-Methods} interactor contains all parsed and recognized tags
of the current source-buffer. It is called ``Method-buffer'' because
ECB is mostly designed for browsing sourcecode files and for
programming-languages these tags are often methods (and variables
etc.) To simplify explanations we talk in the following only about
methods and variables - but in general the method-buffer can contain
any kind of tags (e.g. sections and subsections for texinfo
buffers).
Per default the content of the methods-interactor is automatically
synchronized and updated with current point of the current
source-buffer in the edit-area (see @code{ecb-window-sync} and
@ref{ECB-window synchronizing}).
@subsubsection Usage of the methods interactor
@itemize @bullet
@item
When a method/variable is selected with the primary mouse button
(@pxref{Using the mouse}) or RETURN (@pxref{Using the keyboard}) the
buffer in the edit-window (which one depends on the setting in
@code{ecb-mouse-click-destination}) 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 tag (see also
option @code{ecb-tag-visit-post-actions}). But this works only for
sources parsed by semantic, not by imenu or etags!
@item
Clicking on a method/variable with the secondary mouse button or C-RETURN
(@pxref{Usage of ECB}) will jump to the method in another edit window
- which one depends on the setting in
@code{ecb-mouse-click-destination}.
@item
Right clicking on a method/variable will open a popup menu where
different operation on the item under the mouse cursor can be
performed. The popup-menu offers commands for filtering the displayed
tree-nodes, hiding/narrowing the related tags in the source-buffer and
expanding/collapsing one/all tree-nodes according to a certain
expansion-level.
@end itemize
@subsubsection Activating/Displaying the methods interactor
Either use one of the predefined layouts which contain the methods
interactor (@pxref{Changing the ECB-layout}) (e.g. via @kbd{C-c . l
c}) or create a new ecb-layout via the command
@code{ecb-create-new-layout} and add a buffer of type ``methods'' into
this new layout (@pxref{Creating a new ECB-layout}).
@subsubsection Customizing the methods interactor
See @ref{ecb-methods} for a list of all options currently available
for customizing this interactor to your needs.
@node Add-on interactors, , Basic interactors, ECB-interactors
@section Add-on interactors of ECB
This chapter gives detailled informations about available add-on
interactors. This includes basic desciptions what they do as well as
how to use them.
@menu
* Semantic analyser:: Analyses and displays semantic context
* Symboldefinition:: Displays definition of current symbol
@end menu
@node Semantic analyser, Symboldefinition, Add-on interactors, Add-on interactors
@subsection Displaying the current semantic context
@cindex Analyse
The cedet-suite contains the @dfn{semantic analyzer} which is a
library tool that performs context analysis and can derive useful
information. See the related node in the info-manual of cedet/semantic
for more detailed informations about this tool.
The analyzer output can be used through a special ECB-interactor. This
interface lists details about the analysis, such as the current
function, local arguments and variables, details on the prefix (the
symbol the cursor is on), and a list of all possible completions (see
@code{semantic-analyze-possible-completions} for more details about
completions available via the semantic-analyser).
Per default the content of the analyser-interactor is automatically
synchronized and updated with current point of the current
source-buffer in the edit-area (see @code{ecb-window-sync} and
@ref{ECB-window synchronizing}).
The analyser-interactor is of type tree-buffer. See @ref{Tree-buffer
basics} for basic informations how to use such a tree-buffer.
@subsubsection Usage of the analyser-interactor
@itemize @bullet
@item
When a node-name in the ``Context''-bucket is selected with the
primary mouse button (@pxref{Using the mouse}) or RETURN (@pxref{Using
the keyboard}) the buffer in the edit-window (which one depends on the
setting in @code{ecb-mouse-click-destination}) will jump to the
related entry. For strongly typed languages, this means you will jump
to the definition of the variable, slot, or type definition.
@item
Clicking on a node-name in the ``Context''-bucket with the secondary
mouse button or C-RETURN (@pxref{Usage of ECB}) will jump to the
related entry in another edit window - which one depends on the
setting in @code{ecb-mouse-click-destination}.
@item
If you click on a node-name in the "Completions"-bucket, then the text
that was recently analyzed will be replaced with the name of the tag
that was clicked on in the analyser-interactor.
@item
Right clicking with the mouse (or with the keyboard, see @ref{Using
popup-menus}) onto a tree-node opens a popup-menu which allows to
display additional (if available) informations to the current node.
@subsubsection Interactive commands of the analyser-interactor
ECB offers the following commands for the analyser-interactor:
@itemize @minus
@item @code{ecb-analyse-buffer-sync}
@item @code{ecb-goto-window-analyse}
@item @code{ecb-maximize-window-analyse}
@end itemize
See @ref{Interactive ECB commands} for details about these commands.
But you should not have any need to call
@code{ecb-analyse-buffer-sync} directly because ECB automatically
syncronizes the analyser-interactor with current active edit-buffer.
@c TODO: Ev. adding the interactive commands of ecb-analyse here?!
@end itemize
@subsubsection Activating/Displaying the analyser-interactor
Either use one of the predefined layouts "left-analyse" or
``leftright-analyse'' (e.g. via @kbd{C-c . l c}) or create a new
ecb-layout via the command @code{ecb-create-new-layout} and add a
buffer of type ``other'' and name ``analyse'' into this new layout
(@pxref{Creating a new ECB-layout}).
@subsubsection Customizing the analyser interactor
See @ref{ecb-analyse} for a list of all options currently available
for customizing this interactor to your needs.
@node Symboldefinition, ,Semantic analyser, Add-on interactors
@subsection Displaying the definition of the current symbol under point
@c TODO
@node Activation and Deactivation, Usage of ECB, ECB-interactors, 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:: Automatically (de)activating ECB
@end menu
@strong{IMPORTANT}: Regardless of the activation-type (standard or
automatic) the activation-process of ECB is always completely
failure-save. This means any error during any step of the
activation-process forces a complete cleanup (e.g. removing hooks,
disabling advices etc.) of all settings ECB did (e.g. adding hooks,
activating advices etc.) until the failure. Therefore if
ECB-activation stops cause of a failure then you can be sure that your
Emacs has the same state as before the ECB-activation-start!
@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@footnote{Activation is also possible via the menu
``Tools --> Start Code Browser (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 two ways for auto. (de)activation ECB after Emacs-start and
for different window-configurations.
@table @code
@item ecb-auto-activate
This option is for auto. activating ECB after Emacs-startup. Set this
to not nil and ECB will automatically be started after Emacs comes up.
@item window-manager support
The window-manager support of ECB deactivates ECB when going to
another window-configuration and reactivates ECB when coming back to
the ECB-window-configuration. For all details about this see
@ref{Window-managers and ECB}.
@end table
@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-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 buffer:: Using and customizing the Methods-buffer
* 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
@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-mouse-click-destination}.
@item ECB Methods:
Jumping to the method in that edit-window specified by the option
@code{ecb-mouse-click-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 an 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-tag-visit-post-actions}). But this works only for sources
parsed by semantic, not by imenu or etags!
@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 detailed
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
another edit-window (see the documentation of the option
@code{ecb-mouse-click-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 statically new
commands to the popup-menus. See the docstring of
@code{ecb-directories-menu-user-extension} for more details.
With the options @code{ecb-directories-menu-user-extension-function},
@code{ecb-sources-menu-user-extension-function},
@code{ecb-methods-menu-user-extension-function} and
@code{ecb-history-menu-user-extension-function} you can add new
commands to the popup-menus in a dynamic manner. See the docstring of
@code{ecb-directories-menu-user-extension-function} for more details.
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-menus.
@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.
ECB offers three ways for smoothly hor. scrolling with GNU Emacs if
@code{ecb-tree-easy-hor-scroll} is a positive integer-value S:
@itemize @bullet
@item
In all ECB-tree-buffers the keys @kbd{M-mouse-1} and @kbd{M-mouse-3}
are bound to scrolling left rsp. right with scroll-step S.
@item
Clicking with mouse-1 or mouse-2 onto the edge of the modeline has the
same effect, i.e. if you click with mouse-1 onto the left \(resp
right) edge of the modeline you will scroll left \(resp. right) with
scroll-step S.
@item
Additionally @kbd{C-M-mouse-1} and @code{C-M-mouse-3} are bound to
scrolling left rsp. right with scroll-step @code{window-width} - 2.
@end itemize
This is NOT done for XEmacs cause of its horizontal scrollbars. If you
want scrolling left and right with the mouse in XEmacs then activate
the horizontal scrollbars.
@node Using the keyboard, The edit-area, 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
prefix-key (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 tree-keybindings:: Adding personal keybindings to a tree-buffer
* Using popup-menus:: Using the popup-menus from keyboard.
@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
@cindex expanding
@cindex collapsing
In the ECB-buffers RETURN and TAB are the most important keys:
@itemize @bullet
@item
RETURN does the same as the primary button and C-RETURN does the same
as the secondary button. S-RETURN is the same as the SHIFT-click or
POWER-click. The terms ``primary'', ``secondary'', ``SHIFT-'' and
``POWER-click'' are explained in @ref{Using the mouse}. See also the
option @code{ecb-tree-do-not-leave-window-after-select} and the
function @code{ecb-toggle-do-not-leave-window-after-select} which is
bound to @kbd{C-t} in each tree-buffer of ECB!
For all RETURN (and S-RETURN and C-RETURN) hits the position of the
point within the current node-line is irrelevant! This is for
conveniance.
@item
TAB always expands or collapses expandable nodes.
@end itemize
The RETURN and TAB keys can not be (re)defined with @code{ecb-key-map}!
If you set @code{ecb-tree-navigation-by-arrow} to not nil then the
arrow keys work in the ECB tree-window in the following smart way:
@itemize @bullet
@item
Left-arrow: If node is expanded then it will be collapsed otherwise
(i.e. current node is either not expandable or not expanded) point
jumps to the next ``higher'' node in the hierarchical tree (higher
means the next higher level or - if no higher level available
- the next higher node on the same level).
@item
Right-arrow: If node is expandable but not expanded then it will be
expanded. Otherwise (i.e. current node is either not expandable or
already expanded) point jumps to the next following node (which is the
first subnode in case of an already expanded node or simply the next
node in the following line).
@item
Up- and down-arrow: Point jumps to the first character of the previous
(up) rsp. next node (down). ``First'' character means either the first
character of the expand-symbol (in case
@code{ecb-tree-expand-symbol-before} is not nil) or of the displayed
node-name. Or with other words: The first non-indentation and
non-guide-line (see @code{ecb-tree-buffer-style}) character of a node
(@pxref{Tree-buffer styles}).
@end itemize
@node Incremental search, Personal tree-keybindings, Navigation/Selection, Using the keyboard
@subsection Incremental search for a node in current tree-buffer
@cindex Incremental search
Each display-able key (e.g. all keys normally bound to @code{self-insert-command})
is appended to the current search-pattern. The tree-buffer tries to jump to the
first node which matching the current search-pattern either as substring or as
prefix (see below). If no match is found then nothing is done. There are some
special keys:
@itemize @bullet
@item @kbd{backspace} and @kbd{delete}:
Delete the last character from the search-pattern.
@item @kbd{home}:
Delete the complete search-pattern
@item @kbd{end}:
Expand either to a complete node if current search-pattern is already
unique or expands to the greatest common substring or prefix of the
nodes. If there are at least two nodes with the same greatest
common-prefix than every hit of @kbd{end} jumps to the next node with this
common prefix.
@end itemize
For better overlooking the current search-pattern is shown in the echo area.
After selecting a node with RET the search-pattern is cleared out. With
@code{ecb-tree-incremental-search} you can specify if the current search-pattern
must be a real prefix of the node (default) or if any substring is matched.
For faster and easier finding the right node in a ecb-window the incremental
search ignores the following non interesting stuff:
@itemize @minus
@item any leading spaces
@item expand/collapse-buttons: [+] rsp. [-]
@item protection-signs (+, -, #) in the method-window if uml-notation is used
@item variables types or return-types in front of variable- or method-names.
@item const specifier for variables
@end itemize
This means: Just type in the prefix (rsp. a substring) of a class-,
variable-, method-, directory- or filename and ECB will bring you as
fast as possible to the node you want. Incremental node-search uses
the value of @code{case-fold-search}.
Tip: The @code{ecb-minor-mode} offers you in the @code{ecb-mode-map}
(customizable via @code{ecb-key-map}) some keys for selecting every window
of the ecb-frame. This makes window-selection a childs play. For
example you can jump into the method-window by hitting @kbd{C-c . gm}.
@node Personal tree-keybindings, Using popup-menus, Incremental search, Using the keyboard
@subsection Adding personal keybindings for the tree-buffers
There are five hooks which can be used for adding personal keybindings
to the ECB tree-buffers:
@itemize @minus
@item @code{ecb-common-tree-buffer-after-create-hook}
@item @code{ecb-directories-buffer-after-create-hook}
@item @code{ecb-sources-buffer-after-create-hook}
@item @code{ecb-methods-buffer-after-create-hook}
@item @code{ecb-history-buffer-after-create-hook}
@end itemize
These hooks are called directly after tree-buffer creation so they can
be used to add personal local keybindings@footnote{To be more general:
They can be used to run any arbitrary lisp code after a tree-buffer
creation!} either to all tree-buffers
(@code{ecb-common-tree-buffer-after-create-hook}) or just to a certain
tree-buffer. Here is a list which keys MUST NOT be rebound:
@itemize @bullet
@item @kbd{RET} and all combinations with @kbd{Shift} and @kbd{Ctrl}:
Used for selecting nodes in all tree-buffers.
@item @kbd{TAB}:
Used for expanding/collapsing nodes in all tree-buffers.
@item @kbd{C-t}:
Used for toggling ``do not leave window after selection'' in all
tree-buffers, see command
@code{ecb-toggle-do-not-leave-window-after-select}.
@item All self-inserting characters:
Used for easy and fast navigation in all tree-buffers,
@xref{Incremental search}.
@item @kbd{F2}, @kbd{F3}, @kbd{F4}:
Used for customizing ECB, adding source-path in the directories buffer.
@end itemize
The following example binds @kbd{C-a} to some useful code in ALL
tree-buffers and @kbd{C-d} to even more useful code ONLY in the
directories buffer:
@example
@group
(add-hook 'ecb-common-tree-buffer-after-create-hook
(lambda ()
(local-set-key (kbd "C-a")
(lambda ()
(interactive)
(message "ECB is great!")))))
(add-hook 'ecb-directories-buffer-after-create-hook
(lambda ()
(local-set-key (kbd "C-d")
(lambda ()
(interactive)
(message "ECB is wonderful!")))))
@end group
@end example
@node Using popup-menus, ,Personal tree-keybindings, Using the keyboard
@subsection Using the popup-menu of a tree-buffer from keyboard.
@cindex tmm
A popup-menu of a tree-buffer can be activated from keyboard with the
command @code{tree-buffer-show-menu-keyboard} which is bound to
@kbd{M-m} in every tree-buffer. How the popup-menu is displayed
depends if this command is called with a prefix-argument or not:
If called without a prefix-arg then the popup-menu is displayed
graphically as if it would be activated via mouse (for GNU Emacs this
works perfectly but for XEmacs there is a bug which results in a wrong
menu-position - but the menu itself works also with XEmacs).
If called with a prefix-arg (@kbd{C-u M-m}) then the popup-menu is
displayed with the tmm-mechanism (like the Emacs-[menu-bar] is
displayed when `tmm-menubar' is called). This tmm-display is only
available for GNU Emacs.
@node The edit-area, Temp- and compile-buffers, Using the keyboard, Usage of ECB
@section Working with the edit-window(s) of the edit-area
@cindex edit-window
ECB offers you all what you need to work with the edit-area as if the
edit-windows of the edit-area would be the only windows of the
ECB-frame.
@cindex Adviced functions
ECB offers you to advice the following functions so they work best with ECB:
@itemize @minus
@item @code{other-window}
@item @code{delete-window}
@item @code{delete-other-windows}
@item @code{delete-windows-on}
@item @code{split-window-horizontally}
@item @code{split-window-vertically}
@item @code{split-window}
@item @code{display-buffer}
@item @code{switch-to-buffer}
@item @code{switch-to-buffer-other-window}
@item @code{other-window-for-scrolling}
@item @code{balance-windows}
@end itemize
The behavior of the adviced functions is (slightly simplified):
@itemize @bullet
@item
All these adviced functions behaves exactly like their corresponding
original functions but they always act as if the edit-window(s) of ECB
would be the only window(s) of the ECB-frame. So the edit-window(s) of
ECB seems to be a normal Emacs-frame to the user. This means that you
can split and delete edit-windows without any restriction - ECB
ensures that neither the special ECB-windows nor the compile-window
will be damaged.
@item
If there is a persistent compile-window (@pxref{Temp- and
compile-buffers}) then all compilation-buffers in the sense of
@code{ecb-compilation-buffer-p} will be displayed in the
compile-window.
@item
If called in another frame than the ECB-frame these functions behave
exactly like the not adviced original versions!
@end itemize
ATTENTION: If you want to work within the edit-area with splitting and
unsplitting (i.e. deleting) the edit-window(s) it is highly
recommended to use the adviced-functions of ECB instead of the
original Emacs-functions (see above). Per default ECB advices all of
the functions mentioned above but with the option
@code{ecb-advice-window-functions} you can customizes which functions
should be adviced by ECB. Please read carefully the documentation of
this option!
Another interesting option in the context of the edit-window and these
adviced functions is @code{ecb-layout-always-operate-in-edit-window}!
@subsection Documentation of the adviced window functions
This section describes for every adviced window function (s.a.) how it
differs from the original version. Only the differences are mentioned,
so if you want the full documentation of such a function call
@code{describe-function} or @kbd{C-h f}.
@deffn Command other-window ARG &optional ALL-FRAMES
Around-advice @code{ecb}: The ECB-version of @code{other-window}.
Works exactly like the original function with the following
ECB-adjustment: The behavior depends on
@code{ecb-other-window-behavior}.
@end deffn
@deffn Command delete-window &optional WINDOW
Around-advice @code{ecb}: The ECB-version of @code{delete-window}.
Works exactly like the original function with the following
ECB-adjustment:
If optional argument WINDOW is nil (i.e. probably called
interactively): If called in a splitted edit-window then it works like
as if all the edit-windows would be the only windows in the frame.
This means the current edit-window which contains the point will be
destroyed and its place will be occupied from another one. If called
in an unsplitted edit-window then nothing is done. If called in the
compile-window of ECB then the compile-window will be hidden (like
with @code{ecb-toggle-compile-window}). If called in an ecb-window
of the current ECB-layout there are two alternatives:
@itemize
@item If the function is contained in
@code{ecb-layout-always-operate-in-edit-window} the right edit-window
is selected (depends on the value of the option
@code{ecb-mouse-click-destination}) and does then its job.
@item Otherwise the behavior depends on the value of the option
@code{ecb-advice-window-functions-signal-error}.
@end itemize
If optional argument WINDOW is a living window (i.e. called from
program): If WINDOW is an edit-window then this window is deleted, if
WINDOW is the compile-window then it will be hidden and otherwise the
behavior depends on @code{ecb-advice-window-functions-signal-error}.
@end deffn
@deffn Command delete-other-windows &optional WINDOW
Around-advice @code{ecb}: The ECB-version of
@code{delete-other-windows}. Works exactly like the original function
with the following ECB-adjustment:
If optional argument WINDOW is nil (i.e. probably called
interactively): If called in a splitted edit-window then it works like
as if all the edit-windows would be the only windows in the frame.
This means all other edit-windows besides the current edit-window
which contains the point will be destroyed and the current edit-window
fills the whole edit-area. Neither the special ecb-windows nor the
compile-window will be destroyed!
@itemize
@item
If called in an unsplitted edit-window then either the compile-window
will be hidden (if there is one) otherwise nothing is done.
@item
If called in one of the ecb-windows then the current one is maximized,
i.e. the other ecb-windows (not the edit-windows!) are deleted.
@item
If called in the compile window there are two alternatives:
@itemize @minus
@item
If the function is contained in
@code{ecb-layout-always-operate-in-edit-window} the right edit-window
is selected (depends on the value of the option
@code{ecb-mouse-click-destination}) and then it does its job.
@item
Otherwise the behavior depends on the value of the option
@code{ecb-advice-window-functions-signal-error}.
@end itemize
@end itemize
If optional argument WINDOW is a living window (i.e. called from
program): If WINDOW is an edit-window then this window is maximized
(i.e. the other edit-window is deleted) if there are more at least 2
edit-windows otherwise the compile-window is deleted (if there is
one). If WINDOW is an ecb-window then only the other ecb-windows are
deleted and in all other cases the behavior depends on
@code{ecb-advice-window-functions-signal-error}.
@end deffn
@deffn Command delete-windows-on BUFFER &optional FRAME
Around-advice @code{ecb}: The ECB-version of @code{delete-windows-on}.
Works exactly like the original function with the following
ECB-adjustment:
An error is reported if @var{BUFFER} is an ECB-tree-buffer. These
windows are not allowed to be deleted.
@end deffn
@deffn Command split-window &optional WINDOW SIZE HORFLAG
Around-advice @code{ecb}: The ECB-version of @code{split-window}.
Works exactly like the original function with the following
ECB-adjustment:
If called for a not-edit-window in the @code{ecb-frame} it stops with
an error if @code{split-window} is not contained in the option
@code{ecb-layout-always-operate-in-edit-window}! Besides this (e.g.
called for a window in another frame than the @code{ecb-frame}) it
behaves like the original version.
@end deffn
@deffn Command split-window-horizontally
Around-advice @code{ecb}: The ECB-version of
@code{split-window-horizontally}. Works exactly like the original
function with the following ECB-adjustment:
If called in any other window of the current ECB-layout it stops with
an error if this @code{split-window-horizontally} is not contained in
the option @code{ecb-layout-always-operate-in-edit-window}!
@end deffn
@deffn Command split-window-vertically
Around-advice @code{ecb}: The ECB-version of
@code{split-window-vertically}. Works exactly like the original
function with the following ECB-adjustment:
If called in any other window of the current ECB-layout it stops with
an error if this @code{split-window-vertically} is not contained in
the option @code{ecb-layout-always-operate-in-edit-window}!
@end deffn
@deffn Command display-buffer BUFFER &optional NOT-THIS-WINDOW FRAME
Around-advice @code{ecb}: Makes this function compatible with ECB if
called in or for the ecb-frame. It displays all buffers which are
``compilation-buffers'' in the sense of
@code{ecb-compilation-buffer-p} in the compile-window of ECB. If the
compile-window is temporally hidden then it will be displayed first.
If there is no compile-window (@code{ecb-compile-window-height} is
nil) then it splits the edit-window if unsplitted and displays BUFFER
in another edit-window but only if @code{pop-up-windows} is not nil
(otherwise the edit-window will not be splitted).
All buffers which are not ``compilation-buffers'' in the sense of
@code{ecb-compilation-buffer-p} will be displayed in one of the
edit-area and @code{display-buffer} behaves as if the edit-windows
would be the only windows in the frame.
If BUFFER is contained in @code{special-display-buffer-names} or
matches @code{special-display-regexps} then
@code{special-display-function} will be called (if not nil). But this
behavior depends on the value of the option
@code{ecb-ignore-special-display}. The values of
@code{same-window-buffer-names} and @code{same-window-regexps} are
supported as well.
See the option @code{ecb-ignore-display-buffer-function}!
If called for other frames it works like the original version.
@end deffn
@deffn Command switch-to-buffer BUFFER &optional NORECORD
Around-advice @code{ecb}: The ECB-version of @code{switch-to-buffer}.
Works exactly like the original but with the following enhancements
for ECB:
``compilation-buffers'' in the sense of
@code{ecb-compilation-buffer-p} will be displayed always in the
compile-window of ECB (if @code{ecb-compile-window-height} is not nil)
- if the compile-window is temporally hidden then it will be displayed
first. If you do not want this you have to modify the options
@code{ecb-compilation-buffer-names},
@code{ecb-compilation-major-modes} or
@code{ecb-compilation-predicates}.
If called for non ``compilation-buffers'' (s.a.) from outside the
edit-area of ECB it behaves as if called from an edit-window if
@code{switch-to-buffer} is contained in the option
@code{ecb-layout-always-operate-in-edit-window}. Otherwise an error is
reported.
@end deffn
@deffn Command switch-to-buffer-other-window BUFFER &optional FRAME
Around-advice @code{ecb}: The ECB-version of
@code{switch-to-buffer-other-window}. Works exactly like the original
but with some adaptions for ECB so this function works in a
``natural'' way:
If called in any special ecb-window of the current ECB-layout then it
goes always to an edit-window (which one depends on the setting in
@code{ecb-mouse-click-destination}) and then goes on as if called from
this edit-window.
If a compile-window is used (i.e. @code{ecb-compile-window-height} is
not nil) then ``compilation-buffers'' in the sense of
@code{ecb-compilation-buffer-p} are always displayed in the
compile-window. If the compile-window is temporally hidden then it
will be displayed first. If no compile-window is used it behaves like
the original.
If called from within the compile-window then ``compilation-buffers''
will be displayed still there and all other buffers are displayed in
one of the edit-windows - if the destination-buffer is already
displayed in one of the edit-windows then this one is used otherwise
it behaves like the original.
If called within an edit-window it behaves like the original function
except for compilation-buffers (if a compile-window is used, see
above).
@end deffn
@deffn Function other-window-for-scrolling
Around-advice @code{ecb}: This function determines the window which is
scrolled if any of the ``other-window-scrolling-functions'' is called
(e.g. @code{scroll-other-window}):
If the option @code{ecb-scroll-other-window-scrolls-compile-window} is
not nil (maybe set by
@code{ecb-toggle-scroll-other-window-scrolls-compile}) and a
compile-window is visible then always the current buffer in the
compile-window is scrolled!
Otherwise it depends completely on the setting in
@code{ecb-other-window-behavior}.
@end deffn
@deffn Command balance-windows
Around-advice @code{ecb}: When called in the @code{ecb-frame} then
only the edit-windows are balanced.
@end deffn
@node Temp- and compile-buffers, The other window, The edit-area, Usage of ECB
@section Temp- and compile-buffers display in ECB
@cindex temporary buffers
@cindex help buffers
@cindex compilation buffers
@cindex grep buffers
If you call any help in Emacs, e.g. by calling @code{describe-function}, or
if you do a completion in the minibuffer, then Emacs displays the
result-buffer in another window. This behavior you have also in ECB.
@subsection Standard Emacs behavior
If the edit-area is already splitted into at least two edit-windows
then the temp-buffer is displayed in another edit-window otherwise the
edit-area will be splitted first into two edit-windows, one above the
other. The variables @code{temp-buffer-max-height} and
@code{temp-buffer-resize-mode} (for GNU Emacs) and
@code{temp-buffer-shrink-to-fit} (for XEmacs) work also correctly with
ECB.
Same for all compilation output-buffers (e.g. after a @code{compile} or
@code{grep}) and the variable @code{compilation-window-height}.
This is default behavior of ECB. But there is also another way to
display such buffers: Using a persistent extra window at the bottom of
the ECB-frame:
@subsection Using a persistent compile window
With the option @code{ecb-compile-window-height} you can define if the
ECB layout should contain per default a compile-window at the
bottom (just specify the number of lines which should be used for the
compile-window at the bottom of the frame). If ``yes'' ECB displays
all buffers for which the function @code{ecb-compilation-buffer-p}
returns not nil (e.g. all output of compilation-mode (compile, grep
etc.) or all temp-buffers like *Help*-buffers) in this special
window.
In general: With the options @code{ecb-compilation-buffer-names},
@code{ecb-compilation-major-modes} and
@code{ecb-compilation-predicates} you can define which buffers should
be displayed in the compile-window of ECB (for example if you call
@code{switch-to-buffer} or @code{display-buffer} or if you run
@code{compile} or if you display *Help*-buffers). Per default these
are all temp-buffers like *Help*-buffers, all compile- and grep
buffers, *Occur*-buffers etc. See the default values of these options.
With the command @code{ecb-toggle-compile-window} (bound to @kbd{C-c .
\}) you can toggle the visibility of the compile-window
(@pxref{Interactive ECB commands}).
There are some more useful options and commands related to the
compile-window of ECB (to see all options for the compile-window see
the customization group @ref{ecb-compilation}):
@itemize @bullet
@item
With the option @code{ecb-compile-window-temporally-enlarge} you can
allow Emacs to enlarge temporally the ECB-compile-window in some
situations. Please read the comment of this option. See also the
description of the command
@code{ecb-toggle-compile-window-height}.
@item
With the option @code{ecb-enlarged-compilation-window-max-height} you
specify how @code{ecb-toggle-compile-window-height} should
enlarge the compile-window.
@item
With the command @code{ecb-cycle-through-compilation-buffers}
(@pxref{Interactive ECB commands}) you can cycle through all current
open compilation-buffers (in the sense of
@code{ecb-compilation-buffer-p}) very fast.
@end itemize
ECB offers the same compile-window functionality regardless if the
ECB-window are hidden or not. The state of the compile-window will be
preserved when toggling the ecb-windows or when maximizing one
ecb-windows! So you have the advantage of one special window for all
help-, grep or compile-output (see above) also when the ecb-windows
are hidden - a window which will not be deleted if you call
@code{delete-other-windows} (bound to @kbd{C-x 1}) for one of the
edit-windows. In general: All features of the compile-window work with
hidden ecb-windows exactly as when the ecb-windows are visible.
@anchor{Problems with the compile window}
@subsection What to do if there are problems with the compile-window
Normally displaying temp- and compilation-buffers (or more general:
displaying buffer for which @code{ecb-compilation-buffer-p} is not
nil) should work reliable. But if there are problems which you can not
handle with the options @code{ecb-compilation-buffer-names},
@code{ecb-compilation-major-modes} or
@code{ecb-compilation-predicates} then please go on like follows:
@enumerate
@item
Set the option @code{ecb-layout-debug-mode} to not nil.
@item
Reproduce the wrong behavior exactly by repeating all the operations
which lead to the problem. If possible then restart Emacs before
reproducing the problem so you can begin from the beginning!
@item
Now send immediately a bug report with
@code{ecb-submit-problem-report}.
@item
Set @code{ecb-layout-debug-mode} back to nil if you do not want
further debugging output in the *Messages* buffer"
@end enumerate
@anchor{Using special-display with ECB}
@cindex special-display
@subsection Handling special-display-buffers
Emacs offers three options for a special-display-handling of certain
buffers: @code{special-display-function},
@code{special-display-buffer-names} and
@code{special-display-regexps} (see the Emacs manual for a description
of these options). ECB offers an option
@code{ecb-ignore-special-display} for specification in which
situations ECB should take account for the values of these
special-display-options.
Default-behavior of ECB is to ignore these special-display-options
when a persistent compile-window is active (i.e.
@code{ecb-compile-window-height} is not nil). But with
@code{ecb-ignore-special-display} you can tell ECB, that either always
the special-display-options should be ignored as long as ECB is active
or that they should be never igored regardless if a persistent
compile-window is set or not. In the latter case using
@code{display-buffer} or @code{pop-to-buffer} takes always account for
the values of these options - like the original behavior of Emacs.
@node The other window, The Methods buffer, Temp- and compile-buffers, Usage of ECB
@section How the ``other window'' is determined by ECB
@cindex other window
Normally all windows in an Emacs-frame are arranged in a cyclic order
and window-selecting-commands like @code{other-window} or
window-scrolling-commands like @code{scroll-other-window} choose
simply the next@footnote{@code{other-window} allows to select ARG'th
different window, i.e. the window ARG steps away from current window
in the cyclic order of the windows} window after the current window as
``other window''.
@subsection ``Other window''-basics in ECB
With a typical window-layout of ECB such a cyclic order of
@strong{all} windows in the ECB-frame does not make sense because it
would be not very intuitive and against that what the user wants to
``say'' when calling @code{other-window} or
@code{scroll-other-window}.
Therefore ECB divides the whole set of windows of the ECB-frame in
several subsets:
@itemize @bullet
@item The edit-windows of the edit-area
@item The special tree-windows for browsing-tasks
@item The compile-window at the bottom (if there is one)
@item The minibuffer-window of the ECB-frame (if active)
@end itemize
Each of these subsets will be treated as a cyclic ordered subset, i.e.
all windows in each of these subsets are ordered as the function
@code{walk-windows} would visit the windows when the windows of a
subset would be the only windows of a
frame@footnote{@code{other-window} uses the same window-ordering as
@code{walk-windows}}.
@subsection Builtin ``other window'' behaviors of ECB
ECB now offers to specify the behavior of commands like
@code{other-window} or @code{scroll-other-window} within the
ECB-frame. This can be done with the option
@code{ecb-other-window-behavior}. This option offers several builtin
behaviors:
@itemize @bullet
@item All windows of the ECB-frame are considered
ECB will cycle through all windows of the ECB-frame or scroll simply
the next window in the ECB-frame, means it behaves like the original
@code{other-window} rsp. the original
@code{other-window-for-scrolling}.
@item Only the windows of the edit-area are considered
ECB will only cycle through the edit-windows of ECB or only scroll
another edit-window. If the selected window is not an edit-window then
all windows are taken into account.
@item The edit-windows and the compile-window are considered
Like above but the compile-window will be added to the subset of the
edit-windows.
@item Behave as smart and intuitive as possible
This is the default behavior of ECB. ECB tries to choose the
@code{other-window}-destination or the ``other window'' to scroll in a
smart and intuitive way: If point is in one of the edit-windows and if
the edit-area is splitted then always the ``next'' edit-window is
choosen (whereas the next edit-window of the last edit-window is the
first edit-window)- if the edit-area is unsplitted then the
compile-window is used if there is one. In the context of an
@code{other-window}-call the @var{ARG} of @code{other-window} will be
taken into account.
If one of the special ecb-windows is selected then always the ``next''
ecb-window is choosen (whereas the next ecb-window of the last
ecb-window is the first ecb-window). In the context of an
@code{other-window}-call the @var{ARG} of @code{other-window} will be
taken into account. If there is only one ecb-window then ECB considers
also the edit-windows.
If the compile-window is selected then always the last edit-window
which had the point will be used unless @code{other-window} has been
called with a prefix-argument unequal 1.
@end itemize
Regardless of the different behaviors above ECB handles the situation
of an active minibuffer during a call to @code{other-window} or
@code{scroll-other-window} like follows:
If the minibuffer-window is selected then ECB always chooses the
window @code{minibuffer-scroll-window} points to (when this variable
is set, otherwise the compile-window or the last selected edit-window
is choosen) when the called command is called to choose the 1. next
window (always true for scrolling another window or true when
@code{other-window} called without prefix-arg or with prefix-arg equal
1). Otherwise the window ARG steps away is choosen (in case of
@code{other-window}).
If there is an active minibuffer but the minibuffer-window is not
selected then @code{other-window} and @code{scroll-other-window}
behave like the original version.
@subsection User-defined ``other window'' behavior
In addition to the builtin ``other window'' behaviors ECB offers a
user to completely define for himself how ECB should choose another
window for scrolling it or selecting it. This can be done with the
option @code{ecb-other-window-behavior} too because this option can
also have a function-symbol as value:
Such a function gets seven arguments:
@enumerate
@item
A canonical list of all currently visible windows of the
@code{ecb-frame}
@item
A canonical list of all currently visible edit-windows
@item
A canonical list of all currently visible ecb-windows
@item
The window-object of the compile-window if there is any.
@item
The minibuffer-window of the ECB-frame if there is an active
minibuffer.
@item
The result of the function @code{ecb-where-is-point} - see the
documentation of this function for details.
@item
An integer which indicates how many steps away from the current
selected window the ``other-window'' is. Is nil when this function is
called in another context than for @code{other-window}.
@end enumerate
The function has to return a window-object which is then used as
``other window'' for the command @code{other-window} or for scrolling
another window (e.g. with @code{scroll-other-window}). Such a function
has to handle properly all situation for itself.
Here is an example for such a function:
@example
@group
(defun ecb-get-other-window-smart (win-list
edit-win-list
ecb-win-list
comp-win
minibuf-win
point-loc
nth-window)
"Implements the smart-setting of `ecb-other-window-behavior'."
(if minibuf-win
;; if we have an active mini-buffer we delegate this to
;; `ecb-get-other-window-minibuf-active'
(ecb-get-other-window-minibuf-active win-list
edit-win-list
ecb-win-list
comp-win
minibuf-win
point-loc
nth-window)
;; here we have no active minibuffer!
(let ((nth-win (or nth-window 1)))
(cond ((equal point-loc 'ecb)
(ecb-next-listelem ecb-win-list (selected-window) nth-win))
((equal point-loc 'compile)
(if (= nth-win 1)
(or (and ecb-last-edit-window-with-point
(window-live-p ecb-last-edit-window-with-point)
ecb-last-edit-window-with-point)
(car edit-win-list))
(ecb-next-listelem (append edit-win-list
(list (selected-window)))
(selected-window)
nth-win)))
(t ;; must be an edit-window
(ecb-next-listelem (append edit-win-list
(if (and comp-win
(= (length edit-win-list)
1))
(list comp-win)))
(selected-window)
nth-win))))))
@end group
@end example
This example implements the builtin smart behavior described above.
@node The Methods buffer, Filtering the tree-buffers, The other window, Usage of ECB
@section Using and customizing the ECB-Methods buffer
ECB is mostly designed to display parsing information for files
supported by semantic. But beginning with version 1.94 it also
supports other parsing engines like imenu and etags, so also files not
supported by semantic but by imenu/etags can be displayed in the
Method-buffer of ECB. Therefore we have to introduce some terminology:
@cindex semantic-sources
@anchor{Definition of semantic- and non-semantic-sources}
@itemize @minus
@item @dfn{semantic-sources}:
These are file-types for which a semantic grammar is available, so the
files are parse-able by semantic. These sources are supported best by
ECB and most of the following options and descriptions are related to
these file-types. Examples are programming-sources like C++, C, Java,
Emacs-Lisp and Texinfo-file and some more.
@cindex non-semantic-sources
@item @dfn{non-semantic-sources}:
For these files there is no semantic-grammar available so they can not
be parsed by semantic. Examples are Perl-, LaTeX- and TeX-files. But
for many of these files imenu and/or etags parsers exist. ECB supports
now parsing and displaying these file-types too and it uses for this
some speedbar-logic.
@end itemize
This chapter describes how to use and customize the Methods-buffer of
ECB.
@menu
* Visiting tags:: Possible actions after visiting a tag
* Expanding:: Explicit and automatic expanding
* Customizing the display:: How to customize the Methods-buffer display
* Rebuilding the Methods:: When to rebuild the Methods-buffer
@end menu
@node Visiting tags, Expanding, The Methods buffer, The Methods buffer
@subsection Possible actions after visiting a tag
You visit a tag by clicking with either the primary oder secondary
mouse-button (or by hitting @kbd{RET} or @kbd{C-RET} if using the
keyboard) onto a node in the Methods-tree-buffer of ECB. This simply
selects the ``right'' edit-window (depends if clicked with the primary
or secondary button, in how many windows the edit-area is splitted and
the value of @code{ecb-mouse-click-destination}) and puts the point
onto the first line of the clicked tag.
But you can define if after this ``basic'' tag-visit-action more
additional actions should be performed by ECB. You can either use some
of the predefined actions (e.g. highlighting the header-line of the
tag) or define own actions. You can set different actions for
different major-modes. All this is done via the option
@code{ecb-tag-visit-post-actions}.
The following actions are currently predefined:
@itemize @minus
@item @code{ecb-tag-visit-highlight-tag-header}
@item @code{ecb-tag-visit-smart-tag-start}
@item @code{ecb-tag-visit-recenter}
@item @code{ecb-tag-visit-recenter-top}
@item @code{ecb-tag-visit-goto-doc-start}
@item @code{ecb-tag-visit-narrow-tag}
@end itemize
See the documentation of these function for details what they do.
Per default ECB performs the actions
@code{ecb-tag-visit-smart-tag-start} and
@code{ecb-tag-visit-highlight-tag-header} for all major-modes.
@node Expanding, Customizing the display, Visiting tags, The Methods buffer
@subsection Explicit and automatic expanding of the ECB-methods-buffer
@subsubsection Explicit expanding all nodes to a certain expansion level
With the command @code{ecb-expand-methods-nodes} (bound to @kbd{C-c .
x}) you can get a fast overlook of the contents of the source-buffer,
because this command allows precisely expanding all tags with a
certain indentation-level. So you can either expand no tags (or with
other words collapse all tags) or expand all tags so see the contents
of a buffer at one glance. Or you can expand exactly that tags of a
certain indentation level.
Which node-types are expanded (rsp. collapsed) by this command
depends for semantic-sources on the options
@code{ecb-methods-nodes-expand-spec} and
@code{ecb-methods-nodes-collapse-spec}! For non-semantic-sources always
all node-types are expanded/collapsed, i.e. the two options above
takes no effect for these files.
@subsubsection Explicit expanding of the current node to a certain level
With the popup-menu of the methods-buffer an even more precise
expansion is possible because it allows not only expanding all tags
(see above) but offers in addition expanding only the current-node
(for which the menu was activated) to an exact level of expansion:
All menu-entries are label with an expansion-``level'' whereas level
specifies precisely which level of nodes should be expanded. level
means the indentation-level of the NODE itself and its (recursive)
subnodes relative to the NODE itself.
So a level value X means that all (sub)nodes with an indentation-level
<= X relative to NODE are expanded and all other are collapsed.
Examples:
@itemize @minus
@item Expand this node to level 0:
Expand only the NODE itself because it is the only node which has
indentation 0 to itself. All deeper indented nodes will be collapsed.
This is also the important difference between using this menu compared
to clicking onto the expand-symbol of the node: The latter one expands
the NODE to that expansion-state it has before the last collapsing (so
when deeper nodes has been expanded they will be expanded now to). The
former one expands exactly(!) to level 0, means expand only the node
itself and collapse all(!) its subnodes recursively(!).
@item Expand this node to level 1:
Expand the NODE itself and all of its direct subnodes - because only
the direct subnodes of NODE have indentation-level 1 relativ to NODE.
All deeper nodes will be collapsed.
@item Collapse this node completely:
Collapses the current node recursively, means collapse not only the
node itself but also its subnodes, the subnodes of the subnodes and so
on! This is very differnt from clicking onto the collapse symbol
because this action only collapses the node itself but preserves the
expansion-state of all its subnodes!
@end itemize
Expanding the current node with the popup-menu ignores the settings in
the options @code{ecb-methods-nodes-expand-spec} and
@code{ecb-methods-nodes-collapse-spec}!
@subsubsection Automatic expansion ot tags after buffer-parsing
With the option @code{ecb-show-tags} you tell ECB how to display tags
of a certain tag-class (@pxref{Customizing the display}). Among other
things you can tell ECB that a certain tag-class should be combined
under an expanded or collapsed bucket-node. But such a setting defines
the expansion-state of such a bucket-node only direct afterwards the
buffer has been (re)parsed, which can occur after opening a file,
after autom. reparsing the buffer via semantic or after manually
rebuilding the methods-buffer of ECB.
The tag-class @code{type} (classes, interfaces, enumerations etc.) is
divided into several subtypes by semantic. The subtypes are strings
which names exactly if the tag with tag-class @code{type} is a class,
an interface, an enumeration, a typedef etc. With the option
@code{ecb-type-tag-expansion} you can tell ECB if these type-tags
should be autom. expanded after (reparsing) a buffer (see above) or if
they should be displayed collapsed - so all its members (methods,
variables etc.) are hidden.
@subsubsection Automatic expanding the ECB-methods-buffer for current tag
If the option @code{ecb-highlight-tag-with-point} is switched on, then
always that node in the method-buffer is highlighted which belongs to
the current semantic-tag under point in the current active
edit-window. But if this node is invisible (probably because its
parent node is collapsed) then no node is highlighted if the auto.
expanding feature is switched off.
You can either switch on this feature with the option
@code{ecb-auto-expand-tag-tree} or even easier with the command
@code{ecb-toggle-auto-expand-tag-tree}.
There is another option
@code{ecb-expand-methods-switch-off-auto-expand} which makes both
explicit and auto. expanding best working together. See the
documentation of this option to get the details.
The autom. expanding feature is only available for semantic-sources!
Previous versions of ECB have always fully expanded the whole tree in
the Methods-buffer if the current tag in the source-buffer was not
visible in the current tree - e.g. because the variables-bucket was
collapsed or the containing type of a tag (e.g. the class of a method)
was collapsed. So in most cases much more was expanded as needed to
make the current tag visible.
The mechanism of ECB 2.22 and higher only expands the needed parts of
the tree-buffer to make the related node visible: First we try to
highlight the current tag with current expansion-state of the
Methods-buffer. If the node is not visible so the tag can not be
highlighted then we go upstairs the ladder of type-tags the current
tag belongs to (e.g. we expand successive the nodes of the whole
class-hierachy of the current method-tag until the related node
becomes visible). If there is no containing type for the current tag
then the node of the tag is probably contained in a toplevel-bucket
which is currently collapsed; in this case we expand only this
bucket-node and try highlighting again. Only if this has still no
success then we expand the full tree-buffer and try to highlight the
current tag.
There is another option
@code{ecb-auto-expand-tag-tree-collapse-other}: If this option is set
then auto. expanding the tag-tree collapses all not related nodes.
This means that all nodes which have no relevance for the currently
highlighted node will be collapsed, because they are not necessary to
make the highlighted node visible. This feature is switched off by
default because if always collapses the complete Methods-tree before
the following highlighting of the node for the current tag expands the
needed parts of the tree-buffer.
@node Customizing the display, Rebuilding the Methods, Expanding, The Methods buffer
@subsection Customizing the display of the Methods-buffer
@cindex semantic tag
@cindex tag
The ECB-Methods buffer is probably the most important browsing window
offered by ECB. It displays all parsing informations of the current
source-buffer (the buffer displayed in the current active
edit-window).
Normally ECB gets all informations displayed in this Methods-buffer
from the semantic-library - at least for semantic-sources. This
library parses auto. the current source-buffer in the edit-window of
ECB and returns all information in form of @dfn{tags} to ECB which
displays them in a browse-able form in its Method-buffer. See @ref{ECB
Methods-buffer} for information how to use the Methods-buffer.
There are several options to customize which tags ECB should display
in general, if the tags should be collapsed or expanded, how to
fontify them (i.e. syntax-highlighting) and something more.
@table @code
@item ecb-show-tags
With the option @code{ecb-show-tags} you specify how ECB should
display the tags returned by the semantic parser. Semantic divides its
tags in several so called @dfn{tag classes}. A tag-class is always a
symbol and can be for example @code{type} (tags which represent a
class@footnote{Do not confuse the term ``class'' in the context of a
tag, which means the class of the tag and which is a semantic-term and
a ``class'' in the context of an object oriented language like Java or
C++! Normally the surrounding context sould be sufficient to
understand which type of ``class'' is meant whenever the term
``class'' is used in this manual.}, a interface, an enumeration etc.),
@code{function} (tags which represent function or methods),
@code{variable} (variables and attributes), @code{include}
(import-statements) etc. There is no predefined superset of allowed
tag-class-symbols because each language-parser can define its own
tag-classes. But to get an overview of the most common tag-classes see
the default value of the option @code{ecb-show-tags}.
With the option @code{ecb-show-tags} you can now specify how ECB
should display tags of a certain tag-class in a certain major-mode.
You can tell ECB that all tags of a tag-class @code{X} should be
displayed in an expanded bucket and all tags of a tag-class @code{Y}
should be displayed in a collapsed bucket and all tags of a tag-class
@code{Z} should be displayed flattened (means not contained in a
expandable/collapsable bucket-node). These settings can be made
separately for each major-mode but you can also define a
default-display which takes effect when for a major-mode no special
setting can be found in @code{ecb-show-tags}.
For every tag-class you can tell ECB how the tags should be sorted.
@item ecb-font-lock-tags
@itemx ecb-type-tag-display
How to fontify the tags in the Method-buffer
@item ecb-tag-display-function
ECB and semantic offer several predefined functions for displaying the
tags. Here you can customize, what informations tags should
contain (only the method-name or the whole signature or something
else) and what notation should be used, e.g. UML or not.
@end table
These are the most important options for this topic but it is
recommended to have a look into the customize-group @code{ecb-methods}
(@pxref{ecb-methods}) and check all the options offered there!
All these options are only relevant for semantic-sources and take no
effect for non-semantic-sources!
@node Rebuilding the Methods, , Customizing the display, The Methods buffer
@subsection Rebuilding the Methods-buffer
In almost all cases there is @strong{NO} need to manually rebuild the
method-buffer, because it is always done automatically if necessary;
the mechanism depends on the sources:
@itemize @minus
@item semantic-sources:
The command @code{global-semantic-auto-parse-mode} switches on autom.
reparsing of semantic-sources.
@item non-semantic-sources (imenu supported):
You can switch on autom. rescanning/reparsing with the option
@code{imenu-auto-rescan}. But nevertheless you have to manually
rebuild the Method-buffer (with the autom. updated imenu-tags) via the
command @code{ecb-rebuild-methods-buffer} (bound to @kbd{C-c . r}).
@item non-semantic-sources (etags supported):
For these sources there is no built-in auto-rescan mechanism, because
etags is an external tool it can only operate on the saved
file-contents. So rescanning the buffer contents would need to save
the buffer before. Therefore there is no built-in auto-rescan mechanism
because this would always result in saving the buffer and running an
external tool. But of course you can program such a an
etags-auto-rescan mechanism for yourself!
@end itemize
Besides for etags-supported non-semantic-sources there exist a few rare
scenarios also for the other sources where a complete manual rebuild
can be necessary. Here is one example:
Depending on the semantic-version: If an Elisp-file is parsed which
contains a defun X in the middle where the closing ) is missing, then
semantic parses only until this defun X is reached and you will get an
incomplete ECB-method buffer. In such a case you must complete the
defun X and then completely reparse the Elisp-file and rebuild the ECB
method buffer!
A complete manually rebuild is done by
@code{ecb-rebuild-methods-buffer}. For etags-parsed
non-semantic-sources this causes an automatic saving of the
source-buffer because otherwise etags would not operate with the
latest contents!
@node Filtering the tree-buffers, The ECB-layout, The Methods buffer, Usage of ECB
@section Applying filters to the special ECB-tree-buffers
@cindex Filter
To get a fast and good overlook of the contents of a tree-buffer ECB
offers a filter-mechanism for the Directories-, Sources-, the History-
and the Methods-buffer.
@menu
* 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
@end menu
@node Filtering Directories, Filtering Sources, Filtering the tree-buffers, Filtering the tree-buffers
@subsection Applying filters to the Directories-buffer
With the option @code{ecb-excluded-directories-regexps} certain
directories can be excluded from being displayed in the
directories-browser of ECB. This can be done by defining regular
expressions. If the name of a directory matches at least one of the
regexps of this option the directory is not displayed in the
directories-tree-buffer.
The option @code{ecb-sources-exclude-cvsignore} allows to exclude
source-files from the sources-tree-buffer if their name is listed in a
so called @file{.cvsignore}-file. This option is a list of regular
expressions and if a directory-name matches at least one of these
regexps then all files listed in the @file{.cvsignore}-file of this
directory are not displayed in the sources-tree-buffer.
@node Filtering Sources, Filtering History, Filtering Directories, Filtering the tree-buffers
@subsection Applying filters to the Sources-buffer
@subsubsection Interactive Sources-filters
The command @code{ecb-sources-filter} allows to filter these
tree-buffer either by a regular expression or by an extension (e.g.
java, cc, el for java-, c++- rsp elisp-sources). This functionality is
also available via the popup-menu of the Sources-tree-buffer.
The currently applied filter is indicated in the modeline of the
related tree-buffer. Applying a new filter replaces an eventually
already applied filter.
@subsubsection Default Sources-filters
The option @code{ecb-source-file-regexps} allow to specify which
source-files should be displayed and which not. This is done on a
directory-basis, ie. for each directory-regexp the files to display
can be specified. See the documentation of this option for all
details.
In addition to this option you should also know the option
@code{ecb-sources-exclude-cvsignore} (@pxref{Filtering Directories}).
@node Filtering History, Filtering Methods, Filtering Sources, Filtering the tree-buffers
@subsection Applying filters to the History-buffer
@subsubsection Interactive History-filters
The command @code{ecb-history-filter} allows to filter these
tree-buffer either by a regular expression or by an extension (e.g.
java, cc, el for java-, c++- rsp elisp-sources). This functionality is
also available via the popup-menu of the History-tree-buffer.
The currently applied filter is indicated in the modeline of the
related tree-buffer. Applying a new filter replaces an eventually
already applied filter.
@subsubsection Default History-filters
The option @code{ecb-history-exclude-file-regexps} allows to exclude
source-files from being historized (ie. displayed in the
History-buffer). Despite the fact that the History-buffer already
excludes all non-file-buffers there can be still buffers which name
you do not wat to be displayed in the history. These are file-buffer
like @file{TAGS} or @file{semantic.cache} which store
meta-informations used by Emacs and its tools (etags, semantic etc.).
These files can be excluded via
@code{ecb-history-exclude-file-regexps}.
@node Filtering Methods, , Filtering History, Filtering the tree-buffers
@subsection Applying filters to the Methods-buffer
The commands @code{ecb-methods-filter},
@code{ecb-methods-filter-regexp},
@code{ecb-methods-filter-protection},
@code{ecb-methods-filter-tagclass},
@code{ecb-methods-filter-function},
@code{ecb-methods-filter-delete-last},
@code{ecb-methods-filter-nofilter} allows to filter the tags/nodes of
the Methods-buffer by several criterias. As for the Sources- and the
History-buffer the same functionality is also available via the
popup-menu of the Methods-buffer.
@subsubsection Possible filter-criterias
@itemize @bullet
@item Filter by protection:
Just insert the protection you want the Methods-buffer being filtered:
private, protected or public! For sources not supported by semantic
the protection filter will not be offered because these informations
are not available for such sources.
@item Filter by regexp:
Insert the filter as regular expression.
@item Filter by tag-class:
You can filter by tag-classes. The popup-menu contains mode-dependend
tag-filter entries and the command @code{ecb-methods-filter} offers
only the tag-classes of the current mode. This means for sources not
supported by semantic the tag-class filter will not be offered. And
for semantic-supported sources exactly these tag-classes are offered
the semantic-parser for the current major-mode offers. For example
texi-sources can only be filtered by the tag-classes ``Definitions''
and ``Sections'' and java-sources can be filtered by ``Methods'',
``Variables'', ``Classes'' etc. In general the semantic-variable
@code{semantic-symbol->name-assoc-list} is used to get the right
tag-classes.
@item Filter by a filter-function:
Such a function gets two arguments: a tag and the source-buffer of
this tag. If the tag should be displayed (i.e. not being filtered out)
then the function has to return not nil otherwise nil.
@item No special filter:
This means to display all tags specified with the option
@code{ecb-show-tokens}. If currently some of the above filters are
applied they will be all removed.
@item Delete the last added:
This removes only the topmost filter-layer, means that filter added
last.
@end itemize
Be aware that the tag-list specified by the option
@code{ecb-show-tags} is the basis of all filters, i.e. tags which are
excluded by that option will never be shown regardless of the filter
type here!
All tags which match the applied filter(s) will be displayed in the
Methods-buffer. Such a filter is only applied to the current
source-buffer, i.e. each source-buffer can have its own tag-filters.
These tag-filters can also applied to sources which are not supported
by the semantic-parser but ``only'' by imenu or etags. But because for
these sources not all information are avaiable the protection- and
tag-class filter are not offered with such ``non-semantic''-sources.
See @ref{Non-semantic sources} for further details about working with
source-files not supported by the semantic-parser.
@subsubsection Inverse Filters
But if @code{ecb-methods-filter} is called with a prefix-argument then
an inverse filter is applied to the Methods-buffer, i.e. all tags
which do @strong{NOT} match the choosen filter will be displayed in
the Methods-buffer!
@subsubsection Layered filters
Per default the choosen filter will be applied on top of already
existing filters. This means that filters applied before are combined
with the new filter. This behavior can changed via the option
@code{ecb-methods-filter-replace-existing}.
@subsubsection Display of currently applied filters
The current active filter will be displayed in the modeline of the
Methods-buffer [regexp, prot (= protection), tag-class, function (=
filter-function)]. If an inverse filter has been applied then this is
signalized by a preceding caret ^. If currently more than 1 filter is
applied then always the top-most filter is displayed in the modeline
but the fact of more than 1 filter is visualized by the number of the
filters - included in parens. You can see all currently applied
filters by moving the mouse over the filter-string in modeline of the
Methods-buffer: They will displayed as help-echo.
@subsubsection Default filters for certain files.
The new option @code{ecb-default-tag-filter} allow to define default
tag-filters for certain files which are applied automatically after
loading such a file into a buffer. The possible filters are the same
as offered by the command @code{ecb-methods-filter} and they are
applied in the same manner - the only difference is they are applied
automatically. The files can be specified on a combined major-mode-
and filename-regexp-basis.
Usage-example: This can be used to display in outline-mode files (e.g.
@file{NEWS}) only the level-1-headings by defining a filter regexp
``^\* .*''.
@node The ECB-layout, Hiding the ECB windows, Filtering the tree-buffers, Usage of ECB
@section Changing, customizing, redrawing and creating layouts
@cindex layout
@cindex ECB-layout
The term @dfn{ECB-layout} means in which windows the ECB-frame is
divided. This chapter describes all aspects concerning this layout,
especially changing, customizing, redrawing and also creating new
layouts.
@menu
* 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
@end menu
@node Changing the ECB-layout, Redrawing the ECB-layout, The ECB-layout, The ECB-layout
@subsection Changing and customizing the ECB-layout
ECB offers several predefined layouts with different sets and also
different locations of ECB-windows. See below the ``ascii-screenshot''
of all currently built-in layouts@footnote{The command
@code{ecb-show-layout-help'} shows the outline-picture for all built-in
layouts.}.
In addition to these predefined layouts you can either interactively
create new layouts ``by example'' (@pxref{Creating a new ECB-layout})
or program new layouts with the macro @code{ecb-layout-define}
(@pxref{The layout-engine}). The former method is the recommended
one!
There are two ways to interactively change the layout:
@itemize @bullet
@item Changing permanently:
Customize the option @code{ecb-layout-name} and store it for future
Emacs sessions.
@item Switching between several layouts at runtime:
If you want to switch fast between a certain sequence of layouts see
the option @code{ecb-toggle-layout-sequence} and the command
@code{ecb-toggle-layout} (@pxref{Simulating speedbar}). For just
selecting another layout during current Emacs-session use the command
@code{ecb-change-layout}.
@end itemize
With the option @code{ecb-show-sources-in-directories-buffer} you can
define if sources are displayed in the directory-window of a layout
(@pxref{ECB Directories-buffer}).
In addition to the general layout you can specify if the layout should
contain a persistent compilation-window at the bottom of the frame, see
@code{ecb-compile-window-height} (@pxref{Temp- and compile-buffers}).
Maybe you want also change the look&feel of the tree-buffers. Then you
can change the general style of the tree-buffers with the option
@code{ecb-tree-buffer-style} and the location of the collapse- and
expand-symbols and the indentation of sub-nodes in a tree. See
@code{ecb-tree-indent} and @code{ecb-tree-expand-symbol-before}. More
details about the different tree-buffer-styles are described in
@ref{Tree-buffer styles}.
Here are all currently available layouts (for creating own new layouts
see @ref{Creating a new ECB-layout}); just customize the option
@code{ecb-layout-name} to the related name:
@table @asis
@item Layout ``left1''
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
| | |
| | |
|--------------| |
| | | |
| Sour | Hist | Edit |
| | | |
| | | |
|--------------| |
| | |
| Methods | |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left2''
@example
@group
-------------------------------------------------------
| | |
| | |
| | |
| Directories | |
| | |
| | |
| | |
|--------------| Edit |
| | |
| | |
| | |
| Sources | |
| | |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left3''
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
| | |
| | |
|--------------| |
| | |
| Sources | Edit |
| | |
| | |
|--------------| |
| | |
| Methods | |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left4''
@example
@group
-------------------------------------------------------
| | |
| | |
| | |
| Directories | |
| | |
| | |
| | |
|--------------| Edit |
| | | |
| | | |
| | | |
| Sour | Hist | |
| | | |
| | | |
| | | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left5''
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
| | |
| | |
|--------------| |
| | |
| Sources | Edit |
| | |
| | |
|--------------| |
| | |
| History | |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``right1''
@example
@group
-------------------------------------------------------
| | |
| | Directories |
| | |
| | |
| |--------------|
| | |
| | |
| Edit | Sources |
| | |
| | |
| |--------------|
| | |
| | Methods |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left6''
@example
@group
-------------------------------------------------------
| Sources | |
|--------------| |
| | |
| | |
| | |
| Methods | Edit |
| | |
| | |
| | |
|--------------| |
| History | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``top1''
@example
@group
-------------------------------------------------------
| | | |
| | | |
| Directories | Sources | Methods |
| | | |
| | | |
|-----------------------------------------------------|
| |
| |
| |
| |
| Edit |
| |
| |
| |
| |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left7''
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
| | |
| | |
| | |
| | |
|--------------| Edit |
| | |
| History | |
| | |
|--------------| |
| | |
| Methods | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left8''
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
|--------------| |
| | |
| Sources | |
| | |
|--------------| Edit |
| | |
| Methods | |
| | |
| | |
|--------------| |
| History | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``top2''
@example
@group
-------------------------------------------------------
| |
| |
| Methods |
| |
| |
|-----------------------------------------------------|
| |
| |
| |
| |
| Edit |
| |
| |
| |
| |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left9''
@example
@group
-------------------------------------------------------
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| Methods | Edit |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left10''
@example
@group
-------------------------------------------------------
| | |
| | |
| | |
| Methods | Edit |
| | |
| | |
| | |
| | |
| | |
|--------------| |
| | | |
| Sou | Hist | |
| | | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left11''
@example
@group
-------------------------------------------------------
| | |
| | |
| | |
| Methods | Edit |
| | |
| | |
| | |
| | |
| | |
|--------------| |
| | |
| History | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left12''
@example
@group
-------------------------------------------------------
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| History | Edit |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left13''
@example
@group
-------------------------------------------------------
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| Directories | Edit |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left14''
@example
@group
-------------------------------------------------------
| | |
| | |
| | |
| Directories | Edit |
| | |
| | |
| | |
| | |
| | |
|--------------| |
| | |
| History | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left15''
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
| | |
| | |
| | |
| | |
|--------------| Edit |
| | |
| | |
| | |
| Methods | |
| | |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``leftright1''
@example
@group
-------------------------------------------------------
| | | |
| Directories | | Methods |
| | | |
| | | |
| | | |
| | | |
| | | |
|-------------| Edit | |
| | | |
| Sources | | |
| | | |
|-------------| | |
| | | |
| History | | |
| | | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``leftright2''
@example
@group
-------------------------------------------------------
| | | |
| Directories | | Methods |
| | | |
| | | |
| | | |
| | | |
| | | |
| | Edit | |
|-------------| |-------------|
| | | |
| Sources | | History |
| | | |
| | | |
| | | |
| | | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``leftright3''
@example
@group
-------------------------------------------------------
| | | |
| Directories | | Methods |
| | | |
| | | |
| | | |
| | | |
| | | |
| | Edit | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left-dir-plus-speedbar''
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
| | |
| | |
| | |
| | |
|-------------| |
| | |
| | |
| | |
| Speedbar | |
| | |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left-analyse''
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
|--------------| |
| | |
| Sources | |
| | |
|--------------| Edit |
| | |
| Methods | |
| | |
|--------------| |
| | |
| Analyse | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@item Layout ``left-symboldef''
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
|--------------| |
| | |
| Sources | |
| | |
|--------------| Edit |
| | |
| Methods | |
| | |
|--------------| |
| | |
| Symbol-defs | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@end table
@node Redrawing the ECB-layout, Changing window sizes, Changing the ECB-layout, The ECB-layout
@subsection Redrawing the ECB-layout
@cindex Redraw
If you have unintentionally destroyed the ECB-layout, you can always
restore the layout with calling @code{ecb-redraw-layout}. This is even
true, if you get messages like ``wrong-type-argument window-live-p
#<window 222>''.
If the variable @code{ecb-redraw-layout-quickly} is not nil then the redraw
is done by the @code{ecb-redraw-layout-quickly} function, otherwise by
@code{ecb-redraw-layout-full}. But it's strongly recommended to use the
quick redraw only if you have really slow machines where a full redraw
takes several seconds because the quick redraw is not really safe and
may have some drawbacks! On normal machines the full redraw should be
done in << 1s!
Please read the documentation of the command @code{ecb-redraw-layout}!
See also the hooks @code{ecb-redraw-layout-after-hook} and
@code{ecb-redraw-layout-before-hook}!
@node Changing window sizes, Fixing window sizes, Redrawing the ECB-layout, The ECB-layout
@subsection Changing the sizes of the special ECB-windows
The standard width and height of the special ECB-windows is defined
with the options @code{ecb-windows-width} and
@code{ecb-windows-height}. But changing these options always
influences all layouts which is not always desired.
ECB offers to re-adjust the width and height of the ECB-windows (e.g. by
dragging the windows-borders via the mouse) and then saving exactly
these current window-sizes for the current layout so after activating
this layout all windows have autom. the stored sizes.
This is done via the option @code{ecb-layout-window-sizes} and the
commands @code{ecb-store-window-sizes},
@code{ecb-restore-window-sizes} and
@code{ecb-restore-default-window-sizes}.
Here is an example how to resize and store the sizes of the
ECB-windows of layout ``left1'':
@enumerate
@item
Switch to layout ``left1'' via @code{ecb-change-layout} (@kbd{C-c . lc})
@item
Resize the ECB-windows by dragging the window-borders with the mouse
@item
Call @code{ecb-store-window-sizes}
@end enumerate
After this layout ``left1'' will be always drawn with the new sizes
until you call @code{ecb-restore-default-window-sizes} during layout
``left1'' is active.
@strong{Please note}: @code{ecb-store-window-sizes} stores the width
and height of the windows per default as fractions of the width (rsp.
height) of the ECB-frame, so the stored sizes are always correct
regardless of the current frame-size! But if called with a prefix
argument then fixed sizes are stored.
@node Fixing window sizes, Creating a new ECB-layout, Changing window sizes, The ECB-layout
@subsection Fixing the sizes of the special ECB-windows
GNU Emacs 21 introduced a new feature which can fix the sizes of a
window displaying a certain buffer even after resizing the frame. This
new feature is driven by the new buffer-local variable
@code{window-size-fixed}.
ECB offers an option @code{ecb-fix-window-size} for fixing the sizes
of the special ECB-windows/buffers even after frame-resizing. The fix
type (valid values are @code{nil}, @code{t}, @code{width} and
@code{height}) can either be set on a layout-basis (means a different
value for each layout) or one value can be set for all layouts. In the
latter case there is an additional value @code{auto} which choose
autom. the senseful fix-type depending on the current layout-type: For
top-layouts the fix-type @code{height} and for all other layout-types
the fix-type @code{width}.
Probably the most senseful value is @code{auto} for all layouts
because it makes less sense to fix the height of the ecb-windows in a
left-, right- or leftright-layout. Same for fixing the width in a
top-layout.
Note: With current Emacs 21.2.X there seems to be no distinction
between @code{width}, @code{height} and @code{t}. Therefore this
option takes no effect (means all ecb-windows have always unfixed
sizes) if @code{ecb-compile-window-height} is not @code{nil}.
@node Creating a new ECB-layout, , Fixing window sizes, The ECB-layout
@subsection Interactively creating new layouts
@cindex New layouts
@cindex Creating new layouts
If you want to create your own ECB-layout then you can do this very
easy ``by example'' with the command @code{ecb-create-new-layout}.
This command creates a new empty frame and offers a small set of keys
to create the new layout by splitting windows.
@code{ecb-create-new-layout} and this couple of keys are your guide
during the layout-creation-process@footnote{During the creation
process you will be asked in the minibuffer for several options; here
you can use TAB-completion and an ``empty'' RET chooses always the
first option!}.
After calling @code{ecb-create-new-layout} you will be asked which
type of layout you want to create: ``left'', ``right'', ``top'' or
``left-right''. Here you specify where the ECB-tree-windows/buffers
should be located in the ECB-frame:
@itemize @minus
@item left: All ECB-tree-windows are located on the left side
@item right: All ECB-tree-windows are located on the right side
@item top: All ECB-tree-windows are located on the top side
@item left-right: All ECB-tree-windows are located on the left and
right side
@end itemize
Depending on the type you choose the window is splitted by the values
of the options @code{ecb-windows-width} (types ``left'', ``right'' and
``left-right'') or @code{ecb-windows-height} (type ``top'').
Afterwards you will see a frame like follows (here the layout-type is
``left-right''):
@example
@group
-----------------------------------------------------------------
|<point> | | |
| | ECB-layout creation mode | |
| | ======================== | |
| | | |
| | <This is a persistent help-screen>| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
-----------------------------------------------------------------
|
| ,---
`---| Splitted by the value of @code{ecb-windows-width}.
`---
@end group
@end example
The big window (here the middle window) will be the edit-area of the
new layout and can not be selected, deleted or splitted during the
creation process. It displays the help-screen for the layout-creation
mode. Here all the available commands are displayed.
The small window(s) (here the left and right windows) can be splitted
by you wherever you want (@kbd{C-s}). The left one contains the point.
You must give every ECB-tree-window you create a type (@kbd{C-t})
which can be either
@itemize @bullet
@item One of the built-in types
This can be either ``directories'', ``sources'', ``methods'',
``history'' or ``speedbar''.
@item Any user-defined type:
In this case you insert ``other'' after hitting @kbd{C-t} and you will
then be asked for the name of the user-defined type. You can insert
any arbitrary type name X. But to get this layout working you have to
define a function with name @code{ecb-set-X-buffer} whereas X is the
name of the user-defined type you have specified during
layout-creation.
This function @code{ecb-set-X-buffer} must be defined with the macro
@code{defecb-window-dedicator} and has to switch to the buffer you
want to display in this window. This macro automatically ensures that
this window is dedicated to that buffer.
Here is an example: Suppose you have inserted as type name ``example''
then you have to define and load a function
@code{ecb-set-example-buffer} which could be defined like follows:
@example
(defecb-window-dedicator ecb-set-example-buffer " *ECB example-buf*"
(switch-to-buffer (get-buffer-create " *ECB example-buf*")))
@end example
If you forget to define such a function for the user-defined type then
nevertheless ECB will draw this layout but it will use the
default-function @code{ecb-set-default-ecb-buffer} instead.
@end itemize
If you are satisfied with your new layout just hit @kbd{C-q}. You will
be asked for a new layout-name (TAB-completion is offered to get a
list of all names already in use) and after inserting a new(!) name
the new layout is saved in the file defined by the option
@code{ecb-create-layout-file}. The new layout is now available via the
option @code{ecb-layout-name}.
There is no need for you to load the file
@code{ecb-create-layout-file} manually into your Emacs because it's
automatically loaded by ECB!
@strong{Please note}: During the layout-creation process only the
commands displayed in the help-screen are available. ALL other
commands are temporally disabled (even the mouse-commands).
For programming new layouts with emacs-lisp see @ref{The layout-engine}.
With the command @code{ecb-delete-new-layout} you can delete
previously created layouts (TAB-completion is offered for all names of
user created layouts).
@node Hiding the ECB windows, Maximizing the ECB windows, The ECB-layout, Usage of ECB
@section Hiding/Showing the ECB windows
@cindex Hide windows
@cindex Show windows
With @code{ecb-toggle-ecb-windows}, @code{ecb-hide-ecb-windows} and
@code{ecb-show-ecb-windows} you can hide/show all the ECB windows
without changing the activation state of ECB and also without
deactivating the advices for @code{delete-other-windows} and/or
@code{delete-window}. This is most useful if you use a layout like
``top2'' (@pxref{Tips and tricks}) or if you want to have maximum space
for editing and you don't need the browsing windows all the time.
The following sequence of hooks is evaluated during showing again the
hidden ECB-windows:
@enumerate
@item @code{ecb-show-ecb-windows-before-hook}
@item @code{ecb-redraw-layout-before-hook}
@item <Redrawing the layout to show the hidden ECB-windows>
@item @code{ecb-redraw-layout-after-hook}
@item @code{ecb-show-ecb-windows-after-hook}
@end enumerate
The following sequence of hooks is evaluated during hiding the
ECB-windows:
@enumerate
@item @code{ecb-hide-ecb-windows-before-hook}
@item @code{ecb-redraw-layout-before-hook}
@item <Hiding the ECB-windows>
@item @code{ecb-redraw-layout-after-hook}
@item @code{ecb-hide-ecb-windows-after-hook}
@end enumerate
If the special ECB-windows are hidden (e.g. by
`ecb-toggle-ecb-windows') all adviced functions behave as their
originals. So the frame can be used as if ECB would not be active but
ECB IS still active in the ``background'' and all ECB-commands and all
ECB-keybindings can be used. Of course some of them doesn't make much
sense but nevertheless they can be called. Toggling the visibility of
the ECB-windows preserves the splitting-state of the edit-area: If you
hide the ECB-windows then the frame will be divided in the same
window-layout the edit-area had before the hiding and if you show the
ECB-windows again the edit-area will be divided into all the
edit-windows the ECB-frame had before the showing.
Therefore it should be enough to hide the ECB-windows to run other
Emacs-applications which have their own window-layout-managing. There
should be no conflicts. But nevertheless the most recommended method
for running ECB and other applications (e.g. xrefactory, Gnus etc.) in
the same frame is to use a window-manager like winring.el or
escreen.el (@pxref{Window-managers and ECB}).
@node Maximizing the ECB windows, Back/forward navigation, Hiding the ECB windows, Usage of ECB
@section Maximizing the ECB windows
@subsection How to maximize and minimize special ecb-tree-windows
To get a better overlook about the contents of a certain ECB-window
every ECB-window can be ``maximized'', means all other ECB-windows are
deleted so only the edit-window(s) and this maximized ECB-window are
visible (and maybe a compile-window if active). There are several ways
to do this:
@itemize @bullet
@item
Via the node-popup-menus of the ECB-windows
@item
Via the main ``ECB''-menu and here ``Display window maximized''
@item
Via calling the adviced version of
@code{delete-other-windows}@footnote{This command is adviced per
default, see @ref{The edit-area}.} (bound to @kbd{C-x 1}) in one of
the ECB windows.
@item
Via one of the commands @code{ecb-maximize-window-directories},
@code{ecb-maximize-window-sources}, @code{ecb-maximize-window-methods},
@code{ecb-maximize-window-history} or
@code{ecb-maximize-window-speedbar} or the bound short-cuts for those
commands.
@item
Via the new command @code{ecb-cycle-maximized-ecb-buffers} which
cycles through all ecb-buffers of current layout by maximizing exactly
one of the ecb-windows after every cycle-step.
@item
Via the option @code{ecb-maximize-ecb-window-after-selection} and then
just by selecting an ECB-window. ``Deselecting'' an ECB-window brings
back all ECB-windows of current layout.
@item
Via the default modeline-mechanisms for deleting other windows. GNU
Emacs binds @kbd{mouse-2} in its modeline to
@code{delete-other-window}. XEmacs binds a popup-menu with some window
commands to @kbd{button-3} in its modeline.
ECB combines the best of both worlds by supporting both of these
mechanisms for both Xemacs and Emacs: ECB binds a toggle-command to
@kbd{mouse-2} in the modeline of each tree-buffer which maximizes the
current tree-window if all ECB-windows are visible and displays all
ECB-windows if current tree-window is maximized. In addition ECB binds
a popup-menu to @kbd{mouse-3} which offers exactly 2 commands:
Maximizing current tree-window and displaying all ECB-windows.
@end itemize
``Minimizing'' such a maximized ECB-window, i.e. bringing back to its
original size and displays all ecb-windows of current layout, can
simply be done by redrawing the layout via the command
@code{ecb-redraw-layout} (bound to @kbd{C-c . lr}).
@subsection Selecting a node in a maximized ecb-tree-window
When you select a node (either via mouse or RET) in a maximized
tree-window the default behavior of ECB is the following:
Maximized directories-window: When selecting a directory then first
automatically the maximized directories-window will be ``minimized''
(i.e. all ecb-windows of current layout are displayed) if the current
layout contains a sources-buffer and no sources are shown in the
directories-window - see @code{ecb-show-sources-in-directories-buffer}.
So the source-files can be displayed in the sources-window.
Maximized sources- or history-window: When selecting a source-file in
one of these buffers then first automatically the maximized window
will be ``minimized'' (i.e. all ecb-windows of current layout are
displayed) if the current layout contains a methods-buffer. So the
tag-contents of the selected source-file can be displayed in the
methods-window.
For a even smarter behavior ECB offers the option
@code{ecb-maximize-next-after-maximized-select} which automatically
maximizes the next logical tree-window after a node selection. The
definition of ``next logical is'': Directories --> sources,
sources/history --> methods. But if the current maximized tree-buffer
is also contained in the option
@code{ecb-tree-do-not-leave-window-after-select} (see also the
tree-buffer-command @code{ecb-toggle-do-not-leave-window-after-select}
which is bound to @key{C-t} in each tree-buffer) then ECB does *not*
maximize the next logical tree-window but point stays in the currently
maximized tree-buffer so for example the user can select more than one
source-file from the sources-buffer.
@node Back/forward navigation, ECB-window synchronizing, Maximizing the ECB windows, Usage of ECB
@section Back- and forward navigation like a browser
With ECB you can ``browse'' in your source-files like with a
web-browser. This means ECB stores the current buffer- and
window-position relative to the current tag@footnote{e.g. a method,
a variable or any other semantic tag} in the edit-window after
@itemize @minus
@item selecting a tag in the ECB-methods buffer or
@item selecting a source-file in the ECB-sources/history-buffer.
@end itemize
ECB offers two commands @code{ecb-nav-goto-next} (@kbd{C-c . n}) and
@code{ecb-nav-goto-previous} (@kbd{C-c . p}) to go forward and
backward within this navigation history-list. These commands are also
available via the menu ``ECB --> Navigate''.
Aside normal ``location-browsing'' this is useful for example in a
scenario where the buffer is narrowed to a tag (see
@code{ecb-tag-visit-post-actions}):
@enumerate
@item You edit a function
@item Goto another function above the current in the same file
@item Add a few lines
@item Call ecb-nav-goto-previous
Now you will edit at the same place in the function.
@end enumerate
@node ECB-window synchronizing, Stealthy background tasks, Back/forward navigation, Usage of ECB
@section Synchronization of the ECB-windows
Per default ECB synchronizes automatically the contents of the
ECB-windows/tree-buffers with the current active edit-window (rsp. the
current buffer of the edit window):
@itemize @bullet
@item ECB-directories:
This windows is synchronized to display the directory where the
source-file which is displayed in the current active edit-window is
located. If the source-path (i.e. an element of the option
@code{ecb-source-path}) containing this directory is not expanded it
will be auto. expanded according to the value of the option
@code{ecb-auto-expand-directory-tree} (@pxref{ecb-directories}).
@item ECB-sources:
The ECB-sources-buffer contains after synchronizing all the sources of
the directory of the ``current'' source-file displayed in the
edit-window. The entry of the ``current'' source-file is highlighted.
@item ECB-methods:
Contains after synchronizing all the tags of the buffer in the current
selected edit-window, i.e. all methods, variables etc... depending on
the major-mode.
@item ECB-history:
Highlights the entry of the buffer displayed in the current active
edit-window if this buffer is a source-file.
@end itemize
This feature can be customized with the option @code{ecb-window-sync}:
If active then the synchronization takes place whenever a buffer
changes in an edit window or if another edit-window with another
buffer will be selected, if deactivated then never. But you can also
set this option to a list of major-modes and then the sync. will only
be done if the major-mode of the current buffer does NOT belong to
this list.
But in every case the synchronization only takes place if the
major-mode of the current-buffer in the current selected edit-window
has a relation to files or directories. Examples for the former one
are all programming-language-modes like @code{c++-mode} or
@code{java-mode}, @code{Info-mode} too, an example for the latter one
is @code{dired-mode}. For all major-modes related to
non-file/directory-buffers like @code{help-mode},
@code{customize-mode} and others a synchronization will never be done!
It's recommended to exclude at least @code{Info-mode} because it makes
no sense to synchronize the ECB-windows after calling the Info help.
Per default also @code{dired-mode} is excluded but it can also making
sense to synchronize the ECB-directories/sources windows with the
current directory of the dired-buffer in the edit-window.
If you often need to toggle between autom. synchronization on and off
then customizing the option @code{ecb-window-sync} is inefficient and
therefore ECB offers the command @code{ecb-toggle-window-sync}.
@strong{Please note}: With the command @code{ecb-window-sync} you can
do a manual synchronization if the automatic one is switched off or
if you just want to do this!
@node Stealthy background tasks, Interactive ECB commands, ECB-window synchronizing, Usage of ECB
@section Stealthy background-tasks of ECB
ECB performs some tasks stealthily in the background and also
interruptable by the user because these tasks can be time-consuming
and could otherwise block ECB. Currently the following tasks are
performed stealthily and in the background by ECB:
@table @asis
@item Prescann directories for emptyness
Prescann directories and display them as empty or not-empty in the
directories-buffer. See the documentation of the option
@code{ecb-prescan-directories-for-emptyness} for a description.
@item File is read only
Check if sourcefile-items of the directories- or sources-buffer are
read-only or not. See documentation of the option
@code{ecb-sources-perform-read-only-check}.
@item Version-control-state
Checks the version-control-state of files in directories which are
managed by a VC-backend. See the option @code{ecb-vc-enable-support}.
@end table
All of these tasks (e.g. checking if a directory is empty or not)
perform a certain action for all directories or sources displayed in
the current visible tree-buffers of ECB. Normally there should be no
annoying delay for the user because each of these tasks will be only
performed when Emacs is idle and will be interrupted immediatelly when
a user hits a key or clicks the mouse but especially for
remote-directories one single action (e.g. checking if a certain
directory is empty or checking the VC-state of a sourcefile in such a
remote directory) can be very time-consuming and such a single action
is not interruptable (an interrupt can only occur between the
single-actions for two directories or sources) For a further
discussion how to deal best with remote directories see @ref{Remote
directories}.!
ECB offers for all stealthy tasks three steps of activation:
@itemize @bullet
@item @code{t}:
Switch on this feature.
@item @code{unless-remote}:
Switch on this feature but not for remote directories. The term
``remote'' means here directories which are used via tramp, ange-ftp
or efs. So mounted directories are counted not as remote directories
here even if such a directory is maybe hosted on a remote machine. But
normally only directories in a LAN are mounted so there should be no
performance-problems with such mounted directories.
@item @code{nil}:
Switch off this feature completely.
@end itemize
In combination with the option @code{ecb-stealthy-tasks-delay} these
three choices already allow adapting the stealthy tasks to most
needs. But to offer finest granularity for which directories a certain
stealthy task should be switched on and for which not ECB offers for
every stealthy task an additional option which allows a finer
adjustment:
@itemize @bullet
@item Prescanning directories for emptyness:
@code{ecb-prescan-directories-exclude-regexps}.
@item Checking the read-only-state of a sourcefile:
@code{ecb-read-only-check-exclude-regexps}
@item Checking the VC-state of sourcefiles:
@code{ecb-vc-directory-exclude-regexps}
@end itemize
These options take only effect when the related task is not completely
switched off. If this is the case they allow excluding certain
directories (or the sources of directories) from being processed by a
certain stealthy task.
@node Interactive ECB commands, ,Stealthy background tasks, Usage of ECB
@section Interactive ECB commands
@noindent
ECB offers a lot of interactive commands. Some of these commands
prompt the user in the minibuffer if called with a prefix argument.
Example: If @code{ecb-clear-history} is called with a prefix argument
then you will be prompted in the minibuffer with:
@example
Clear from history: [all, not-existing-buffers, existing-buffers]
@end example
You can choose one of the options enclosed in brackets with
TAB-completion; hitting RET direct after the prompt chooses auto. the
first offered option (in the example above ``all'').
@strong{Please note}: The following interactive commands of ECB are
listed without the prefix ``ecb-'' (e.g. the command
@code{ecb-activate} is listed with name ``activate''). This has been
done for a better readable command index. @xref{Command Index}.
@deffn Command activate
Activates ECB and creates the special buffers for the choosen layout.
For the layout see @code{ecb-layout-name}. This function always raises
the ECB-frame if called from another frame. This is the same as
calling @code{ecb-minor-mode} with a positive argument.
@end deffn
@deffn Command add-all-buffers-to-history
Add all current file-buffers to the history-buffer of ECB. Dependend
on the value of @code{ecb-history-sort-method} afterwards the history
is sorted either by name or by extension. If
@code{ecb-history-sort-method} is nil the most recently used buffers
are on the top of the history and the seldom used buffers at the
bottom.
@end deffn
@deffn Command analyse-buffer-sync
Synchronize the analyse buffer with the current buffer and point. This
means in fact display the current analysis for current point.
@end deffn
@deffn Command change-layout &optional preselect-type
Select a layout-name from all current available layouts
(TAB-completion is offered) and change the layout to the selected
layout-name. If optional argument PRESELECT-TYPE is not nil then you
can preselect a layout-type \(TAB-completion is offered too) and then
you will be asked only for layouts of that preselected type. Note:
This function works by changing the option @code{ecb-layout-name} but
only for current Emacs-session.
@end deffn
@deffn Command clear-history
Clears the history-buffer.
@end deffn
@deffn Command customize
Open a customize-buffer for all customize-groups of ECB.
@end deffn
@deffn Command customize-most-important
Open a customize-buffer for the most important options of ECB.
@end deffn
@deffn Command create-new-layout
Start process for interactively creating a new ECB-layout
(@pxref{Creating a new ECB-layout}).
@end deffn
@deffn Command cycle-maximized-ecb-buffers
Cycles through all ecb-buffers of current layout by maximizing exactly
one of the ecb-windows after every cycle-step.
@end deffn
@deffn Command cycle-through-compilation-buffers &optional choose-buffer
Cycle through all compilation buffers currently open and display them
within the compilation window @code{ecb-compile-window}. If the
currently opened buffer within the compilation window is not a
compilation buffer, we jump to the first compilation buffer. If not we
try to loop through all compilation buffers. If we hit the end we go
back to the beginning.
If @var{CHOOSE-BUFFER} is not @code{nil} then the user will be
prompted for the compilation-buffer to switch to.
@end deffn
@deffn Command deactivate
Deactivates the ECB and kills all ECB buffers and windows.
@end deffn
@deffn Command delete-new-layout
Select a layout-name for a layout created by
@code{ecb-create-new-layout} and delete this layout. This means the
layout-definition is removed from the file
@code{ecb-create-layout-file} and the layout-function and associated
aliases are unbound.
@end deffn
@deffn Command display-news-for-upgrade &optional FULL-NEWS
Display the most important NEWS after an ECB-upgrade. If you call this
function but no ECB-upgrade has been performed before starting ECB
then nothing is display unless @var{FULL-NEWS} is not nil.
If @var{FULL-NEWS} is not nil then the NEWS-file is displayed in
another window.
@end deffn
@deffn Command display-upgraded-options
Display a information-buffer which options have been upgraded or
reset. Offers two buttons where the user can decide if the upgraded
options should also being saved by ECB for future settings or if the
buffer should be killed.
If saving is possible this command display where the options would be
saved. It is that file Emacs uses to save customize-settings. This
file is ``computed'' from the settings in @code{custom-file} and
@code{user-init-file} (see the documentation of these variables).
ECB automatically makes a backup-file of that file which will be
modified by storing the upgraded rsp. renamed ECB-options. This backup
file gets a unique name by adding a suffix ``.before_ecb_<version>''
to the name of the modified file. If such a file already exists ECB
adds a unique number to the end of the filename to make the filename
unique. This is a safety mechanism if something fails during storing
the upgraded options, so you never lose the contents of your
customization-file!
@end deffn
@deffn Command download-ecb
Download ECB from the ECB-website and install it. For this the option
@code{ecb-download-url} must be set correct, whereas the default value of
this option should always be correct.
If @code{ecb-download-package-version-type} is set to -1 (means asking
for a version) then you will be ask in the minibuffer for the version
to download. Otherwise ECB downloads autom. the latest version
available for the type specified in
@code{ecb-download-package-version-type}. If no newer version than the
current one is available no download will be done.
For details about downloading and what requirements must be satisfied
see function @code{ecb-package-download} and option
@code{ecb-download-package-version-type}!
After successful downloading the new ECB will be installed in a
subdirectory of @code{ecb-download-install-parent-dir}. After adding
this subdirectory to @code{load-path} and restarting Emacs the new ECB
version can be activated by @code{ecb-activate}.
If current running ECB is installed as regular XEmacs-package and not
with the archive available at the ECB website then this function asks
for proceeding!
@end deffn
@deffn Command download-semantic
Download semantic from the semantic-website and install it. For this
the variable @code{ecb-cedet-url} must be set correct,
whereas the default value of this variable should always be correct.
If @code{ecb-download-package-version-type} is set to -1 (means asking
for a version) then you will be ask in the minibuffer for the version
to download. Otherwise ECB downloads autom. the latest version
available for the type specified in
@code{ecb-download-package-version-type}. If no newer version than the
current one is available no download will be done.
For details about downloading and what requirements must be satisfied
see function @code{ecb-package-download} and option
@code{ecb-download-package-version-type}!
After successful downloading the new semantic will be installed in a
subdirectory of @code{ecb-download-install-parent-dir}. After adding
this new subdirectory to @code{load-path} and restarting Emacs the new
semantic version is loaded and is used after next start of ECB.
If current running semantic is installed as regular XEmacs-package and
not with the archive available at the semantic website then this
function asks for proceeding!
@end deffn
@deffn Command expand-methods-nodes &optional force-all
Set the expand level of the nodes in the ECB-methods-buffer.
This command asks in the minibuffer for an indentation level LEVEL. With this
LEVEL you can precisely specify which level of nodes should be expanded. LEVEL
means the indentation-level of the nodes.
A LEVEL value X means that all nodes with an indentation-level <= X are
expanded and all other are collapsed. A negative LEVEL value means all visible
nodes are collapsed.
Nodes which are not indented have indentation-level 0!
Which node-types are expanded (rsp. collapsed) by this command
depends on the options @code{ecb-methods-nodes-expand-spec} and
@code{ecb-methods-nodes-collapse-spec}! With optional argument
@var{FORCE-ALL} all tags will be expanded/collapsed regardless of
the values of these options.
Examples:
@itemize @minus
@item LEVEL = 0
expands only nodes which have no indentation itself.
@item LEVEL = 2
expands nodes which are either not indented or indented indented once
or twice
@item LEVEL ~ 10
should normally expand all nodes expect there are nodes which are
indented deeper than 10.
@end itemize
Note 1: This command switches off auto. expanding of the method-buffer
if @code{ecb-expand-methods-switch-off-auto-expand} is not nil. But it
can be switched on again quickly with
@code{ecb-toggle-auto-expand-tag-tree} or @kbd{[C-c . a]}.
Note 2: All this is only valid for file-types parsed by semantic. For
other file types which are parsed by imenu or etags (see
@code{ecb-process-non-semantic-files}) @var{FORCE-ALL} is always true!
@end deffn
@deffn Command dump-semantic-toplevel
Dump the current semantic-tags in special buffer and display them.
@end deffn
@deffn Command eshell-current-buffer-sync
Synchronize the eshell with the directory of current source-buffer.
This is only done if the eshell is currently visible in the
compile-window of ECB and if either this function is called
interactively or @code{ecb-eshell-synchronize} is not nil.
@end deffn
@deffn Command eshell-recenter
Recenter the eshell window so that the prompt is at the buffer-end.
@end deffn
@deffn Command expand-directory-nodes
Set the expand level of the nodes in the ECB-directories-buffer. For
argument LEVEL see @code{ecb-expand-methods-nodes}.
Be aware that for deep structured paths and a lot of source-paths this
command can last a long time - depending on machine- and
disk-performance.
@end deffn
@deffn Command goto-window-analyse
Make the ECB-analyse window the current window.
@end deffn
@deffn Command goto-window-compilation
Goto the ecb compilation window @code{ecb-compile-window}.
@end deffn
@deffn Command goto-window-directories
Make the ECB-directories window the current window. If
@code{ecb-use-speedbar-instead-native-tree-buffer} is @code{dir} then
goto to the speedbar-window.
@end deffn
@deffn Command goto-window-edit1
Make the (first) edit-window window the current window.
@end deffn
@deffn Command goto-window-edit2
Make the second edit-window (if available) window the current window.
@end deffn
@deffn Command goto-window-edit-last
Make the last selected edit-window window the current window. This is
the same as if @code{ecb-mouse-click-destination} is set to
@code{last-point}.
@end deffn
@deffn Command goto-window-history
Make the ECB-history window the current window.
@end deffn
@deffn Command goto-window-methods
Make the ECB-methods window the current window. If
@code{ecb-use-speedbar-instead-native-tree-buffer} is @code{method}
then goto to the speedbar-window.
@end deffn
@deffn Command goto-window-sources
Make the ECB-sources window the current window. If
@code{ecb-use-speedbar-instead-native-tree-buffer} is @code{source}
then goto to the speedbar-window.
@end deffn
@deffn Command history-filter
Apply a filter to the history-buffer to reduce the number of entries.
So you get a better overlooking. There are three choices:
@itemize @minus
@item Filter by extension:
Just insert the extension you want the History-buffer being filtered.
Insert the extension without leading dot!
@item Filter by regexp:
Insert the filter as regular expression.
@item No filter:
This means to display an entry for all currently living file-buffers.
@end itemize
@end deffn
@deffn Command jde-display-class-at-point
Display in the ECB-methods-buffer the contents (methods, attributes
etc...) of the class which contains the definition of the ``thing''
under point (this can be a variable-name, class-name, method-name,
attribute-name). This function needs the same requirements to work as
the method-completion feature of JDEE (see
@code{jde-complete})!. The source-file is searched first in
@code{jde-sourcepath}, then in @code{jde-global-classpath}, then in
@var{$CLASSPATH}, then in current-directory.
Works only for classes where the source-code (i.e. the *.java-file) is
available.
@end deffn
@deffn Command maximize-window-analyse
Maximize the ECB-analyse-window. I.e. delete all other ECB-windows, so
only one ECB-window and the edit-window(s) are visible (and maybe a
compile-window). Works also if the ECB-analyse-window is not visible
in current layout.
@end deffn
@deffn Command maximize-window-directories
Maximize the ECB-directories-window, i.e. delete all other
ECB-windows, so only one ECB-window and the edit-window(s) are visible
(and maybe a compile-window). Works also if the ECB-directories-window
is not visible in current layout.
@end deffn
@deffn Command maximize-window-sources
Maximize the ECB-sources-window, i.e. delete all other ECB-windows, so
only one ECB-window and the edit-window(s) are visible (and maybe a
compile-window). Works also if the ECB-sources-window is not visible
in current layout.
@end deffn
@deffn Command maximize-window-methods
Maximize the ECB-methods-window, i.e. delete all other ECB-windows, so
only one ECB-window and the edit-window(s) are visible (and maybe a
compile-window). Works also if the ECB-methods-window is not visible
in current layout.
@end deffn
@deffn Command maximize-window-history
Maximize the ECB-history-window, i.e. delete all other ECB-windows, so
only one ECB-window and the edit-window(s) are visible (and maybe a
compile-window). Works also if the ECB-history-window is not visible
in current layout.
@end deffn
@deffn Command maximize-window-speedbar
Maximize the ECB-speedbar-window, i.e. delete all other ECB-windows,
so only one ECB-window and the edit-window(s) are visible (and maybe a
compile-window). Does nothing if the speedbar-window is not visible
within the ECB-frame.
@end deffn
@deffn Command methods-filter
Apply a filter to the Methods-buffer to reduce the number of entries.
So you get a better overlooking. There are six choices:
@itemize @bullet
@item Filter by protection:
Just insert the protection you want the Methods-buffer being filtered:
private, protected or public!
@item Filter by regexp:
Insert the filter as regular expression.
@item Filter by tag-class:
You can filter by the tag-classes of current major-mode. The available
tag-classes come from the variable
@code{semantic--symbol->name-assoc-list}. The are normally methods,
variables etc.
@item Filter by current type:
In languages which have types like Java or C++ this filter displays
only the current type and all its members (e.g. attributes and
methods). If ECB can not identify the current type in the
source-buffer or in the methods-window then nothing will be done.
@item Filter by a filter-function:
Such a function gets two arguments: a tag and the source-buffer of
this tag. If the tag should be displayed (i.e. not being filtered out)
then the function has to return not nil otherwise nil.
@item No special filter:
This means to display all tags specified with the option
@code{ecb-show-tokens}. If currently some of the above filters are
applied they will be all removed.
@item Delete the last added:
This removes only the topmost filter-layer, means that filter added
last.
@end itemize
The protection-, current-type- and the tag-class-filter are only
available for semantic-supported sources.
Be aware that the tag-list specified by the option
@code{ecb-show-tags} is the basis of all filters, i.e. tags which are
excluded by that option will never be shown regardless of the filter
type here!
All tags which match the applied filter(s) will be displayed in the
Methods-buffer.
If called with a prefix-argument or when optional arg INVERSE is not
nil then an inverse filter is applied to the Methods-buffer, i.e. all
tags which do NOT match the choosen filter will be displayed in the
Methods-buffer!
Per default the choosen filter will be applied on top of already
existing filters. This means that filters applied before are combined
with the new filter. This behavior can changed via the option
@code{ecb-methods-filter-replace-existing}. But regardless of the
setting in @code{ecb-methods-filter-replace-existing} applying one of
the not-inverse filters protection, tag-class or current-type always
replaces exactly already existing filters of that type. On the other
hand applying more than one inverse tag-class- or protection-filter
can make sense.
Such a filter is only applied to the current source-buffer, i.e. each
source-buffer can have its own tag-filters.
The current active filter will be displayed in the modeline of the
Methods-buffer [regexp, prot (= protection), tag-class, function (=
filter-function)]. If an inverse filter has been applied then this is
signalized by a preceding caret ^. If currently more than 1 filter is
applied then always the top-most filter is displayed in the modeline
but the fact of more than 1 filter is visualized by the number of the
filters - included in parens. You can see all currently applied
filters by moving the mouse over the filter-string in modeline of the
Methods-buffer: They will displayed as help-echo.
See the option @code{ecb-default-tag-filter} if you search for
automatically applied default-tag-filters.
@end deffn
@deffn Command methods-filter-current-type
Display in the Methods-buffer only the current type and its members.
For further details see @code{ecb-methods-filter}.
@end deffn
@deffn Command methods-filter-delete-last
Remove the most recent filter from the Methods-buffer. For further details see
@code{ecb-methods-filter}.
@end deffn
@deffn Command methods-filter-function &optional inverse
Filter the methods-buffer by a function. If INVERSE is not nil (called
with a prefix arg) then an inverse filter is applied. For further details see
@code{ecb-methods-filter}.
@end deffn
@deffn Command methods-filter-nofilter
Remove any filter from the Methods-buffer. For further details see
@code{ecb-methods-filter}.
@end deffn
@deffn Command methods-filter-protection &optional inverse
Filter the methods-buffer by protection. If INVERSE is not nil (called
with a prefix arg) then an inverse filter is applied. For further details see
@code{ecb-methods-filter}.
@end deffn
@deffn Command methods-filter-regexp &optional inverse
Filter the methods-buffer by a regexp. If INVERSE is not nil (called
with a prefix arg) then an inverse filter is applied. For further details see
@code{ecb-methods-filter}.
@end deffn
@deffn Command methods-filter-tagclass &optional inverse
Filter the methods-buffer by tag-class. If INVERSE is not nil (called
with a prefix arg) then an inverse filter is applied. For further details see
@code{ecb-methods-filter}.
@end deffn
@deffn Command minor-mode &optional arg
Toggle ECB minor mode. With prefix argument @var{ARG}, turn on if
positive, otherwise off. Return non-@code{nil} if the minor mode is
enabled.
@end deffn
@deffn Command nav-goto-previous
Go backward in the navigation history-list, see @ref{Back/forward
navigation}.
@end deffn
@deffn Command nav-goto-next
Go forward in the navigation history-list, see @ref{Back/forward
navigation}.
@end deffn
@deffn Command rebuild-methods-buffer
Updates the methods buffer with the current buffer after deleting the
complete previous parser-information, means no semantic-cache is used!
Point must stay in an edit-window otherwise nothing is done. This
method is merely needed for semantic parsed buffers if semantic parses
not the whole buffer because it reaches a not parse-able code or for
buffers not supported by semantic but by imenu or etags.
Examples when a call to this function can be necessary:
@itemize
@item
If an Elisp-file is parsed which contains in the middle a defun X
where the closing ) is missing then semantic parses only until this
defun X is reached and you will get an incomplete ECB-method buffer.
In such a case you must complete the defun X and then call this
function to completely reparse the Elisp-file and rebuild the ECB
method buffer!
@item
For not semantic supported buffers which can be parsed by imenu or
etags (see @code{ecb-process-non-semantic-files}) because for these
buffers there is no built-in auto-rebuild mechanism. For these buffers
this command calls @code{ecb-rebuild-methods-buffer-for-non-semantic}.
@end itemize
For non-semantic-sources supported by etags the option
@code{ecb-auto-save-before-etags-methods-rebuild} is checked before
rescanning the source-buffer and rebuilding the methods-buffer.
If point is in one of the ecb-windows or in the compile-window then
this command rebuids the methods-buffer with the contents of the
source-buffer the last selected edit-window.
@end deffn
@deffn Command redraw-layout &optional ARG
Redraw the ECB screen.
Do not call this command from elisp-program but only interactively!
Called without a prefix-argument the state of the ECB-frame-layout
will preserved. This means:
@itemize @minus
@item
The state of compile-window (hidden or visible) will be preserved but
if visible then the height will be as specified in
@code{ecb-compile-window-height}.
@item
The state of the ECB-windows will be preserved (hidden or visible) but
if visible then the sizes will be as specified in the layout (and with
the options @code{ecb-windows-width} and @code{ecb-windows-height}) or
as stored with @code{ecb-store-window-sizes}.
@end itemize
If called with ONE prefix-argument (@kbd{[C-u]}) then the layout will
be drawn with all ECB-windows and also with a visible compile-window
(when @code{ecb-compile-window-height} is not nil). The
splitting-state of the edit-area will be preserved.
If called with TWO prefix-arguments (i.e. hitting @kbd{[C-u]} twice:
(@kbd{[C-u]} @kbd{[C-u]}) then an emergency-redraw will be performed.
This means the same as if called with one prefix-argument (s.a.) but
the splitting-state of the edit-area will NOT be preserved but all
edit-windows besides the current one will be deleted. Use this only if
there are some anomalies after standard redraws!
If the variable @code{ecb-redraw-layout-quickly} is not nil then the
redraw is done by the @code{ecb-redraw-layout-quickly} function,
otherwise by @code{ecb-redraw-layout-full}.
Please not: It's strongly recommended to use the quick redraw only if
you have really slow machines where a full redraw takes several
seconds because the quick redraw is not really safe and has some
annoying drawbacks! On normal machines the full redraw should be done
in << 1s so there should be no need for the quick version!
@end deffn
@deffn Command restore-default-window-sizes
Resets the sizes of the ECB windows to their default values.
@end deffn
@deffn Command restore-window-sizes
Sets the sizes of the ECB windows to their stored values. See option
@code{ecb-layout-window-sizes} and command
@code{ecb-store-window-sizes}.
@end deffn
@deffn Command select-ecb-frame
Selects the @code{ecb-frame} if ECB is activated - otherwise reports
an error.
@end deffn
@deffn Command show-help &optional format
Shows the online help of ECB either in Info or in HTML format
depending on the value of @code{ecb-show-help-format}. If called with
prefix argument, i.e. if @var{FORMAT} is not nil then the user is
prompted to choose the format of the help (Info or HTML). If an error
about not finding the needed help-file occurs please take a look at
the options @code{ecb-help-info-start-file} and
@code{ecb-help-html-start-file}!
Note: If you got ECB as a standard XEmacs-package maybe the
HTML-online-documentation is not included.
@end deffn
@deffn Command show-layout-help
Select a name of a layout and shows the documentation of the
associated layout-function. At least for the built-in layouts the
documentation contains a picture of the outline of the chosen layout.
@end deffn
@deffn Command show-tip-of-the-day
Show tip of the day if @code{ecb-tip-of-the-day} is not nil or if
called interactively.
@end deffn
@deffn Command sources-filter
Apply a filter to the sources-buffer to reduce the number of entries.
So you get a better overlooking. There are three choices:
@itemize @minus
@item Filter by extension:
Just insert the extension you want the Sources-buffer being filtered.
Insert the extension without leading dot!
@item Filter by regexp:
Insert the filter as regular expression.
@item No filter:
This means to display an entry for every file in the current selected
directory (all except these filter already filtered out by
@code{ecb-source-file-regexps} and
@code{ecb-sources-exclude-cvsignore}).
@end itemize
Such a filter is only applied to the current selected directory, i.e. each
directory has its own filtered sources-buffer.
@end deffn
@deffn Command store-window-sizes &optional FIX
Stores the sizes of the ECB windows for the current layout. The size
of the ECB windows will be set to their stored values when
@code{ecb-redraw-layout} or @code{ecb-restore-window-sizes} is called.
To reset the window sizes to their default values call
@code{ecb-restore-default-window-sizes}. Please read also the
documentation of @code{ecb-layout-window-sizes}!
The windows sizes are stored per default as fractions of current
frame-width and -height of the ecb-frame, so the stored values will
``work'' for other frame sizes too. If a permanent compile-window is
visible then ECB will tell you that window-sizes should be stored with
hidden compile-window and ask you if you want proceed; if you proceed
then the window-heights will be stored as fractions of current
(frame-height minus current visible compile-window-height) so you
should ensure that the current compile-window has its standard-height
as specified in @code{ecb-compile-window-height}!. If @var{FIX} is not
nil (means called with a prefix argument) then always the fixed values
of current width and height are stored!
@end deffn
@deffn Command submit-problem-report
Submit a problem report for the ECB to the ECB mailing-list. This
command generates in the edit-window a problem-report which contains
already the current values of all ECB options, the current
backtrace-buffer if there is any and the current message-buffer. You
will be asked for a problem-report subject and then you must insert a
description of the problem. Please describe the problem as detailed as
possible!
@end deffn
@deffn Command toggle-auto-expand-tag-tree &optional arg
Toggle auto expanding of the ECB-methods-buffer. With prefix argument
@var{ARG}, make switch on if positive, otherwise switch off. If the
effect is that auto-expanding is switched off then the current value
of @code{ecb-auto-expand-tag-tree} is saved so it can be used for
the next switch on by this command.
@end deffn
@deffn Command toggle-compile-window &optional arg
Toggle the visibility of the compile-window of ECB. With prefix
argument ARG, make visible if positive, otherwise invisible. The
height of the compile-window is always the current value of
@code{ecb-compile-window-height}! If called and
@code{ecb-compile-window-height} is nil then ECB asks for the height
of the compile-window, sets this height as new value of
@code{ecb-compile-window-height} and displays the compile-window (so
if you have called this command by mistake and you do not want a
compile-window you have to quit with @key{C-g}).
@end deffn
@deffn Command toggle-compile-window-height &optional arg
Toggle whether the @code{ecb-compile-window} is enlarged or not. If
@var{ARG} > 0 then shrink or enlarge the the compile-window according
to the value of @code{ecb-enlarged-compilation-window-max-height}. But
never shrink below the value of @code{ecb-compile-window-height}. If
@var{ARG} <= 0 then shrink @code{ecb-compile-window} to
@code{ecb-compile-window-height} and if @var{ARG} is nil then toggle
the enlarge-state.
@end deffn
@deffn Command toggle-ecb-windows &optional arg
Toggle visibility of the ECB-windows. With prefix argument @var{ARG},
make visible if positive, otherwise invisible. This has nothing to do
with (de)activating ECB but only affects the visibility of the ECB
windows. ECB minor mode remains active!
@end deffn
@deffn Command toggle-layout &optional last-one
Toggles between the layouts defined in
@code{ecb-toggle-layout-sequence} (See also option
@code{ecb-show-sources-in-directories-buffer}). Note: This function
works by changing the options @code{ecb-layout-name} but only for
current Emacs-session.
If optional argument @var{LAST-ONE} is not nil (e.g. called with a
prefix-arg) then always the last selected layout was choosen
regardless of the setting in @code{ecb-toggle-layout-sequence}. The
last selected layout is always that layout which was current direct
before the most recent layout-switch. So now a user can switch to
another layout via `ecb-change-layout' and always come back to his
previous layout via @kbd{[C-u]} @code{ecb-toggle-layout}.
@end deffn
@deffn Command toggle-scroll-other-window-scrolls-compile &optional ARG
Toggle the state of
@code{ecb-scroll-other-window-scrolls-compile-window}. With prefix
argument @var{ARG}, set it to @code{t}, otherwise to @code{nil}. For
all details about the scroll-behavior of @code{scroll-other-window}
see the advice documentation of @code{other-window-for-scrolling}.
@end deffn
@deffn Command toggle-window-sync &optional arg
Toggle auto synchronizing of the ECB-windows. With prefix argument
@var{ARG}, switch on if positive, otherwise switch off. If the effect
is that auto-synchronizing is switched off then the current value of
the option @code{ecb-window-sync} is saved so it can be used for the
next switch on by this command. See also the option
@code{ecb-window-sync}.
@end deffn
@deffn Command update-directories-buffer
Updates the ECB directories buffer.
@end deffn
@deffn Command upgrade-options
Check for all ECB-options if their current value is compatible to the
defined type. If not upgrade it to the new type or reset it to the
default-value of current ECB. Try also to upgrade renamed options.
Displays all upgraded or reset options with their old (before the
upgrade/reset) and new values.
@end deffn
@deffn Command window-sync
Synchronizes all special ECB-buffers with current buffer.
Depending on the contents of current buffer this command performs different
synchronizing tasks but only if ECB is active and point stays in an
edit-window.
@itemize
@item
If current buffer is a file-buffer then all special ECB-tree-buffers are
synchronized with current buffer.
@item
If current buffer is a dired-buffer then the directory- and
the sources-tree-buffer are synchronized if visible
@end itemize
In addition to this the hooks in @code{ecb-current-buffer-sync-hook}
run.
@end deffn
Most of these functions are also available via the menu ``ECB'' and
also via the ECB key-map with prefix @kbd{C-c .} (see
@code{ecb-minor-mode} for a complete list of the keybindings).
@node Customizing, Submitting problem report, Usage of ECB, Top
@chapter Customizing ECB
This chapter describes how to customize ECB for your personal taste.
The first section introduces some general aspects (which you should
really know!), the second one gives an overview of the most important
options and the third one lists all options of ECB (divided into the
customize groups).
@menu
* General aspects:: General aspects for customizing ECB
* Most important options:: Which option you must know
* Customizable options:: All customizable options of ECB
@end menu
@node General aspects, Most important options, Customizing, Customizing
@section General aspects for customizing ECB
This chapter contains all important informations you should know about
customizing ECB. The first section gives an answer to the question
``@code{setq} or @code{customize}'' and the second section describes
what to do when you have to customize ECB for a lot of people.
@menu
* setq or customize:: Should i use setq or customize?
* Site-wide customizing:: Site-wide customizing of ECB
@end menu
@node setq or customize, Site-wide customizing, General aspects, General aspects
@subsection Setq or customize - what should i use?
The best way to customize all the options of ECB is via the
customize-feature of (X)Emacs, i.e. means calling the commands
@code{customize-option} or @code{customize-group} etc. This is also
the strongly recommended way!
But of course you can also use @code{setq} or some Elisp-code to
change the values of many but not all of the options. The values of
the following options @strong{MUST NOT} be changed via @code{setq} or
Elisp-code but only with the customize-feature!
@itemize @minus
@item @code{ecb-advice-window-functions}
@item @code{ecb-bucket-node-display}
@item @code{ecb-compile-window-height}
@item @code{ecb-compile-window-temporally-enlarge}
@item @code{ecb-compile-window-width}
@item @code{ecb-exclude-parents-regexp}
@item @code{ecb-fix-window-size}
@item @code{ecb-font-lock-tags}
@item @code{ecb-highlight-tag-with-point-delay}
@item @code{ecb-key-map}
@item @code{ecb-layout-name}
@item @code{ecb-layout-window-sizes}
@item @code{ecb-mode-line-data}
@item @code{ecb-mode-line-display-window-number}
@item @code{ecb-mode-line-prefixes}
@item @code{ecb-show-node-info-in-minibuffer}
@item @code{ecb-show-tags}
@item @code{ecb-source-path}
@item @code{ecb-toggle-layout-sequence}
@item @code{ecb-tag-display-function}
@item @code{ecb-tree-do-not-leave-window-after-select}
@item @code{ecb-type-tag-display}
@item @code{ecb-type-tag-expansion}
@item @code{ecb-use-speedbar-instead-native-tree-buffer}
@item @code{ecb-window-sync-delay}
@item @code{ecb-windows-height}
@item @code{ecb-windows-width}
@end itemize
@node Site-wide customizing, , setq or customize, General aspects
@subsection Site-wide customizing of ECB
If you are the administrator for an Emacs-site, means you are
responsible for the basic customization of a lot of Emacs users, then
you maybe need a way to customize Emacs and ECB without changing
everyones @file{.emacs}-file and normally you will do this with the
file @file{site-start.el}. You can customize all options of ECB in a
central @file{site-start.el} (even the options mentioned above!) but
you @strong{MUST NOT} do this via @code{setq} but you have to use a
mechanism like the following@footnote{At least for the options for
which @code{setq} is explicitly forbidden, but it is recommended to
use always such a mechanism}!
This section describes two methods how to pre-customize ECB site-wide.
The elisp-code contained in the following two subsections has to be
copied to the file @file{site-start.el} before it can be used.
But ensure for both methods that you customize the options with the
correct lisp format. Read carefully the docstrings of the options you
want to customize from within Elisp-code!
@subsubsection Storing all option-settings in the users custom-file
The mechanism described here defines all site-wide-settings in a file
@file{site-lisp.el} but stores the values in the users
@code{custom-file} which is probably @file{.emacs}!
First two helper functions are needed, namely
@code{customize-option-get-value} and
@code{customize-save-variable-save} whereas the latter one sets the
value for an option via the customize-mechanism (and is therefore
allowed for the setq-forbidden options!) but only if the option has no
saved value until now (i.e. the user has not saved this option for
future sessions until now)
@example
@group
(defun customize-option-get-value (option type)
"Return the value of a customizable option OPTION with TYPE, where TYPE
can either be 'standard-value \(the default-value of the defcustom) or
'saved-value \(the value stored persistent by the user via customize)."
(let ((val (car (get option type))))
(cond ((not (listp val)) val)
((equal 'quote (car val)) (car (cdr val)))
(t (car val)))))
(defun customize-save-variable-save (option value &optional override)
"Calls `customize-save-variable' with OPTION and VALUE if OPTION is a
custom-type and if OPTION has no saved-value until now.
If OVERRIDE is a function or lambda-form then it is called with two arguments:
- OLD-SAVED-VAL: The saved value of OPTION
- NEW-VALUE: see argument VALUE.
OVERRIDE is only called if OPTION has already a saved-value. If OVERIDE
returns not nil then `customize-save-variable' is called for OPTION with VALUE
even if OPTION has no saved-value until now."
(and (get option 'custom-type)
(or (not (get option 'saved-value))
(and (functionp override)
(funcall override
(customize-option-get-value option 'saved-value)
value)))
(progn
(message "Overriding saved value for option %s with %s" option value)
(customize-save-variable option value))))
@end group
@end example
With @code{customize-save-variable-save} all ECB-options can be
site-wide pre-customized like follows:
@example
@group
(customize-save-variable-save 'ecb-show-tags
'((include collapsed nil)
(parent collapsed nil)
(type flattened nil)
(variable collapsed name)
(function flattened name)
(rule flattened name)
(section flattened nil)
(def collapsed name)
(t collapsed name)))
(customize-save-variable-save 'ecb-font-lock-tags t)
;; add here more options of ECB it you want
@end group
@end example
@subsubsection Using a special setq for site-wide settings
The mechanism above saves the pre-customized values always in the
users @code{custom-file} (probably @file{.emacs}). If this is not
preferred, then you can use the following mechanism but of course the
offered @code{setq-save} is only allowed for options which are not
setq-forbidden (@pxref{setq or customize}).
The mechanism below does not change the users @code{custom-file}. This
mechanism is needed especially if ECB should be autoloaded and all
site-wide settings should first loaded when ECB is activated by the
user. This can be achieved for example via@footnote{The file
@file{site-ecb.el} contains all site-wide settings for ECB}:
@example
@group
(require 'ecb-autoloads))
(eval-after-load "ecb"
'(require 'site-ecb))
@end group
@end example
In such a situation the whole @code{custom-file} of a user is mostly
loaded @strong{before} ECB is activated and therefore before the
site-wide-settings are loaded. So the users own customizations are
loaded before the site-wide ones.
The @code{setq-save}-mechanism described below prevents the users own
customisations contained in his @code{custom-file} from being
overridden by the site-wide setq-settings. If @code{setq} would be
used for the site-wide settings then in an autoload-situation the
site-wide settings would override the users-settings and this should
not be done!
First two helper-macros are needed:
@example
@group
(defmacro custom-saved-p (option)
"Return only not nil if OPTION is a defcustom-option and has a
saved value. Option is a variable and is literal \(not evaluated)."
`(and (get (quote ,option) 'custom-type)
(get (quote ,option) 'saved-value)))
(defmacro setq-save (option value)
"Sets OPTION to VALUE if and only if OPTION is not already saved
by customize. Option is a variable and is literal \(not evaluated)."
`(and (not (custom-saved-p ,option))
(set (quote ,option) ,value)))
@end group
@end example
With @code{setq-save} all ``not-setq-forbidden''-ECB-options can be
site-wide pre-customized like follows:
@example
@group
(setq-save ecb-tree-indent 4)
(setq-save ecb-tree-expand-symbol-before t)
(setq-save ecb-primary-secondary-mouse-buttons 'mouse-1--mouse-2)
@end group
@end example
@node Most important options, Customizable options, General aspects, Customizing
@section The most important options of ECB
Here are the most important options (it is recommended to check at
least the following options before working with ECB). You can
customize them via the customize-group ``ecb-most-important'' or via
the command @code{ecb-customize-most-important}.
@table @code
@item ecb-source-path
Where ECB can find your sources. You must set this option!
@item ecb-show-help-format
Should the online help of ECB be displayed in the standard Info format
or in HTML format in a web-browser.
@item ecb-auto-activate
@item ecb-major-modes-show-or-hide
Auto. activation of ECB after start (@pxref{Automatic activation}) or
major-mode-based showing or hiding the ecb-windows.
@item ecb-winman-escreen-number
@itemx ecb-winman-winring-name
Support of several window-managers (@pxref{Window-managers and ECB}).
@item ecb-key-map
All ECB-keybindings incl. a common prefix-key (@pxref{Using the
keyboard}).
@item ecb-new-ecb-frame
Should ECB create a new frame at activation time.
@item ecb-primary-secondary-mouse-buttons
@itemx ecb-mouse-click-destination
Define how to use the mouse (@pxref{Using the mouse}).
@item ecb-tree-buffer-style
@itemx ecb-tree-expand-symbol-before
@itemx ecb-tree-indent
@itemx ecb-truncate-lines
The look&feel of the trees in the tree-buffers. The former option
defines the general style of the tree-buffers and the latter ones
allow to customize the ascii-style tree-buffers (maybe you like a
value of 4 for the latter one if you display the expand-symbol before
(@pxref{Tree-buffer styles}).
@item ecb-source-file-regexps
Which files will (not) be shown in ECB.
@item ecb-show-node-info-in-minibuffer
When and which node-info should be displayed in the minibuffer?
@item ecb-layout-name
@itemx ecb-compile-window-height
@itemx ecb-compile-window-width
@itemx ecb-other-window-behavior
The ECB layout, means which windows you want to be displayed in the
ECB-frame and also the location of these windows (@pxref{Changing the
ECB-layout}).
@item ecb-compilation-buffer-names
Which buffers should be treaten as ``compilation-buffers'' and
therefore displayed in the compile-window of ECB - if there is any.
@item ecb-tag-display-function
@itemx ecb-type-tag-display
@itemx ecb-type-tag-expansion
@itemx ecb-show-tags
How to display the entries in the ECB-method window for semantic
supported sources (@pxref{Customizing the display}). These options
take only effect for semantic-sources (@pxref{Definition of semantic-
and non-semantic-sources}).
@item ecb-process-non-semantic-files
Displaying file-contents for not by semantic supported files too, e.g.
for LaTeX- and perl-sources (@pxref{Non-semantic sources}).
@end table
But to make ECB working best for you it is also recommended to have a
look at @ref{Customizable options}!
@node Customizable options, ,Most important options, Customizing
@section All customizable options of ECB
@noindent
All customization of ECB is divided into the following ``customize
groups''. You can highly customize all the ECB behavior/layout so just
go to these groups and you will see all well documented ECB-options.
@strong{Please note}: All options in the following subsections are
listed without the prefix ``ecb-'' (e.g. the option
@code{ecb-layout-name} is listed with name ``layout-name''). This has
been done for a better readable option index. @xref{Option Index}.
@menu
* 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-tree
* ecb-methods:: Customizing the ECB-methods-tree
* ecb-history:: Customizing the ECB-history-tree
* ecb-analyse:: Customizing the ECB-analyse-interactor
* 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-download:: Customizing how to download ECB
* 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
@end menu
@node ecb-general, ecb-tree-buffer, Customizable options, Customizable options
@subsection Group ecb-general
@noindent
This group contains general settings for the Emacs code browser:
@defopt activate-before-layout-draw-hook
Normal hook run at the end of activating the ecb-package by running
@code{ecb-activate}. This hooks are run after all the internal setup
process but directly before(!) drawing the layout specified in
@code{ecb-layout} (means before dividing the frame into several
windows).
A senseful using of this hook can be maximizing the Emacs-frame for
example, because this should be done before the layout is drawn
because ECB computes the size of the ECB-windows with the current
frame size! If you need a hook-option for the real end of the
activating process (i.e. after the layout-drawing) look at
@code{ecb-activate-hook}.
IMPORTANT: The difference between this hook and
@code{ecb-redraw-layout-before-hook} is that the latter one is
evaluated always before the layout is redrawn (for example after
calling @code{ecb-redraw-layout}) whereas the former one (this hook)
is only evaluated exactly once during the activation-process of ECB.
So during the activation process there is the following sequence of
hooks:
@enumerate
@item @code{ecb-activate-before-layout-draw-hook} \(this one)
@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
@end defopt
@defopt activate-hook
Hook run at the end of activating ECB by @code{ecb-activate}. This
hooks are run at the real end of the activating process, means after
the layout has been drawn!. If you need hooks which are run direct
before the layout-drawing look at
@code{ecb-activate-before-layout-draw-hook}.
@end defopt
@defopt activation-selects-ecb-frame-if-already-active
Trying to activate an already activated ECB selects the ECB-frame. If
t then the ECB-frame is selected, if nil then it is not. If 'ask then
ECB asks if the ECB-frame should be selected if the current-frame is
not the @code{ecb-frame}.
@end defopt
@defopt auto-activate
Automatically startup ECB when Emacs starts up. This should only be
true if you always want to run @code{ecb-activate}.
@end defopt
@defopt auto-compatibility-check
Check at ECB-startup if all ECB-options have correct values. If not
nil then all ECB-options are checked if their current value have the
correct type. It the type is incorrect the option is either auto.
upgraded to the new type or reset to the default-value of current ECB
if no upgrade is possible. This feature can also upgrade options which
are renamed in current ECB and try to transform the old-value to the
new named option. After startup all upgraded or reset options are
displayed with their old (before upgrade/reset) and new values. See
also the commands @code{ecb-upgrade-options} and
@code{ecb-display-upgraded-options}. If this option is off then the
user can perform the check and reset manually with
@code{ecb-upgrade-options}.
@xref{Auto. option-upgrading}.
@end defopt
@defopt before-activate-hook
Normal hook run at the beginning of activating the ecb-package by
running @code{ecb-activate}. These hooks run before any other tasks of
the activating process are performed. If any of these hooks returns
nil then ECB will not be activated!
This can be used to check some conditions and then only start ECB if
all conditions are true. For example a function could be added which
returns only nil if Gnus is running. Then calling @code{ecb-activate}
or @code{ecb-minor-mode} will only start ECB if Gnus is not already
running.
@end defopt
@defopt before-deactivate-hook
Normal hook run at the beginning of deactivating ECB by running
@code{ecb-deactivate}. These hooks run before any other tasks of the
deactivating process are performed. If any of these hooks returns nil
then ECB will not be deactivated! See also
@code{ecb-before-activate-hook}.
@end defopt
@defopt bucket-node-display
How ECB displays bucket-nodes in a ECB tree-buffer. Bucket-nodes have
only one job: Nodes with similar properties will be dropped into one
bucket for such a common property and all these nodes will be added as
children to the bucket-node. Besides being expandable and collapsable
a bucket-node has no senseful action assigned. Examples for
bucket-nodes are ``[+] Variables, ``[+] Dependencies'' etc. in the
Methods-buffer or buckets which combine filenames with same extension
under a bucket-node with name this extension.
This option defines how bucket-node should be displayed. The name of
the bucket-node is computed by ECB but you can define a prefix, a
suffix and a special face for the bucket-node
The default are empty prefix/suffix-strings and
@code{ecb-bucket-node-face}. But an alternative can be for example
'(``['' ``]'' nil) which means no special face and a display like
``[+] [<bucket-name>]''.
@end defopt
@defopt clear-caches-before-activate
Clear all ECB internal caches before startup. If t then ECB clears all
its internal caches before starting up. Caches are used for files- and
subdirs (see @code{ecb-cache-directory-contents} and
@code{ecb-cache-directory-contents-not}) for semantic-tags and for
the history-filter.
This caches are completely clean at load-time of the ECB-library!
Default is nil, because is makes sense not to clear these caches at
start-time because ECB is often deacticated temporally especially in
combination with window-managers like escreen.el. In these situations
the internal state of ECB should be preserved for next activation.
@end defopt
@defopt current-buffer-sync-hook
Normal hook run at the end of @code{ecb-current-buffer-sync}.
See documentation of @code{ecb-current-buffer-sync} for conditions when
synchronization takes place and so in turn these hooks are evaluated.
Precondition for such a hook:
Current buffer is the buffer of the current selected edit-window.
Postcondition for such a hook:
Point must stay in the same edit-window as before evaluating the hook.
Important note: If @code{ecb-window-sync} is not nil
@code{ecb-current-buffer-sync} is running either every time Emacs is
idle or even after every command (see @code{ecb-window-sync-delay}).
So these hooks can be really called very often! Therefore each
function of this hook should/must check in an efficient way at
beginning if its task have to be really performed and then do them
only if really necessary! Otherwise performance of Emacs could slow
down dramatically!
It is strongly recommended that each function added to this hook uses
the macro @code{ecb-do-if-buffer-visible-in-ecb-frame} at beginning!
See @code{ecb-speedbar-current-buffer-sync} and
@code{ecb-eshell-current-buffer-sync} for examples how to use this
macro!
@end defopt
@defopt deactivate-hook
Normal hook run at the end of deactivating (but before the ecb-layout
is cleared!) ECB by running @code{ecb-deactivate}.
@end defopt
@defopt debug-mode
If not nil ECB displays debug-information in the Messages-buffer. This
is done for some critical situations concerning semantic-tags and
their overlays (or extends for XEmacs). Normally you should not need
this switched on! But if you get errors like ``destroyed extend'' for
XEmacs or ``wrong-argument-type'' concerning overlays for GNU Emacs then
you should switch on this option and submitting a bug-report to the
ecb-mailing-list (@code{ecb-submit-problem-report}) after getting the
error again!
@end defopt
@defopt grep-function
Function used for performing a grep. The popup-menu of the
tree-buffers ``Directories'', ``Sources'' and ``History'' offer to
grep the ``current'' directory:
@itemize @minus
@item
Directory-buffer: The grep is performed in the current popup-directory
after clicking the right mouse-button onto a node.
@item
Sources-buffer: The grep is performed in the current selected directory.
@item
History-buffer: The grep is performed in the directory of the current
popup-source after clicking the right mouse-button onto a node.
@end itemize
@end defopt
@defopt grep-find-function
Function used for performing a recursive grep. For more Details see
option `ecb-grep-function' and replace ``grep'' with ``recursive
grep''.
@end defopt
@defopt key-map
Specifies all keybindings for the ECB minor-mode key-map. The value is
a cons-cell where the car is a common-prefix key for all the
keybindings. The cdr is a list of keybindings each of them a list
again. A key-binding has the following form:
@example
'(<common-prefix-flag> <keysequence> <function>) where
@end example
@table @code
@item <common-prefix-flag>
If t then the common-prefix-key defined as car of the value (see above)
is used.
@item <keysequence>
If the common prefix-key is used then the final key-binding is the
concatenation of the common-prefix-key (see above) and this
keysequence.
@item <function>:
The function to bind to the key. This can also be a lambda-expression
.
@end table
It is highly recommended to use one of the standard keys C-c or C-x as
first key of your common-prefix-key!
You MUST change this option via customize to take effect!
All keysequences must be inserted as a string and must follow the
syntax needed by @code{read-kbd-macro} or @code{kbd}. This means you
can insert the key in the same manner @kbd{C-h k} displays keysequences.
Here is the summary of the syntax:
Text is divided into ``words'' separated by whitespace. Except for the words
described below, the characters of each word go directly as characters of the
keysequence. The whitespace that separates words is ignored. Whitespace in the
macro must be written explicitly, as in @kbd{C-c SPC}.
@itemize @bullet
@item
The special words RET, SPC, TAB, DEL, LFD, ESC, and NUL represent
special control characters. The words must be written in uppercase.
@item
A word in angle brackets, e.g., <return>, <down>, <left> or <f1>,
represents a function key. (Note that in the standard configuration,
the function key <return> and the control key RET are synonymous.).
You can use angle brackets on the words RET, SPC, etc., but they are
not required there.
@item
Keys can be written by their ASCII code, using a backslash followed by
up to six octal digits. This is the only way to represent keys with
codes above .
@item
One or more prefixes M- (meta), C- (control), S- (shift), A- (alt), H-
(hyper), and s- (super) may precede a character or key notation. For
function keys, the prefixes may go inside or outside of the brackets:
C-<down> = <C-down>. The prefixes may be written in any order: M-C-x =
C-M-x. Prefixes are not allowed on multi-key words, e.g., C-abc,
except that the Meta prefix is allowed on a sequence of digits and
optional minus sign: M--123 = M-- M-1 M-2 M-3.
@item
The @code{^} notation for control characters also works: ^M = C-m.
@end itemize
@end defopt
@defopt major-modes-show-or-hide
List of major-modes which show or hide the ecb-windows. The value is a
cons-cell where the car contains all major-mode-symbols which should
show the special ecb-windows and the cdr contains all
major-mode-symbols which should hide the special ecb-windows. If the
symbol of a major-mode is neither contained in the car-``show-list''
nor in the cdr-``hide-list'' then the visibility-state of the
ecb-windows does not change.
@end defopt
@defopt minor-mode-text
String to display in the mode line when ECB minor mode is active.
(When the string is not empty, make sure that it has a leading space.)
Because for ECB it is quite obvious if it is active or not when the
ECB-windows are visible this text is only display in the modeline if
the ECB-windows are hidden.
@end defopt
@defopt mouse-click-destination
Destination of a mouse-button click. Defines in which edit-window (if
splitted) ECB does the ``right'' action (opening a source, jumping to
a method/variable etc.) after clicking with the primary mouse-button
(see @code{ecb-primary-secondary-mouse-buttons}) onto a node. There
are two possible choices:
@itemize @minus
@item @code{left-top}:
Does the ``right'' action always in the left/topmost edit-window.
@item @code{last-point}:
Does the ``right'' action always in that edit-window which had the point
before.
@end itemize
This is if the user has clicked either with the primary mouse-button or
has activated a popup-menu in the tree-buffer.
If the edit-area is not splitted this setting doesn't matter.
A click with the secondary mouse-button (see again
@code{ecb-primary-secondary-mouse-buttons} does the ``right'' action
always in another edit-window related to the setting in this option:
If there are two edit-windows then the ``other'' edit-window is used
and for more than 2 edit-windows the ``next'' edit-window is used
(whereas the next edit-window of the last edit-window is the first
edit-window).
Note: If the tree-buffers are used with the keyboard instead with the
mouse then this option takes effect too because @kbd{RET} is
interpreted as primary mouse-button and @kbd{C-RET} as secondary
mouse-button!
@end defopt
@defopt run-ediff-in-ecb-frame
Run ediff-sessions in the same frame as ECB is running.
If not nil then ECB ensures that ediff runs in the same frame as ECB and ECB
restores exactly the ``before-ediff''-window-layout after quiting ediff. If
nil then ediff decides in which frame it will run - depending on the current
window-layout (e.g. if the ecb-windows are currently hidden) this can be the
ecb-frame but this can also be a newly created frame or any other frame.
@end defopt
@defopt stealthy-tasks-delay
Time Emacs must be idle before ECB runs its stealthy tasks. Currently
ECB performes the following stealthy tasks:
@table @asis
@item Prescann directories for emptyness
Prescann directories and display them as empty or not-empty in the
directories-buffer. See the documentation of the option
@code{ecb-prescan-directories-for-emptyness} for a description.
@item File is read only
Check if sourcefile-items of the directories- or sources-buffer are
read-only or not. See documentation of the option
@code{ecb-sources-perform-read-only-check}.
@item Version-control-state
Checks the version-control-state of files in directories which are
managed by a VC-backend. See the option @code{ecb-vc-enable-support}.
@end table
Here the interval is defined ECB has to be idle before starting with
these stealthy tasks. It can be a floating-point value in seconds. The
value can also be changed during running ECB.
@end defopt
@defopt tip-of-the-day
Show tip of the day at start time of ECB.
@end defopt
@defopt tip-of-the-day-file
File where tip-of-the-day cursor is stored.
@end defopt
@defopt use-recursive-edit
Tell ECB to use a recursive edit. If set then it can easily be
deactivated by (keyboard-escape-quit).
@end defopt
@defopt version-check
Checks at start-time if the requirements are fulfilled.
It checks if the required versions of the libraries semantic, eieio and
speedbar are installed and loaded into Emacs.
It is strongly recommended to set this option to not @code{nil}!
@end defopt
@defopt window-sync
Synchronize the ECB-windows automatically with current edit window. If
@code{always} then the synchronization takes place always a buffer
changes in the edit window, if @code{nil} then never. If a list of
major-modes then only if the @code{major-mode} of the new buffer
belongs NOT to this list.
But in every case the synchronization only takes place if the
current-buffer in the current active edit-window has a relation to
files or directories. Examples for the former one are all
programming-language-modes, @code{Info-mode} too, an example for the
latter one is @code{dired-mode}. For all major-modes related to
non-file/directory-buffers like @code{help-mode},
@code{customize-mode} and others never an autom. synchronization will
be done!
It's recommended to exclude at least @code{Info-mode} because it makes
no sense to synchronize the ECB-windows after calling the Info help.
Per default also @code{dired-mode} is excluded but it can also making
sense to synchronize the ECB-directories/sources windows with the
current directory in the dired-buffer.
IMPORTANT NOTE: Every time the synchronization is done the hook
@code{ecb-current-buffer-sync-hook} is evaluated.
@end defopt
@defopt window-sync-delay
Time Emacs must be idle before the ECB-windows are synchronized with
current edit window. If nil then there is no delay, means
synchronization takes place immediately. A small value of about 0.25
seconds saves CPU resources and you get even though almost the same
effect as if you set no delay.
@end defopt
@node ecb-tree-buffer, ecb-directories, ecb-general, Customizable options
@subsection Group ecb-tree-buffer
@noindent
This group contains general settings related to the tree-buffers of
ECB:
@defopt common-tree-buffer-after-create-hook
Local hook running at the end of each tree-buffer creation. Every
function of this hook is called once without arguments direct after
creating a tree-buffer of ECB and it's local key-map. So for example a
function could be added which performs calls of @code{local-set-key}
to define new keybindings for EVERY tree-buffer.
The following keys must not be rebind in all tree-buffers:
@itemize @minus
@item @kbd{RET} and all combinations with @kbd{Shift} and @kbd{Ctrl}
@item @kbd{TAB}
@item @code{C-t}
@end itemize
@end defopt
@defopt primary-secondary-mouse-buttons
Primary- and secondary mouse button for using the ECB-buffers. A click
with the primary button causes the main effect in each ECB-buffer:
@itemize @bullet
@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-mouse-click-destination}.
@item ECB Methods:
Jumping to the method in that edit-window specified by the option
@code{ecb-mouse-click-destination}.
@end itemize
A click with the primary mouse-button while the SHIFT-key is pressed called
the POWER-click and does the following (depending on the ECB-buffer where the
POWER-click occurs):
@itemize @bullet
@item ECB Directories:
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.
@item ECB Methods:
Narrowing to the clicked method/variable/ect... (see
@code{ecb-tag-visit-post-actions}). This works only for semantic
supported sources but not for imenu- or etags-supported ones!
@end itemize
In addition always the whole node-name is displayed in the minibuffer after a
POWER-click \(for this see also `ecb-show-node-info-in-minibuffer').
The secondary mouse-button is for opening (jumping to) the file in
another edit-window (see the documentation
@code{ecb-mouse-click-destination}).
The following combinations are possible:
@itemize @minus
@item
primary: mouse-2, secondary: C-mouse-2 (means mouse-2 while CTRL-key is
pressed). This is the default setting.
@item
primary: mouse-1, secondary: C-mouse-1
@item
primary: mouse-1, secondary: mouse-2
@end itemize
Please note: If the tree-buffers are used with the keyboard instead
with the mouse then @kbd{RET} is interpreted as primary mouse-button and
@kbd{C-RET} as secondary mouse-button!
If you change this during ECB is activated you must deactivate and
activate ECB again to take effect
@end defopt
@defopt tree-buffer-style
The style of the tree-buffers.
There are three different styles available:
Image-style (value @code{image}): Very nice and modern - just try it.
For this style the options @code{ecb-tree-indent} and
@code{ecb-tree-expand-symbol-before} have no effect! Note: GNU Emacs
<= 21.3.X for Windows does not support image-display so ECB uses
always 'ascii-guides even when here 'image is set!
Ascii-style with guide-lines (value @code{ascii-guides}):
@example
@group
[-] ECB
| [+] code-save
`- [-] ecb-images
| [-] directories
| | [-] height-15
| | | * close.xpm
| | | * empty.xpm
| | | * leaf.xpm
| | `- * open.xpm
| | [+] height-17
| | [+] height-19
| `- [+] height-21
| [x] history
| [x] methods
`- [x] sources
@end group
@end example
Ascii-style without guide-lines (value @code{ascii-no-guides}) - this
is the style used by ECB <= 1.96:
@example
@group
[-] ECB
[+] code-save
[-] ecb-images
[-] directories
[-] height-15
* close.xpm
* empty.xpm
* leaf.xpm
* open.xpm
[+] height-17
[+] height-19
[+] height-21
[x] history
[x] methods
[x] sources
@end group
@end example
With both ascii-styles the tree-layout can be affected with the
options @code{ecb-tree-indent} and
@code{ecb-tree-expand-symbol-before}.
@end defopt
@defopt tree-do-not-leave-window-after-select
Tree-buffers which stay selected after a key- or mouse-selection. If a
buffer (either its name or the variable-symbol which holds the name)
is contained in this list then selecting a tree-node either by RET or
by a mouse-click doesn't leave that tree-buffer after the
node-selection but performes only the appropriate action (opening a
new source, selecting a method etc.) but point stays in the
tree-buffer. In tree-buffers not contained in this option normaly a
node-selection selects as ``last'' action the right edit-window or
maximizes the next senseful tree-buffer in case of a currently
maximized tree-buffer (see
@code{ecb-maximize-next-after-maximized-select}).
The buffer-name can either be defined as plain string or with a symbol
which contains the buffer-name as value. The latter one is recommended
for the builtin ECB-tree-buffers because then simply the related
option-symbol can be used.
A special remark for the @code{ecb-directories-buffer-name}: Of course
here the value of this option is only relevant if the name of the
current layout is contained in
@code{ecb-show-sources-in-directories-buffer} or if the value of
@code{ecb-show-sources-in-directories-buffer} is 'always and the
clicked ot hitted node represents a sourcefile (otherwise this would
not make any sense)!
The setting in this option is only the default for each tree-buffer.
With the command @code{ecb-toggle-do-not-leave-window-after-select}
the behavior of a node-selection can be changed fast and easy in a
tree-buffer without customizing this option, but of course not for
future Emacs sessions!
@end defopt
@defopt tree-easy-hor-scroll
Scroll step for easy hor. scrolling via mouse-click in tree-buffers.
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.
If this option is a positive integer S then in all ECB-tree-buffers
the keys @kbd{M-mouse-1} and @code{M-mouse-3} are bound to scrolling
left rsp. right with scroll-step S - clicking with @kbd{mouse-1} or
@kbd{mouse-2} onto the edge of the modeline has the same effect, i.e.
if you click with mouse-1 onto the left (rsp right) edge of the
modeline you will scroll left (rsp. right).
Additionally @code{C-M-mouse-1} and @code{C-M-mouse-3} are bound to
scrolling left rsp. right with scroll-step @code{window-width} - 2.
Default is a scroll-step of 5. If the value is @code{nil} then no keys
for horizontal scrolling are bound.
@end defopt
@defopt tree-expand-symbol-before
Show the expand symbol before the items in a tree. When the
expand-symbol is located before the items then the tree looks like:
@example
@group
[-] ECB
[+] code-save
[-] ecb-images
[-] directories
@end group
@end example
When located after then the tree looks like:
@example
@group
ECB [-]
code-save [+]
ecb-images [-]
directories [-]
@end group
@end example
The after-example above use a value of 2 for @code{ecb-tree-indent}
whereas the before-example uses a value of 4.
It is recommended to display the expand-symbol before because
otherwise it could be that with a deep nested item-structure with
and/or with long item-names (e.g. a deep directory-structure with some
long subdirectory-names) the expand-symbol is not visible in the
tree-buffer and the tree-buffer has to be horizontal scrolled to
expand an item.
@end defopt
@defopt tree-image-icons-directories
Directories where the images for the tree-buffer can be found. This is
a cons cell where:
car: Default directory where the default images for the tree-buffer
can be found. It should contain an image for every name of
@code{tree-buffer-tree-image-names}. The name of an image-file must
be: ``ecb-<NAME of TREE-BUFFER-TREE-IMAGE-NAMES>.<ALLOWED
EXTENSIONS>''.
cdr: This is a list where each element is a cons again with: car is
the buffer name of the tree-buffer for which a special image-path
should be used. The buffer-name can either be defined as plain string
or with a symbol which contains the buffer-name as value. The latter
one is recommended for the builtin ECB-tree-buffers because then
simply the related option-symbol can be used (e.g. the symbol
@code{ecb-directories-buffer-name}). The cdr is the the full-path of
an additional image-directorie which is searched first for images
needed for the related tree-buffer. If the image can not be found in
this directory then the default-directory (see above) is searched. If
the image can't even be found there the related ascii-symbol is used -
which is defined in @code{tree-buffer-tree-image-names}. If a
tree-buffer is not contained in this list then there is no additional
special image-directory for it.
ECB comes with predefined images in several different heights - so for
the most senseful font-heights of a tree-buffer a fitting image-size
should be available. The images reside either in the subdirectory
``ecb-images'' of the ECB-installation or - if ECB is installed as
regular XEmacs-package - in the ECB-etc data-directory (the directory
returned by (locate-data-directory ``ecb'').
@end defopt
@defopt tree-incremental-search
Enable incremental search in the ECB-tree-buffers. For a detailed
explanation see the online help section ``Working with the keyboard in
the ECB buffers''. If you change this during ECB is activated you must
deactivate and activate ECB again to take effect.
@end defopt
@defopt tree-indent
Indent size for tree buffer. If you change this during ECB is
activated you must deactivate and activate ECB again to take effect.
@end defopt
@defopt tree-mouse-action-trigger
When the tree-buffer mouse-action should be triggered. This option
determines the moment a mouse-action in a tree-buffer is triggered.
This can be either direct after pressing a mouse-button (value
@code{button-press}) or not until releasing the mouse-button (value:
@code{button-release}).
If you change this during ECB is activated you must deactivate and
activate ECB again to take effect!
@end defopt
@defopt tree-navigation-by-arrow
Enable smart navigation in the tree-windows by horiz. arrow-keys. If
not nil then the left- and right-arrow keys work in the ECB
tree-window in the following smart way if onto an expandable node:
@itemize @bullet
@item Left-arrow:
If node is expanded then it will be collapsed otherwise point jumps to
the next ``higher'' node in the hierarchical tree (higher means the next
higher tree-level or - if no higher level available - the next higher
node on the same level).
@item Right-arrow:
If node is not expanded then it will be expanded. Onto a not
expandable node the horizontal arrow-keys go one character in the
senseful correct direction.
@end itemize
If this option is changed the new value takes first effect after deactivating
ECB and then activating it again!
@end defopt
@defopt tree-truncate-lines
Truncate lines in ECB buffers. If a buffer (either its name or the
variable-symbol which holds the name) is contained in this list then
line-truncation is switched on for this buffer otherwise it is off.
The buffer-name can either be defined as plain string or with a symbol
which contains the buffer-name as value. The latter one is recommended
to switch on line-truncation for one of the builtin ECB-tree-buffers
because then simply the related option-symbol can be used. To truncate
lines in the builtin directories tree-buffer just add the symbol
@code{ecb-directories-buffer-name} to this option.
If you change this during ECB is activated you must deactivate and
activate ECB again to take effect.
@end defopt
@defopt truncate-long-names
Truncate long names that don't fit in the width of the ECB windows. If
you change this during ECB is activated you must deactivate and
activate ECB again to take effect.
@end defopt
@node ecb-directories, ecb-sources, ecb-tree-buffer, Customizable options
@subsection Group ecb-directories
@noindent
This group contains settings for the directories-buffer in the ECB:
@defopt add-path-for-not-matching-files
Add path of a file to @code{ecb-source-path} if not already contained.
This is done during the auto. windows synchronization which happens if
a file is opened not via the file/directory-browser of ECB. In such a
situation ECB adds the path of the new file auto. to
@code{ecb-source-path} at least temporally for the current Emacs
session. This option defines two things:
@enumerate
@item
Should only the root-part (which means for Unix-like systems always
'/' and for windows-like systems the drive) of the new file be added
as source-path to @code{ecb-source-path} or the whole directory-part?
For remote-files (e.g. tramp, ange-ftp- or efs-files) the root-part is
the complete host-part + the root-dir at that host (example:
/berndl@@ecb.sourceforge.net:/ would be the root-part of
/berndl@@ecb.sourceforge.net:/tmp/test.txt).
@item
Should this path be added for future sessions too?
@end enumerate
The value of this option is a cons-cell where the car is a boolean for
1. and the cdr is a boolean for 2.
A value of not nil for the car (1.) is reasonably if a user often
opens files not via the ECB-browser which are not located in any of
the paths of @code{ecb-source-path} because then only one path for
each drive (windows) or the root-path (Unix) is added to the directory
buffer of ECB.
@end defopt
@defopt auto-expand-directory-tree
Automatically expand the directory tree to the current source file.
There are three options:
@itemize @minus
@item @code{best}: Expand the best-matching source-path
@item @code{first}: Expand the first matching source-path
@item @code{nil}: Do not automatically expand the directory tree.
@end itemize
@end defopt
@defopt after-directory-change-hook
Hook which run directly after the selected directory has changed. This
means not onyl after a click onto a directory in the directory-window
of ECB but it means this hook runs always when the current directory
changes regardless of the trigger of this change. So for example it
runs also when you just switches from one buffer to another via
@code{switch-to-buffer} or @code{switch-to-buffer-other-window} and
the directory of these filebuffers is different but only when
auto-synchronizing of the ECB-windows is on (see
@code{ecb-window-sync}). It runs not when switching between buffers
and the associated files reside in the same directory.
Each function added to this hook will be called with two arguments:
The directory which was current _before_ the directory-change-trigger
and the directory which was now the current (i.e. after the trigger).
Example: If you switch from a filebuffer ``~/.emacs'' to a filebuffer
``/tmp/test.txt'' then the functions of this hook will be called with
the two arguments ``~'' and ``/tmp''.
@end defopt
@defopt cache-directory-contents
Cache contents of directories.
This can be useful if @code{ecb-source-path} contains directories with
many files and subdirs, especially if these directories are mounted
net-drives (``many'' means here something > 500, dependent of the
speed of the net-connection and the machine). Or if it contains
remote-source-paths which means paths in the sense of tramp, ange-ftp
or efs. For these directories actualizing the sources- and/or
directories- buffer of ECB (if displayed in current layout!) can slow
down dramatically so a caching increases speed a lot.
The value of this option is a list where each element is a cons-cell
and looks like:
@example
(<dir-regexp> . <filenumber threshold>) with
@end example
@table @code
@item <dir-regexp>:
Regular expression a directory must match to be cached.
@item <filenumber threshold>:
Number of directory contents must exceed this number.
@end table
A directory will only be cached if and only if the directory-name
matches at least one rexexp of this option and its content-number
exceeds the related threshold AND the directory-name matches NOT any
regexp of @code{ecb-cache-directory-contents-not}!
The cache entry for a certain directory will be refreshed and
actualized only by using the POWER-click (see
@code{ecb-primary-secondary-mouse-buttons}) in the directories-buffer
of ECB (@pxref{Using the mouse}).
Default-value: ECB caches the contents of all remote directories
regardless of the size and all other directories if more than 50
entries are contained.
Examples:
An entry @code{("/usr/home/john_smith/bigdir*" . 1000)} means the
contents of every subdirectory of the home-directory of John Smith
will be cached if the directory contains more than 1000 entries and
its name begins with ``bigdir''.
An entry @code{(".*" . 1000)} caches every directory which has more
than 1000 entries.
An entry @code{("^/\\([^:/]*@@\\)?\\([^@@:/]*\\):.*" . 0)} caches
every remote (in the sense of tramp, ange-ftp or efs) directory
regardless of the number of entries."
Please note: If you want your home-dir being cached then you MUST NOT
use ``~'' because ECB tries always to match full path-names!
@end defopt
@defopt cache-directory-contents-not
Do not cache the contents of certain directories. The value of this
option is a list where the each element is a regular expression a
directory must match if it should not being cached.
If a directory-name matches at least one of the regexps of this option
the directory-contents will never being cached. See
@code{ecb-cache-directory-contents} to see when a directory will be
cached.
This option can be useful when normally all directories with a certain
amount of content (files and subdirs) should be cached but some
special directories not. This can be achieved by:
@itemize @minus
@item
Setting @code{ecb-cache-directory-contents} to ((``.*'' . 500)):
Caches all directories with more then 500 entries
@item
Setting @code{ecb-cache-directory-contents-not} to a value which
matches these directories which should not being cached (e.g.
(``/usr/home/john_smith'') excludes the HOME-directory of John Smith
from being cached).
@end itemize
Please note: If you want your home-dir exclude from being cached then
you MUST NOT use ``~'' because ECB tries always to match full
path-names!
@end defopt
@defopt directories-buffer-after-create-hook
Local hook running after the creation of the directories-buffer. Every
function of this hook is called once without arguments direct after
creating the directories-buffer of ECB and it's local key-map. So for
example a function could be added which performs calls of
@code{local-set-key} to define new keybindings only for the
directories-buffer of ECB.
The following keys must not be rebind in the directories-buffer:
@kbd{F2}, @kbd{F3} and @kbd{F4}
@end defopt
@defopt directories-buffer-name
Name of the ECB directory buffer. Because it is not a normal buffer
for editing you should enclose the name with stars, e.g. `` *ECB
Directories*''.
If it is necessary for you you can get emacs-lisp access to the buffer-object of
the ECB-directory-buffer by this name, e.g. by a call of @code{set-buffer}.
Changes for this option at runtime will take affect only after
deactivating and then activating ECB again!
@end defopt
@defopt directories-menu-sorter
Function which re-sorts the menu-entries of the directories buffer.
If a function then this function is called to re-arrange the
menu-entries of the combined menu-entries of the user-menu-extensions
of @code{ecb-directories-menu-user-extension} and the built-in-menu
@code{ecb-directories-menu}. If nil then no special sorting will be
done and the user-extensions are placed in front of the
built-in-entries.
The function get one argument, a list of menu-entries. For the format
of this argument see @code{ecb-directories-menu-user-extension}. The
function must return a new list in the same format. Of course this
function can not only re-arrange the entries but also delete entries
or add new entries.
@end defopt
@defopt directories-menu-user-extension
Static user extensions for the popup-menu of the directories buffer.
Value is a list of elements of the following type: Each element
defines a new menu-entry and is either:
@enumerate
@item Menu-command:
A list containing two sub-elements, whereas the first is the function
(a function symbol) being called if the menu-entry is selected and the
second is the name of the menu-entry.
@item Separator:
A one-element-list and the element is the string ``---'': Then a
non-selectable menu-separator is displayed.
@item Submenu:
A list where the first element is the title of the submenu displayed
in the main-menu and all other elements are either menu-commands (see
1) or separators (see 2) or another submenu (see c). This allows deep
nested menu-submenu-structures. Currently a level of 4 is allowed but
in general there could be an infinite depth of nesting but it makes no
sense - if possible at all - to define infinite nested
defcustom-types. So there is a limit of 4 levels but tis is not a hard
limit: Just increase the value of the @code{ecb-max-submenu-depth}
@strong{BEFORE} first loading ECB!
@end enumerate
The function of a menu-command must follow the following guidelines:
Such a function must be defined with the macro
@code{tree-buffer-defpopup-command}! This macro defines a new
popup-command whereas the newly defined command gets one argument
@var{NODE}. See the docstring of @code{tree-buffer-defpopup-command}
for further details.
Example for the definition of such a menu-function:
@example
(tree-buffer-defpopup-command ecb-my-special-dir-popup-function
"Prints the name of the directory of the node under point."
(let ((node-data=dir (tree-node-get-data node)))
(message ``Dir under node: %s'' node-data=dir)))
@end example
Per default the static user-extensions are added at the beginning of
the built-in menu-entries of @code{ecb-directories-menu} but the whole
menu can be re-arranged with @code{ecb-directories-menu-sorter}.
These menu-extensions are static. A dynamic menu-extension can be
achieved via @code{ecb-directories-menu-user-extension-function}.
@end defopt
@defopt directories-menu-user-extension-function
Dynamic user extensions for the popup-menu of the directories buffer.
A function which has to return a list in the same format like the
option @code{ecb-directories-menu-user-extension}. This function is
called when the user opens the popup-menu for the directories buffer.
If no dynamically evaluated menu-extensions should be added to the
directories-buffer the function has to return nil. Therefore the
default-value of this option is @code{ignore}.
Per default the dynamic user-extensions are added in front of the
static extensions of @code{ecb-directories-menu-user-extension} but
the whole menu can be re-arranged with
@code{ecb-directories-menu-sorter}.
@end defopt
@defopt directories-show-node-info
When to display which node-info in the directories-buffer. Define
which node info should displayed after moving the mouse over a node
(or after a shift click onto the node) in the directories-buffer.
You can define ``when'' a node-info should be displayed:
@itemize @minus
@item always:
Node info is displayed by moving with the mouse over a node.
@item if-too-long:
Node info is only displayed by moving with the mouse over a node does
not fit into the window-width of the tree-buffer window. In the ECB
directories buffer this means also if a node is shortend or if the
node has an alias (see @code{ecb-source-path}).
@item shift-click:
Node info is only displayed after a shift click with the primary mouse
button onto the node.
@item never:
Node info is never displayed.
@end itemize
You can define what info should be displayed:
@itemize @minus
@item name: Only the full node-name is displayed.
@item path: The full-path of the node is displayed.
@end itemize
Do NOT set this option directly via setq but use always customize!
@end defopt
@defopt display-default-dir-after-start
Automatically display current default-directory after activating ECB.
If a file-buffer is displayed in the current active edit-window then
ECB synchronizes its tree-buffers to this file-buffer - at least if
the option @code{ecb-window-sync} it not nil. So for this situation
@code{ecb-display-default-dir-after-start} takes no effect but this
option is for the case if no file-buffer is displayed in the
edit-window after startup:
If true then ECB selects autom. the current default-directory after
activation even if no file-buffer is displayed in the current active
edit-window. This is useful if ECB is autom. activated after startup
of Emacs and Emacs is started without a file-argument. So the
directory from which the startup has performed is auto. selected in
the ECB-directories buffer and the ECB-sources buffer displays the
contents of this directory.
@end defopt
@defopt excluded-directories-regexps
Directories that should not be included in the directories list. The
value of this variable should be a list of regular expression.
@end defopt
@defopt prescan-directories-for-emptyness
Prescan directories for emptyness. ECB does this so directories are
displayed as empty in the directories-buffer even without
user-interaction (i.e. in previous ECB-versions the emptyness of a
directory has been first checked when the user has clicked onto a
directory). ECB optimizes this check as best as possible but if a
directory contains a lot of subdirectories which contain in turn a lot
of entries, then expanding such a directory or selecting it would take
of course more time as without this check - at least at the first time
(all following selects of a directory uses the cached information if
its subdirectories are empty or not). Therefore ECB performs this
check stealthy (see @code{ecb-stealthy-tasks-delay}) so normally there
should no performance-decrease or additional waiting-time for the
user. There is one exception: For remote directories (in the sense of
tramp, ange-ftp, or efs) this check can descrease performance even if
performed stealthy and interruptable. Therefore this option offers
three possible settings:
@itemize @bullet
@item @code{t}
Switch on this feature
@item @code{unless-remote}
Switch on this feature but not for remote directories. The term
``remote'' means here directories which are used via tramp, ange-ftp
or efs. So mounted directories are counted not as remote directories
here even if such a directory is maybe hosted on a remote machine. But
normally only directories in a LAN are mounted so there should be no
performance-problems with such mounted directories.
@item @code{nil}
Switch off this feature completely.
@end itemize
The option @code{ecb-prescan-directories-exclude-regexps} offers are
more fine granularity to exclude certain directories from this
prescan.
@end defopt
@defopt host-accessible-check-valid-time
Time in seconds a cached accessible-state of a remote host is valid.
This option is a list where each element specifies how long for a
certain remote host the cached ping-state (i.e. if the host is
accessible or not) should be valid. During this time-intervall ECB
pings such a remote host only once, all other checks use the cached
value of that real check. But it the cached value is older than the
value of this option ECB will ping again.
Per default ECB discards after 1 minute the cached ping-state of each
remote host. But if you are sure that a certain remote host is always
accessible (i.e. means in consequence that you are always online when
working with ECB and remote-paths) then add an entry to this option
with a high valid-interval.
Examples: An entry (``.*sourceforge.*'' . 3600) ensures that all
remote hosts machting the string ``sourceforge'' will only once pinged
during one hour. Or (``.*'' . 300) would ensure that every remote host
would be pinged only once during 5 minutes.
@end defopt
@defopt ping-options
List of options for the ping program. These options can be used to
limit how many ICMP packets are emitted. Ping is used to test if a
remote host of a remote path (e.g. a tramp-, ange-ftp- or efs-path) is
accessible See also @code{ecb-ping-program}.
@end defopt
@defopt ping-program
Program to send network test packets to a host. See also
@code{ecb-ping-options}.
@end defopt
@defopt prescan-directories-exclude-regexps
Which directories should be excluded from the empty-prescan. If a
directory matches any of the regexps of this option it will not be
prescanned for emptyness - This option takes only effect if
@code{ecb-prescan-directories-for-emptyness} is not nil.
@end defopt
@defopt show-sources-in-directories-buffer
Show source files in directories buffer.
@end defopt
@defopt source-path
Paths where to find code sources. Each path can have an optional alias
that is used as it's display name. If no alias is set, the path is
used as display name.
@end defopt
@defopt source-path
Paths where to find code sources. Each path can have an optional alias
that is used as it's display name. If no alias is set, the path is
used as display name.
Lisp-type of tis option: The value must be a list L whereas each
element of L is either
@itemize @minus
@item
a simple string which has to be the full path of a directory (this
string is displayed in the directory-browser of ECB) or
@item
a 2-element list whereas the first element is the full path of a
directory (string) and the second element is an arbitrary alias
(string) for this directory which is then displayed instead of the
underlying directory.
@end itemize
@end defopt
@defopt use-speedbar-instead-native-tree-buffer
If true then uses speedbar for directories, sources or methods. This
means that speedbar is integrated in the ECB-frame and is displayed in
that window normally displaying the standard ECB-directories-buffer,
ECB-sources-buffer or ECB-methods-buffer.
This option takes effect in all layouts which contain either a
directory window, a sources window or a method window.
This option can have four valid values:
@itemize @minus
@item @code{nil}: Do not use speedbar (default)
@item @code{dir}: Use speedbar instead of the standard directories-buffer
@item @code{source}: Use speedbar instead of the standard sources-buffer
@item @code{method}: Use speedbar instead of the standard methods-buffer
@end itemize
Note: For directories and sources a similar effect and usability is
available by setting this option to @code{nil} (or @code{method}) and
setting @code{ecb-show-sources-in-directories-buffer} to not
@code{nil}, because this combination displays also directories and
sources in one window.
@code{ecb-use-speedbar-instead-native-tree-buffer} is for people who
like the speedbar way handling directories and source-files or methods
and want it in conjunction with ECB.
@end defopt
@node ecb-sources, ecb-methods, ecb-directories, Customizable options
@subsection Group ecb-sources
@noindent
This group contains settings for the sources-buffer in the ECB:
@defopt read-only-check-exclude-regexps
Which directories should be excluded from the sources-read-only-check.
If a directory matches any of the regexps of this option their sources
will not be checked if they are writable - This option takes only
effect if @code{ecb-sources-perform-read-only-check} is not nil.
@end defopt
@defopt show-source-file-extension
Show the file extension of source files.
@end defopt
@defopt source-file-regexps
Specifies which files are shown as source files.
This is done on directory-base, which means for each directory-regexp
the files to display can be specified. If more than one
directory-regexp matches the current selected directory then always the
first one (and its related file-exclude/include-regexps) is used! If
no directory-regexp matches then all files are displayed for the
currently selected directory.
Important note: It is recommended that the *LAST* element of this list
should contain an always matching directory-regexp (@code{".*"})!
So the value of this option is a list of cons-cells where the car is a
directory regexp and the cdr is a 2 element list where the first
element is a list of exclude regexps and the second element is a list
of include regexps. A file is displayed in the source-buffer of ECB
iff: The file does not match any of the exclude regexps OR the file
matches at least one of the include regexps.
But regardless of the value of this option a file F is never displayed
in the sources-buffer if the directory matches
@code{ecb-sources-exclude-cvsignore} and the directory contains a file
.cvsignore which contains F as an entry!
There are three predefined and useful combinations of an exclude and
include regexp:
@itemize @bullet
@item All files
@item All, but no backup, object, lib or ini-files (except .emacs and .gnus). This
means all files except those starting with ``.'', ``#'' or ending with
``~'', ``.elc'', ``.obj'', ``.o'', ``.lib'', ``.dll'', ``.a'',
``.so''. (but including .emacs and .gnus)
@item Common source file types (.c, .java etc.)
@end itemize
In addition to these predefined values a custom exclude and include
combination can be defined.
Tips for the directory- and file-rexexps: @code{"$^"} matches no
files/directories, @code{".*"} matches all files/directories.
@end defopt
@defopt sources-buffer-after-create-hook
Local hook running after the creation of the sources-buffer. Every
function of this hook is called once without arguments direct after
creating the sources-buffer of ECB and it's local key-map. So for
example a function could be added which performs calls of
@code{local-set-key} to define new keybindings only for the
sources-buffer of ECB.
@end defopt
@defopt sources-buffer-name
Name of the ECB sources buffer. Because it is not a normal buffer for
editing you should enclose the name with stars, e.g. ``*ECB Sources*''.
If it is necessary for you you can get emacs-lisp access to the
buffer-object of the ECB-sources-buffer by this name, e.g. by a call
of @code{set-buffer}.
Changes for this option at runtime will take affect only after
deactivating and then activating ECB again!
@end defopt
@defopt sources-exclude-cvsignore
Specify if files contained in a @file{.cvsignore} should be
excluded.
Value is a list of regular expressions or nil. If you want to exclude
files listed in a @file{.cvsignore}-file from being displayed in the
ecb-sources-buffer then specify a regexp for such a directory.
If you want to exclude the contents of @file{.cvsignore}-files for
every directory then you should add one regexp ``.*'' which matches
every directory.
If you never want to exclude the contents of @file{.cvsignore}-files
then set this option to nil.
@end defopt
@defopt sources-menu-sorter
Function which re-sorts the menu-entries of the directories buffer.
If a function then this function is called to sort the menu-entries of
the combined menu-entries of the user-menu-extensions of
@code{ecb-sources-menu-user-extension} and the built-in-menu
@code{ecb-sources-menu}. If nil then no special sorting will be done
and the user-extensions are placed in front of the built-in-entries.
For the guidelines for such a sorter-function see
@code{ecb-directories-menu-sorter}.
@end defopt
@defopt sources-menu-user-extension
Static user extensions for the popup-menu of the sources buffer. For
further explanations see @code{ecb-directories-menu-user-extension}.
The node-argument of a menu-function contains as data the filename of
the source for which the popup-menu has been opened.
Per default the static user-extensions are added at the beginning of
the built-in menu-entries of @code{ecb-sources-menu} but the whole
menu can be re-arranged with @code{ecb-sources-menu-sorter}.
@end defopt
@defopt sources-menu-user-extension-function
Dynamic user extensions for the popup-menu of the sources buffer. A
function which has to return a list in the same format like the option
@code{ecb-sources-menu-user-extension}. This function is called when
the user opens the popup-menu for the sources buffer.
If no dynamically evaluated menu-extensions should be added to the
sources-buffer the function has to return nil. Therefore the
default-value of this option is @code{ignore}.
Per default the dynamic user-extensions are added in front of the
static extensions of @code{ecb-sources-menu-user-extension} but the
whole menu can be re-arranged with @code{ecb-sources-menu-sorter}.
@end defopt
@defopt sources-perform-read-only-check
Check if source-items in the tree-buffers are read-only. If a
sourcefile is read-only then it will be displayed with that face set
in the option @code{ecb-source-read-only-face}.
Because this check can be take some time if files are used via a
mounted net-drive ECB performs this check stealthily (see
@code{ecb-stealthy-tasks-delay}) so normally the user should not see a
performance-decrease or additional waiting-time. But to get sure this
option offers three choices: @code{t}, @code{unless-remote} and
@code{nil}. See @code{ecb-prescan-directories-for-emptyness} for an
explanation for these three choices.
The option @code{ecb-read-only-check-exclude-regexps} offers are more
fine granularity to exclude the sources of certain directories from
the read-only state-check.
@end defopt
@defopt sources-show-node-info
When to display which node-info in the sources-buffer. Define which
node info should displayed after moving the mouse over a node (or
after a shift click onto the node) in the sources-buffer.
You can define ``when'' a node-info should be displayed: See
@code{ecb-directories-show-node-info} for the possible choices.
You can define what info should be displayed:
@itemize @minus
@item name: Only the full node-name is displayed.
@item file-info: File infos for this file are displayed.
@item file-info-full: Fill infos incl. full path for this file are displayed.
@end itemize
Do NOT set this option directly via setq but use always customize!
@end defopt
@defopt sources-sort-ignore-case
Ignore case for sorting the source-files of the Sources-buffer. See
also @code{ecb-sources-sort-method}.
@end defopt
@defopt sources-sort-method
Defines how the source files are sorted.
@itemize @minus
@item @code{name}:
Sorting by name.
@item @code{extension}:
Sorting first by extension and then by name.
@item @code{nil}:
No sorting, means source files are displayed in the sequence returned
by @code{directory-files} (called without sorting).
@end itemize
See also @code{ecb-sources-sort-ignore-case}
@end defopt
@node ecb-methods, ecb-history, ecb-sources, Customizable options
@subsection Group ecb-methods
@noindent
This group contains settings for the methods-buffer in the ECB:
@defopt auto-expand-tag-tree
Expand the methods-tag-tree automatically if node invisible.
This option has only an effect if option @code{ecb-highlight-tag-with-point} is
switched on too. There are three possible choices:
@itemize @minus
@item @code{nil}:
No auto. expanding of the method buffer.
@item @code{expand-spec}:
Auto expand the method-buffer nodes if the node belonging to current
tag under point is invisible because its parent-node is collapsed.
But expanding is only done if the type of the tag under point in the
edit-buffer is contained in @code{ecb-methods-nodes-expand-spec}.
@item @code{all}:
Like expand-spec but expands all tags regardless of the setting in
@code{ecb-methods-nodes-expand-spec}.
@end itemize
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt auto-expand-tag-tree-collapse-other
Auto. expanding the tag-tree collapses all not related nodes. There
are several choices:
@itemize @minus
@item Only if on tag:
This means collapsing all nodes which have no relevance for the
currently highlighted node will be collapsed, because they are not
necessary to make the highlighted node visible. But do this only if
point stays onto a tag in the selected edit-window.
@item Always:
Same as before but collapse also when point doesn't stays on a tag
(e.g. between two defuns in elisp) in the selected edit-window. This
means in such a situation a full collapsing of the methods-buffer.
@item Never:
Do not automatically collapse the methods-buffer.
@end itemize
@end defopt
@defopt auto-update-methods-after-save
Automatically updating the ECB method buffer after saving a source.
@end defopt
@defopt default-tag-filter
Default tag-filters for certain files. This option allow to define
default tag-filters for certain files which are applied automatically
after loading such a file into a buffer. The possible filters are the
same as offered by the command @code{ecb-methods-filter} and they are
applied in the same manner - the only difference is they are applied
automatically. Please be aware that symbol-filters (e.g.
protection-symbols like public or private) must not be inserted with
quotes whereas a filter-regexp has to be inserted with surrounding
double-quotes! In addition backslashes in a regexp have to be doubled!
For each file-spec (a major-mode plus a file-regexp which both specify
a file for which filters should be applied) there can be as much
filters as needed - they are layered like with
@code{ecb-methods-filter} too.
Tag-classes which are completely hidden or excluded by the option
@code{ecb-show-tags} will never being displayed in the Methods-buffer
regardless of the filters of this option!
@end defopt
@defopt display-image-icons-for-semantic-tags
Display nice and pretty icons for semantic-tags in the Methods-buffer.
This option takes only effect if Emacs can display images and if
@code{ecb-tree-buffer-style} is set to @code{image}.
@end defopt
@defopt exclude-parents-regexp
Regexps which parent classes should not be shown in the methods buffer
(see also @code{ecb-show-parents}). If nil then all parents will be
shown if @code{ecb-show-parents} is not nil.
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt expand-methods-switch-off-auto-expand
Switch off auto expanding in the ECB-method buffer. If on then auto
expanding is switched off after explicit expanding or collapsing by
@code{ecb-expand-methods-nodes}.
This is done with @code{ecb-toggle-auto-expand-tag-tree} so after
the switch off the auto expanding feature can again switched on
quickly.
But after explicitly expanding/collapsing the methods-buffer to a
certain level the auto. expanding could undo this when the node
belonging to current tag under point in the current active edit-window
is invisible after @code{ecb-expand-methods-nodes} - then the auto.
expand feature would make this node immediately visible and destroys
the explicitly set expand-level.
@end defopt
@defopt font-lock-tags
Adds font-locking (means highlighting) to the ECB-method buffer.
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt highlight-tag-with-point
How to highlight the method or variable under the cursor.
@itemize @minus
@item @code{highlight-scroll}:
Always scroll the method buffer, so the current method of the
edit-window is highlighted in the method-window.
@item @code{highlight}:
Only highlight the current method of the edit window in the
method window if the method is visible in the method-window.
@item @code{nil}:
No highlighting is done.
@end itemize
See also @code{ecb-highlight-tag-with-point-delay}.
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt highlight-tag-with-point-delay
Time Emacs must be idle before current tag is highlighted. If nil
then there is no delay, means current tag is highlighted
immediately. A small value of about 0.25 seconds saves CPU resources
and you get even though almost the same effect as if you set no delay.
But such a delay prevents also ``jumping backward/forward'' during
scrolling within java-classes if point goes out of method-definition
into class-definition. Therefore the default value is a delay of 0.25
seconds.
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt methods-buffer-after-create-hook
Local hook running after the creation of the methods-buffer. Every
function of this hook is called once without arguments direct after
creating the methods-buffer of ECB and it's local key-map. So for
example a function could be added which performs calls of
@code{local-set-key} to define new keybindings only for the
methods-buffer of ECB.
@end defopt
@defopt methods-buffer-name
Name of the ECB methods buffer. Because it is not a normal buffer for
editing you should enclose the name with stars, e.g. `` *ECB
Methods*''.
If it is necessary for you you can get emacs-lisp access to the
buffer-object of the ECB-methods-buffer by this name, e.g. by a call
of @code{set-buffer}.
Changes for this option at runtime will take affect only after
deactivating and then activating ECB again!
@end defopt
@defopt methods-filter-replace-existing
How the methods-filter should be applied to existing filters. There
are three different choices:
@itemize @minus
@item @code{never}:
This is the default and means that calling @code{ecb-methods-filter}
always adds the new filter on top of already existing filters. So you
can combine several filter to one combined like this example: 'Display
only all public methods having the string ``test'' in its name.' With
this setting the filters can only be cleared by calling
@code{ecb-methods-filter} and then choosing ``nothing''.
@item @code{always}:
This means that @code{ecb-methods-filter} always clears a previous
filter before applying the new one.
@item @code{ask}:
ECB asks if the new filter should replace the existing ones.
@end itemize
@end defopt
@defopt methods-menu-sorter
Function which re-sorts the menu-entries of the directories buffer.
If a function then this function is called to sort the menu-entries of
the combined menu-entries of the user-menu-extensions of
@code{ecb-methods-menu-user-extension} and the built-in-menu
@code{ecb-methods-menu}. If nil then no special sorting will be done
and the user-extensions are placed in front of the built-in-entries.
For the guidelines for such a sorter-function see
@code{ecb-directories-menu-sorter}.
@end defopt
@defopt methods-menu-user-extension
Static user extensions for the popup-menu of the methods buffer. For
further explanations see @code{ecb-directories-menu-user-extension}.
The node-argument of a menu-function contains as data the semantic-tag
of the method/variable/tag for which the popup-menu has been opened.
Per default the static user-extensions are added at the beginning of
the built-in menu-entries of @code{ecb-methods-menu} but the whole
menu can be re-arranged with @code{ecb-methods-menu-sorter}.
@end defopt
@defopt methods-menu-user-extension-function
Dynamic user extensions for the popup-menu of the methods buffer. A
function which has to return a list in the same format like the option
@code{ecb-methods-menu-user-extension}. This function is called when
the user opens the popup-menu for the methods buffer. For an example
how such a function can be programmed see
@code{ecb-methods-menu-editwin-entries}.
If no dynamically evaluated menu-extensions should be added to the
methods-buffer the function has to return nil. Therefore the
default-value of this option is @code{ignore}.
Per default the dynamic user-extensions are added in front of the
static extensions of @code{ecb-methods-menu-user-extension} but the
whole menu can be re-arranged with @code{ecb-methods-menu-sorter}.
@end defopt
@defopt methods-nodes-collapse-spec
Semantic tag-types collapsed by @code{ecb-expand-methods-nodes}.
For valid values of this option see @code{ecb-methods-nodes-expand-spec}!
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt methods-nodes-expand-spec
Semantic tag-types expanded by @code{ecb-expand-methods-nodes}.
The value of this option is either the symbol @code{all} (all tags
are expanded regardless of their type) or a list of symbols where each
symbol is a valid semantic tag-type. For a description of semantic
tag types see option @code{ecb-show-tags}.
But this option also defines if bucket-nodes in the ECB-method-buffer
(e.g. ``[Variables]'') should be expanded. Therefore valid symbols for
this list are also all cars of the variable returned by
@code{ecb--semantic-symbol->name-assoc-list}.
If there is a bucket-name (the node-name stripped of the settings in
@code{ecb-bucket-node-display}) which is not contained as cdr in the
value returned by @code{ecb--semantic-symbol->name-assoc-list} then
the symbol with this bucket-name as name is also a valid symbol for
this list. Example: In ECB there are buckets ``[Parents]''. The
bucket-name is ``Parents'' and the valid symbol-name is then
@code{Parents}.
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt methods-separate-prototypes
Separate function-prototypes from the real functions. This is for
example useful for C++ and C because these languages distinct between
a method-prototype (rsp. function-prototype for C) and the method
(rsp. function for C) itself. If this option is not nil then ECB
separates the prototypes from the real function/methods. Then with
@code{ecb-show-tags} the user can define different display-settings
for each of them. If this option is nil then the prototypes and the
real functions are filled in the same bucket and displayed plain and
there is no sorting between prototypes and functions possible. If this
option is switched on then it is senseful that @code{ecb-show-tags}
contains for all modes which distinct between prototypes and real
functions/methods two entries for the tag-type 'function - see the
documentation of this option.
@end defopt
@defopt methods-show-node-info
When to display which node-info in the methods-buffer. Define which
node info should displayed after moving the mouse over a node (or
after a shift click onto the node) in the methods-buffer.
You can define ``when'' a node-info should be displayed: See
@code{ecb-directories-show-node-info} for the possible choices.
You can define what info should be displayed:
@itemize @minus
@item name:
Only the full node name is displayed.
@item name+type:
The full name + the type of the node (function, class, variable) is
displayed.
@end itemize
Do NOT set this option directly via setq but use always customize!
@end defopt
@defopt post-process-semantic-taglist
Define mode-dependent post-processing for the semantic-taglist. This
is an alist where the car is a major-mode symbol and the cdr is a list
of function-symbols of functions which should be used for
post-processing the taglist (returned by
@code{ecb--semantic-bovinate-toplevel}) for a buffer in this
major-mode. The first function in the list is called with current
semantic taglist of current buffer and must return a valid taglist
again. All other functions are called with the result-taglist of its
preceding function and have to return a new taglist again.
For oo-programming languages where the methods of a class can be
defined outside the class-definition (e.g. C++, Eieio) the function
@code{ecb-group-function-tags-with-parents} can be used to get a much
better method-display in the methods-window of ECB, because all method
implementations of a class are grouped together.
Another senseful usage is to filter out certain tags, e.g. prototype
tags in @code{c-mode}. For this you can set
@code{ecb-filter-c-prototyp-tags}.
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt show-only-positioned-tags
Show only nodes in the method-buffer which are ``jump-able''. If not nil
then ECB displays in the method-buffer only nodes which are
``jump-able'', i.e. after selecting it by clicking or with RET then ECB
jumps to the corresponding location in the edit-window. Example: With
CLOS or Eieio source-code there can exist some position-less nodes like
variable-attributes in a @code{defclass} form which are only displayed
if this option is nil. Displaying such nodes can be senseful even if
they can not be jumped.
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt show-tags
How to show tags in the methods buffer first time after find-file.
This functionality is set on a major-mode base, i.e. for every
major-mode a different setting can be used. The value of this option
is a list of cons-cells:
The car is either a major-mode symbol or the special symbol 'default
which means if no setting for a certain major-mode is defined then the
cdr of the 'default cons-cell is used. This option should always
contain a default-setting!
The cdr is a list where each element represents a type of tags:
@example
(<tag type> <display type> <sort method>)
@end example
There can be more than 1 element for a certain <tag type>. This is for
example useful for C++ and C because these languages distinct between
a method-prototype (rsp. function-prototype for C) and the method
(rsp. function for C) itself. The default value of these option
contains two entries for <tag type> is @code{function} whereas the
first one is responsible for the ``real'' methods (rsp. functions) and
the second one for the prototypes. So if the methods should be
flattened and the prototypes collapsed the show-tags-list for C++ and
C must contain two entries for <tag type> @code{function}, the first
one defined as @code{flattened} and the second one defined as
@code{collapsed}.
The tags in the methods buffer are displayed in the order as they appear in
this list.
@table @code
@item <tag type>
A Semantic tag type symbol (function, variable, rule, include etc.)
or one of the following:
@itemize @minus
@item @code{t}: All tag types not specified anywhere else in the list.
@item @code{parent}: The parents of a type.
@end itemize
@item <display type>
A symbol which describes how the tags of this type shall be shown:
@itemize @minus
@item @code{expanded}: The tags are shown in an expanded node.
@item @code{collapsed}: The tags are shown in a collapsed node.
@item @code{flattened}: The tags are added to the parent node.
@item @code{hidden}: The tags are not shown.
@end itemize
@item <sort method>
A symbol describing how to sort the tags of this type:
@itemize @minus
@item @code{name}:
Sort by the tag name.
@item @code{access}:
Sort by tag access (public, protected, private) and then by name.
@item @code{nil}:
Don't sort tags. They appear in the same order as in the source
buffer.
@end itemize
@end table
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt tag-display-function
Function to use for displaying tags in the methods buffer. This
functionality is set on major-mode base, i.e. for every major-mode a
different function can be used. The value of this option is a list of
cons-cells:
@itemize @minus
@item
The car is either a major-mode symbol or the special symbol 'default which
means if no function for a certain major-mode is defined then the cdr of
the 'default cons-cell is used.
@item
The cdr is the function used for displaying a tag in the related
major-mode.
@end itemize
Every function is called with 3 arguments:
@enumerate
@item The tag
@item The parent-tag of tag (can be nil)
@item The value of @code{ecb-font-lock-tags}.
@end enumerate
Every function must return the display of the tag as string,
colorized if the third argument is not nil.
The following functions are predefined:
@itemize @bullet
@item
For each element E of @code{ecb--semantic-format-function-alist}
exists a function with name ``ecb--<(cdr E)>''. These functions are
just aliase to the builtin format-functions of semantic. See the
docstring of these functions to see what they do. Example:
(semantic-name-nonterminal . semantic-format-tag-name) is an element
of @code{ecb--semantic-format-function-alist}. Therefore the
alias-function for this element is named
@code{ecb--semantic-format-tag-name}.
@item
For every cdr in @code{ecb--semantic-format-function-alist} with name
``semantic-XYZ'' a function with name ``ecb-XYC'' is predefined. The
differences between the semantic- and the ECB-version are:
@itemize @minus
@item
The ECB-version displays for type tags only the type-name and nothing
else (exception: In c++-mode a template specifier is appended to the
type-name if a template instead a normal class).
@item
The ECB-version displays type-tags according to the setting in
@code{ecb-type-tag-display}. This is useful for better recognizing
different classes, structs etc. in the ECB-method window.
@end itemize
For all tags which are not types the display of the ECB-version is
identical to the semantic version. Example: For
@code{ecb--semantic-format-tag-name} (one of the builtin semantic
formatters) the pendant is @code{ecb-format-tag-name}.
@end itemize
This functionality also allows the user to display tags as UML. To
enable this functionality set the function for a major-mode \(e.g.
@code{jde-mode}) to
@code{ecb--semantic-format-tag-uml-concise-prototype},
@code{ecb--semantic-format-tag-uml-prototype}, or
@code{ecb--semantic-format-tag-uml-abbreviate} the ECB-versions of
these functions.
If the value is @code{nil}, i.e. neither a function for a major-mode
is defined nor the special 'default, then
@code{ecb--semantic-format-tag-prototype} is used for displaying the
tags.
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt tag-jump-sets-mark
Set the mark after jumping to a tag from the ECB-method buffer. If
set the user can easily jump back.
@end defopt
@defopt tag-visit-post-actions
Actions to perform after visiting a tag from the Method-buffer. With
this option actions can be added which will be performed after
visiting the start of the tag in the source-buffer.
This functionality is set on a @code{major-mode} base, i.e. for every
@code{major-mode} a different setting can be used. The value of this
option is a list of cons-cells:
@itemize @minus
@item
The car is either a @code{major-mode} symbol or the special symbol
'default.
@item
The cdr is a list of action-functions or nil.
@end itemize
ECB first performs all actions defined for the special symbol 'default
(if any) and then all actions defined for current @code{major-mode}
(if any).
ECB offers some predefined senseful action-functions. Currently there
are: @code{ecb-tag-visit-highlight-tag-header}
@code{ecb-tag-visit-smart-tag-start}
@code{ecb-tag-visit-recenter} @code{ecb-tag-visit-recenter-top}
@code{ecb-tag-visit-goto-doc-start}
@code{ecb-tag-visit-narrow-tag} See the documentation of these
function for details what they do.
But you can add any arbitrary function if the following conditions are
fulfilled: The function gets the semantic tag as argument, returns the
(new) point after finishing its job and the function must not put the
point outside the tag-boundaries of the tag-argument.
@end defopt
@defopt type-tag-display
How to display semantic type-tags in the methods buffer. Normally
all tag displaying, colorizing and facing is done by semantic
according to the value returned by
@code{ecb--semantic-format-face-alist} and the semantic
display-function (e.g. one from
@code{ecb--semantic-format-tag-functions}). But sometimes a finer
distinction in displaying the different type specifiers of type-tags
can be useful. For a description when this option is evaluated look at
@code{ecb-tag-display-function}!
This functionality is set on a major-mode base, i.e. for every
major-mode a different setting can be used. The value of this option
is a list of cons-cells:
@itemize @bullet
@item
The car is either a major-mode symbol or the special symbol 'default which
means if no setting for a certain major-mode is defined then the cdr of
the 'default cons-cell is used.
@item
The cdr is a list of 3-element-lists:
@enumerate
@item
First entry is a semantic type specifier in string-form. Current
available type specifiers are for example ``class'', ``interface'',
``struct'', ``typedef'' and ``enum''. In addition to these ones there
is also a special ECB type specifier ``group'' which is related to
grouping tags (see @code{ecb-post-process-semantic-taglist} and
@code{ecb-group-function-tags-with-parents}). Any arbitrary
specifier can be set here but if it is not ``group'' or not known by
semantic it will be useless.
@item
Second entry is a flag which indicates if the type-specifier string
from (1.) itself should be removed (if there is any) from the display.
@item
Third entry is the face which is used in the ECB-method window to
display type-tags with this specifier. ECB has some predefined faces
for this (@code{ecb-type-tag-class-face},
@code{ecb-type-tag-interface-face}, @code{ecb-type-tag-struct-face},
@code{ecb-type-tag-typedef-face}, @code{ecb-type-tag-union-face},
@code{ecb-type-tag-enum-face} and @code{ecb-type-tag-group-face}) but
any arbitrary face can be set here. This face is merged with the faces
semantic already uses to display a tag,
i.e. the result is a display where all face-attributes of the ECB-face
take effect plus all face-attributes of the semantic-faces which are not
set in the ECB-face (with XEmacs this merge doesn't work so here the
ECB-face replaces the semantic-faces; this may be fixed in future
versions).
@end enumerate
@end itemize
The default value is nil means there is no special ECB-displaying of
type-tags in addition to the displaying and colorizing semantic
does. But a value like the following could be a useful setting:
@example
@group
((default
("class" t ecb-type-tag-class-face)
("group" nil ecb-type-tag-group-face))
(c-mode
("struct" nil ecb-type-tag-struct-face)
("typedef" nil ecb-type-tag-typedef-face)))
@end group
@end example
This means that in @code{c-mode} only ``struct''s and ``typedef''s are
displayed with special faces (the specifiers itself are not removed)
and in all other modes ``class''s and grouping-tags (see
@code{ecb-tag-display-function},
@code{ecb-group-function-tags-with-parents}) have special faces and
the ``class'' specifier-string is removed from the display.
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@defopt type-tag-expansion
Default expansion of semantic type-tags. Semantic groups type-tags in
different type-specifiers. Current available type specifiers are for
example ``class'', ``interface'', ``struct'', ``typedef'', ``union''
and ``enum''. In addition to these ones there is also a special ECB
type-specifier ``group'' which is related to grouping tags (see
@code{ecb-post-process-semantic-taglist}).
This option defines which type-specifiers should be expanded at
file-open-time. Any arbitrary specifier can be set here but if it is
not ``group'' or not known by semantic it will be useless.
This functionality is set on a major-mode base, i.e. for every
major-mode a different setting can be used. The value of this option
is a list of cons-cells:
@itemize
@item
The car is either a major-mode symbol or the special symbol
@code{default} which means if no setting for a certain major-mode is
defined then the cdr of the @code{default} cons-cell is used.
@item
The cdr is either a list of type-specifiers which should be expanded
at file-open-time or the symbol @code{all-specifiers} (then a type-tag
is always expanded regardless of its type-specifier).
@end itemize
This options takes only effect for semantic-sources - means sources
supported by semantic!
@end defopt
@node ecb-history, ecb-analyse, ecb-methods, Customizable options
@subsection Group ecb-history
@noindent
This group contains settings for the history-buffer in the ECB:
@defopt history-buffer-after-create-hook
Local hook running after the creation of the history-buffer. Every
function of this hook is called once without arguments direct after
creating the history-buffer of ECB and it's local key-map. So for
example a function could be added which performs calls of
@code{local-set-key} to define new keybindings only for the
history-buffer of ECB.
@end defopt
@defopt history-buffer-name
Name of the ECB history buffer. Because it is not a normal buffer for
editing you should enclose the name with stars, e.g. ``*ECB
History*''.
If it is necessary for you you can get emacs-lisp access to the
buffer-object of the ECB-history-buffer by this name, e.g. by a call
of @code{set-buffer}.
Changes for this option at runtime will take affect only after
deactivating and then activating ECB again!
@end defopt
@defopt history-exclude-file-regexps
List of regexps which exclude source-files from being historized. Be
aware that each always full filenames (ie. incl. full path) are
matched against these regexps! Therefore be carefore with regexps
beginning with ^!
@end defopt
@defopt history-item-name
The name to use for items in the history buffer.
@end defopt
@defopt history-menu-sorter
Function which re-sorts the menu-entries of the directories buffer.
If a function then this function is called to sort the menu-entries of
the combined menu-entries of the user-menu-extensions of
@code{ecb-history-menu-user-extension} and the built-in-menu
@code{ecb-history-menu}. If nil then no special sorting will be done
and the user-extensions are placed in front of the built-in-entries.
For the guidelines for such a sorter-function see
@code{ecb-directories-menu-sorter}.
@end defopt
@defopt history-menu-user-extension
Static user extensions for the popup-menu of the history buffer. For
further explanations see @code{ecb-directories-menu-user-extension}.
The node-argument of a menu-function contains as data the filename of
the source for which the popup-menu has been opened.
Per default the static user-extensions are added at the beginning of
the built-in menu-entries of @code{ecb-history-menu} but the whole
menu can be re-arranged with @code{ecb-history-menu-sorter}.
@end defopt
@defopt history-menu-user-extension-function
Dynamic user extensions for the popup-menu of the history buffer. A
function which has to return a list in the same format like the option
@code{ecb-history-menu-user-extension}. This function is called when
the user opens the popup-menu for the history buffer.
If no dynamically evaluated menu-extensions should be added to the
history-buffer the function has to return nil. Therefore the
default-value of this option is @code{ignore}.
Per default the dynamic user-extensions are added in front of the
static extensions of @code{ecb-history-menu-user-extension} but the
whole menu can be re-arranged with @code{ecb-history-menu-sorter}.
@end defopt
@defopt history-show-node-info
When to display which node-info in the history-buffer. Define which
node info should displayed after moving the mouse over a node (or
after a shift click onto the node) in the history-buffer.
You can define ``when'' a node-info should be displayed: See
@code{ecb-directories-show-node-info} for the possible choices.
You can define what info should be displayed: See
@code{ecb-directories-show-node-info} for the possible choices.
Do NOT set this option directly via setq but use always customize!
@end defopt
@defopt history-sort-ignore-case
Ignore case for sorting the history-entries. See also
@code{ecb-history-sort-method}.
@end defopt
@defopt history-sort-method
Defines how the entries in the history-buffer are sorted.
@itemize @minus
@item @code{name}:
Sorting by name (default).
@item @code{extension}:
Sorting first by extension and then by name.
@item @code{nil}:
No sorting, means the most recently used buffers are on the top of the
history and the seldom used buffers at the bottom.
@end itemize
See also @code{ecb-history-sort-ignore-case}.
@end defopt
@defopt kill-buffer-clears-history
Define if @code{kill-buffer} should also clear the history. There are
three options:
@itemize @minus
@item @code{auto}:
Removes automatically the corresponding history-entry after the buffer
has been killed.
@item @code{ask}:
Asks, if the history-entry should be removed after the kill.
@item @code{nil}:
@code{kill-buffer} does not affect the history (this is the default).
@end itemize
@end defopt
@node ecb-analyse, ecb-layout, ecb-history, Customizable options
@subsection Group ecb-analyse
@defopt analyse-bucket-element-face
Basic face for displaying elements of buckets in the
ECB-analyse-buffer. This defines the basic face for the elements of
category-buckets like Context, Prefix, Completions etc. in the
ECB-analyse-buffer.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt analyse-bucket-node-face
Basic face for displaying a bucket-node in the ECB-analyse-buffer.
This defines the basic face for the bucket-nodes like Context, Prefix,
Completions etc. in the ECB-analyse-buffer.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt analyse-buffer-after-create-hook
Local hook running after the creation of the analyse-buffer. Every
function of this hook is called once without arguments direct after
creating the analyse-buffer of ECB and it's local key-map. So for
example a function could be added which performs calls of
@code{local-set-key} to define new key-bindings only for the
analyse-buffer of ECB.
@end defopt
@defopt analyse-buffer-name
Name of the ECB analyse buffer. Because it is not a normal buffer for
editing you should enclose the name with stars, e.g. ``*ECB
Analyse*''.
If it is necessary for you you can get emacs-lisp access to the
buffer-object of the ECB-analyse-buffer by this name, e.g. by a call
of @code{set-buffer}.
Changes for this option at runtime will take affect only after
deactivating and then activating ECB again!
@end defopt
@defopt analyse-collapsed-buckets
Buckets collapsed when displaying the current semantic analysis. The
semantic analyse-modul offers several categories of analysis which are
called buckets here. These are for example:
Context: The current context, which is the current function/method,
variable, class etc. (what exactly depends on the programming
language) point is in. This means not the current
function/method/variable/class-name point stand on but the current
surrounding context. Example: If point stays somewhere within a
defun-definition in emacs-lisp or within a java-method then this defun
rsp. method is the context. In object oriented languages this can be
the full hierachy, i.e. not only the current method, but the current
method, the class of this method, the superclass of this class and so
on!
Arguments: The arguments of the context if the context is a
function/method.
Local Variables: All accessible and bound local variables visible at
current point.
Prefix: The currently parsed prefix, which is mostly the current
identifier point stands on.
Assignee: See the semantic user-manual
Function: Current function-name point stands on.
Argument #: When point is located within a function-call then this is
the number of the argument point stands on.
Completions: All possible completions for current prefix (see above).
This is probably the most helpful bucket.
If one of these categories/buckets are not needed per default then add
the bucket-name (s.a.) to this option and ECB will per default
collapse this bucket. So most needed buckets are better visible in the
analyse-buffer.
@end defopt
@defopt analyse-face
Face used for highlighting current entry in the analyse buffer. If the
face @code{ecb-default-highlight-face} is used then the display of all
ECB-tree-buffers can be changed by modifying only the face
@code{ecb-default-highlight-face}.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt analyse-fontified-buckets
Buckets whose elements should be fontified as in the methods-buffer.
If the name of a category/bucket is contained in this option then all
elements of this bucket will be displayed as in the methods-buffer -
at least if an element is a semantic-tag. This means if
@code{ecb-font-lock-tags} is not nil these elements will be fontified
and also displayed with an appropriate icon if possible. The default
value does this only for the Context-bucket because for most of the
other buckets this makes not really much sense.
For available buckets see @code{ecb-analyse-collapsed-buckets}.
For the faces used to display a bucket-node itself or bucket-elements
not fontified see the options @code{ecb-analyse-bucket-node-face} rsp.
@code{ecb-analyse-bucket-element-face}.
@end defopt
@defopt analyse-gen-tag-info-fn
Which info should be displayed for a tag of the analyse-buffer. If nil
then the default information about a tag will be displayed. If a
function then this function gets as argument the tag for which
tag-information should be displayed. This function has to return a
string which will be then display as tag-info. This string has to be
fully formatted (e.g. must already include line-breaks if the tag-info
should be displayed in several lines).
See @code{ecb-analyse-show-tag-info-fn} how the tag-info is displayed.
@end defopt
@defopt analyse-general-face
Basic face for the ECB analyse buffer. This defines the basic face the
whole history buffer should displayed with. If the face
@code{ecb-default-general-face} is used then the display of all
ECB-tree-buffers can be changed by modifying only the face
@code{ecb-default-general-face}.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt analyse-show-node-info
When to display which node-info in the history-buffer. Define which
node info should displayed after moving the mouse over a node (or
after a shift click onto the node) in the history-buffer.
You can define ``when'' a node-info should be displayed: See
@code{ecb-directories-show-node-info} for the possible choices.
You can define what info should be displayed:
@itemize @minus
@item name: The full name of the node
@item full-info: All infos available to a node.
@end itemize
Do NOT set this option directly via setq but use always customize!
@end defopt
@defopt analyse-show-tag-info-fn
How to display the tag-info for a tag of the analyse-buffer. The value
of this option is a function which will be called with the info-string
generated for the current tag of the analyse-buffer. This function
must do all things necessary for displaying this info. When this
function is called the window stored in
@code{ecb-last-edit-window-with-point} is the selected window!
ECB offers two builtin ways: Display the info in the echo-area (via
the function @code{message}) or in a temp-buffer in the edit-area (via
the function @code{ecb-analyse-show-tag-info-in-temp-buffer}). Default
is echo-area-display.
See also @code{ecb-analyse-gen-tag-info-fn}.
@end defopt
@node ecb-layout, ecb-compilation, ecb-analyse, Customizable options
@subsection Group ecb-layout
@noindent
This group contains settings for the screen-layout of the ECB:
@defopt activate-before-new-frame-created-hook
Normal hook run before the new ECB-frame is created if
@code{ecb-new-ecb-frame} is not nil (otherwise this hook is not
evaluated).
@end defopt
@defopt advice-window-functions
Advice functions to be more intelligent if used with ECB. You can
choose the following functions to be adviced by ECB so they behave as
if the edit-window(s) of ECB would be the only windows(s) of the
ECB-frame:
@itemize @bullet
@item @code{other-window}
For this one see also the option @code{ecb-other-window-behavior}!
@item @code{delete-window}
@item @code{delete-other-windows}
@item @code{delete-windows-on}
@item @code{split-window-horizontally}
@item @code{split-window-vertically}
@item @code{split-window}
If this advice is enabled then @code{split-window-vertically} and
@code{split-window-horizontally} are autom. enabled too!
@item @code{switch-to-buffer}
@item @code{switch-to-buffer-other-window}
@item @code{display-buffer}
Especially if @code{ecb-compile-window-height} is not nil it is
strongly recommended not to disable this advice!
@item @code{other-window-for-scrolling}
If this advice is enabled then the behavior of the following functions
depends on @code{ecb-other-window-behavior}:
@itemize @minus
@item @code{scroll-other-window}
@item @code{scroll-other-window-down}
@item @code{beginning-of-buffer-other-window}
@item @code{end-of-buffer-other-window}
@end itemize
@item @code{balance-windows}:
Only the edit-windows are balanced
@end itemize
For working most conveniently with ECB it is the best to advice all
these functions, because then all the standard shortcuts of these
functions are also usable with ECB without doing anything else. Also
other packages can interact best with ECB if these functions are all
adviced. If these adviced functions are called in another frame than
the ECB-frame they behave all exactly like the not adviced versions!
But please read also the following:
Normally all packages should work correct with ECB and its adviced
functions but if there occur problems with a package cause of some of
these adviced functions ECB offers the following fall-back solution:
@enumerate
@item
Deactivate in @code{ecb-advice-window-functions} all the
adviced-functions which make problems with other packages.
@item
For every of the advice-able functions <adv-func> ECB offers a
interactively function named ``ecb-<adv-func>'' which does exactly the
same as the adviced version of <adv-func>. Use ``ecb-<adv-func>''
instead the original one to get the proper ECB behavior even if the
function is not adviced anymore.
@item
You can bind in @code{ecb-activate-hook} the standard-shortcut of
<adv-func> to ``ecb-<adv-func>'' and rebind it in
@code{ecb-deactivate-hook} to <adv-func>.
@item
Now you have the best of both worlds: The problematic package works
and you have the ECB-behavior of <adv-func> as if it would be adviced.
@end enumerate
Here is an example: Suppose you must deactivating the advice for
@code{switch-to-buffer-other-window}. Then you deactivate this
function with this option and you can use
@code{ecb-switch-to-buffer-other-window} instead. Bind the shortcut
you normally use for @code{switch-to-buffer-other-window} to
@code{ecb-switch-to-buffer-other-window} (use @code{ecb-activate-hook}
for this) and rebind it to the original function in the
@code{ecb-deactivate-hook}.
@end defopt
@defopt advice-window-functions-signal-error
Signal an error if an adviced function can not do its job. If not nil
then an error is signaled if one of the adviced functions (see
@code{ecb-advice-window-functions}) can not do its job. So for example
if the user tries to split the compile-window or an ecb-tree-window or
if one tries to switch to another buffer in one of the
ecb-tree-windows. For details see the documentation of each of the
adviced functions to get info when an error is signaled.
If this option is nil then no error is signaled but the called adviced
function does simply nothing.
Default is nil but it can also be useful to signal errors - so you see
when call a function in a situation which is not supported by this
function.
@end defopt
@defopt fix-window-size
Fix size of the ECB-windows/buffers even after frame-resizing. The fix
type (valid values are nil, t, width and height) can either be set on
a layout-basis (means a different value for each layout) or one value
can be set for all layouts.
For a detailed description of the valid values see description of
@code{window-size-fixed} which is newly introduced in GNU Emacs 21 and
is only available there. Therefore this option takes only effect with
GNU Emacs 21.
Note1: Manually resizing the ECB-windows via @code{enlarge-window},
@code{shrink-window}, @code{mouse-drag-vertical-line} and
@code{mouse-drag-mode-line} is still possible even if the window-sizes
are fixed for frame-resizing!
Note2: The description of @code{window-size-fixed} in the
Elisp-info-manual is more detailed than the description offered by
@kbd{C-h v}!
Note3: With current Emacs 21.2.X there seems to be no distinction
between @code{width}, @code{height} and @code{t}. Therefore this
option takes no effect (means all ecb-windows have always unfixed
sizes) if @code{ecb-compile-window-height} is not @code{nil}.
Per default no window-size fixing has been done.
@end defopt
@defopt hide-ecb-windows-after-hook
Hooks run direct after the ECB windows have been hidden. Hiding was
done either by @code{ecb-toggle-ecb-windows} or
@code{ecb-hide-ecb-windows}.
IMPORTANT: Hiding the ECB-windows is internally done by calling
@code{ecb-redraw-layout} and therefore also the hooks
@code{ecb-redraw-layout-before-hook} and
@code{ecb-redraw-layout-after-hook} are evaluated. The hook-sequence
is analogous to that described in
@code{ecb-show-ecb-windows-after-hook}.
@end defopt
@defopt hide-ecb-windows-before-hook
Hook run direct before the ECB windows will be hidden. Hiding is done
either by @code{ecb-toggle-ecb-windows} or
@code{ecb-hide-ecb-windows}. This means that at runtime of this hook
all the ECB-tree-windows of current layout are visible.
IMPORTANT: Hiding the ECB-windows is internally done by calling
@code{ecb-redraw-layout} and therefore also the hooks
@code{ecb-redraw-layout-before-hook} and
@code{ecb-redraw-layout-after-hook} are evaluated. The hook-sequence
is analogous to that described in
@code{ecb-show-ecb-windows-before-hook}.
@end defopt
@defopt ignore-display-buffer-function
Adviced @code{display-buffer} ignores @code{display-buffer-function}.
This means, that the adviced version of @code{display-buffer} (see
@code{ecb-advice-window-functions}) ignores the value of
@code{display-buffer-function} when called for the @code{ecb-frame}.
If this variable should not be ignored then the function of
@code{display-buffer-function} is completely responsible which window
is used for the buffer to display - no smart ECB-logic will help to
deal best with the ECB-window-layout! You can define if and when
@code{display-buffer-function} should be ignored:
@itemize @minus
@item
only when persistent compile window is used - i.e. if
@code{ecb-compile-window-height} is not nil
@item
always when ECB is active - that means ignore when ECB is active
otherwise not - this is the default value
@item
never, the adviced version of @code{display-buffer} always uses the
value of @code{display-buffer-function} if the value is a function.
@end itemize
@end defopt
@defopt ignore-special-display
Ignore special-display-handling. This means, that all values of
@code{special-display-function}, @code{special-display-buffer-names}
and @code{special-display-regexps} are ignored
@itemize
@item
only when persistent compile window is used - i.e. if
@code{ecb-compile-window-height} is not nil - this is the default
value.
@item
always when ECB is active - that means no special-display-handling of
buffers when ECB is active
@item
never, i.e. special-dislay-handling depends on the values of the
options @code{special-display-function},
@code{special-display-buffer-names} and
@code{special-display-regexps}.
@end itemize
@end defopt
@defopt layout-always-operate-in-edit-window
Adviced window functions work always in the edit-window. If we are in
an ECB special buffer (methods, directories, etc), and any of the
adviced windowing functions is called interactively (see
@code{ecb-advice-window-functions}), we will select first an
edit-window according to the value of
@code{ecb-mouse-click-destination}. This is useful if you have any
functions that use such functions and you don't want them to fail with
an error complaining that the current buffer can not be split, or
something similar.
Because this may not be desirable in all situations and for all
adviced functions this can be enabled separately for every advicable
function (see also @code{ecb-advice-window-functions}). If the symbol
of an adviced function is contained in the value of this option, then
a edit-window is first selected otherwise either an error is
reported or some other special reaction (depends on
@code{ecb-advice-window-functions-signal-error}); see the
documentation of the adviced functions for this.
For @code{other-window}, @code{other-window-for-scrolling} and
@code{switch-to-buffer-other-window} this makes no sense, therefore
you can not enable this for them.
Per default this is enabled for @code{switch-to-buffer} and
@code{display-buffer}.
@end defopt
@defopt layout-debug-mode
Write debug-information about layout-operations in the
Messages-buffer. Normally there should be no need to set this option
to true but if there are problems to display buffers in the
compile-window of ECB (e.g. buffers which should be displayed there
aren't or the temporally enlarging-mechanism does not do what you
think it should do etc...) then please do the following steps:
@enumerate
@item
Set @code{ecb-layout-debug-mode} to not nil
@item
Reproduce the wrong behavior exactly by repeating all the operations
which lead to the problem.
@item
Now send immediately a bug report with
@code{ecb-submit-problem-report}.
@item
Set @code{ecb-layout-debug-mode} back to nil if you do not want
further debugging output in the *Messages* buffer
@end enumerate
@end defopt
@defopt layout-name
Select a window layout of ECB. Value is any arbitrary string. There are
four different types of layouts: left, right, top and left-right,
which means the location of the ECB-tree-windows in the ECB-frame.
Currently there are 20 predefined layouts; names see below. You can
savely try out any of them by changing this value and saving it only
for the current session. If you are sure which layout you want you can
save it for future sessions. To get a picture of the layout for name
<name> call `ecb-show-layout-help'. @code{ecb-layout-function-9}.
Currently available layouts:
@itemize @bullet
@item Left layouts:
left1 left2 left3 left4 left5 left6 left7 left8 left9 left10 left11
left12 left13 left14 left15
@item Right layouts:
right1
@item Top layouts:
top1 top2
@item Left-right layouts:
leftright1 leftright2
@end itemize
Regardless of the settings you define here: If you have destroyed or
changed the ECB-screen-layout by any action you can always go back to
this layout with @code{ecb-redraw-layout}
@end defopt
@defopt layout-window-sizes
Specifies the sizes of the ECB windows for each layout. The easiest
way (and also the strongly recommended way) to change this variable is
to change the window sizes by dragging the window borders using the
mouse and then store the window sizes by calling the command
@code{ecb-store-window-sizes}. Next time the layout is redrawn the
values stored in this option will be used.
If @code{ecb-store-window-sizes} is used then the windows sizes are
stored per default as fractions of current frame-width and -height of
the ecb-frame, so the stored values will ``work'' for other frame
sizes too. But if you call @code{ecb-store-window-sizes} with a
prefix-argument then the fixed values of current width and height are
stored!
If this option is set ``by hand'' (i.e. not by
@code{ecb-store-window-sizes}) then the following is important:
@itemize @minus
@item
It is recommended to use fractions of frame-width and -height!.
@item
The order of the sequence of the inserted window sizes must be the same as
@code{other-window} (the not-adviced version!) would walk!
@end itemize
@end defopt
@defopt maximize-ecb-window-after-selection
If not nil maximize current tree-window after selection. When
selecting another not-tree-window after such an automatic maximizing
all tree-windows of current layout are displayed again. But a
tree-window is not maximized if either a node has been selected via
primary- oder secondarc mouse-button or the popup-menu of that
tree-buffer has been opened.
@end defopt
@defopt maximize-next-after-maximized-select
Maximizes the next logical tree-window after a maximized
node-selection. Selecting a node in a maximized tree-window is handled
very smart by ECB:
If a tree-buffer-name is not contained in this option then selecting a
node in this maximized tree-buffer automatically ``minimizes'' that
tree-window (i.e. displays all windows of the current layout) so the
user can perform the next logical step (e.g. the next logical step
after selecting a directory in the directories-buffer is to select a
source-file - therefore the sources-buffer of current layout has to be
displayed - if the current layout contains one; the next logical step
of selecting a source-file is probably to jump to a certain tag via
the methods-buffer).
If a tree-buffer-name is contained in this option then selecting a
node in this tree-buffer automatically maximizes the next logical
tree-window (e.g. directories --> sources, sources/history -->
methods). But if the current maximized tree-buffer is also contained
in the option @code{ecb-tree-do-not-leave-window-after-select} (see
also the tree-buffer-command
@code{ecb-toggle-do-not-leave-window-after-select} which is bound to
@code{C-t} in each tree-buffer) then ECB does *not* maximize the next
logical tree-window but point stays in the currently maximized
tree-buffer so for example the user can select more than one node
(e.g. more than one source-file from the sources-buffer.
The tree-buffer-name can either be defined as plain string or with a
symbol which contains the buffer-name as value. The latter one is
recommended for the builtin ECB-tree-buffers because then simply the
related option-symbol can be used (e.g.
@code{ecb-directories-buffer-name}, @code{ecb-sources-buffer-name} or
@code{ecb-history-buffer-name}).
In future versions this option will probably also allow to define the
next logical tree-buffer for a tree-buffer - currently this is
hard-coded as follows:
@itemize @minus
@item directories --next-logical--> sources
@item sources --next-logical--> methods
@item history --next-logical--> methods.
@end itemize
@end defopt
@defopt maximize-next-after-maximized-select
Maximizes the next logical tree-window after a maximized
node-selection. Selecting a node in a maximized tree-window is handled
very smart by ECB:
If this option is nil then selecting a node in a maximized
directories- sources- or history-tree-buffer automatically
``minimizes'' that tree-window (i.e. displays all windows of the
current layout) so the user can perform the next logical step (e.g.
the next logical step after selecting a directory in the
directories-buffer is to select a source-file - therefore the
sources-buffer of current layout has to be displayed - if the current
layout contains one; the next logical step of selecting a source-file
is probably to jump to a certain tag via the methods-buffer).
If this option is not nil then selecting a node in a maximized
directories- sources- or history-tree-buffer automatically maximizes
the next logical tree-window (directories --> sources, sources/history
--> methods). But if the current maximized tree-buffer is contained in
the option @code{ecb-tree-do-not-leave-window-after-select} (see also
the tree-buffer-command
@code{ecb-toggle-do-not-leave-window-after-select} which is bound to
@code{C-t} in each tree-buffer) then ECB does *not* maximize the next
logical tree-window but point stays in the currently maximized
tree-buffer so for example the user can select more than one
source-file from the sources-buffer.
@end defopt
@defopt new-ecb-frame
Create a new frame at activation time of ECB.
@end defopt
@defopt other-window-behavior
The behavior of ECB concerning getting an ``other window''. This has
an effect if either @code{other-window} or
@code{other-window-for-scrolling} is adviced by ECB, see
@code{ecb-advice-window-functions}. The following settings are
possible:
@code{all}:
ECB will cycle through all windows of the ECB-frame or scroll simply
the next window in the ECB-frame, means it behaves like the original
@code{other-window} rsp. the original
@code{other-window-for-scrolling}.
@code{only-edit}:
ECB will only cycle through the edit-windows of ECB or only scroll
another edit-window. If the selected window is not an edit-window then
it behaves like with value @code{all}.
@code{edit-and-compile}:
Like @code{only-edit} plus the compile window if any. If the selected
window is neither an edit-window nor the compile-window then it
behaves like with value @code{all}.
@code{smart}:
With this setting ECB tries to choose the
@code{other-window}-destination or the ``other window'' to scroll in a
smart and intuitive way: If point is in one of the edit-windows and if
the edit-area is splitted then always the ``next'' edit-window is
choosen (whereas the next edit-window of the last edit-window is the
first edit-window)- if the edit-area is unsplitted then the
compile-window is used if there is one. In the context of an
@code{other-window}-call the @var{ARG} of @code{other-window} will be
taken into account.
If one of the special ecb-windows is selected then always the ``next''
ecb-window is choosen (whereas the next ecb-window of the last
ecb-window is the first ecb-window). In the context of an
@code{other-window}-call the @var{ARG} of @code{other-window} will be
taken into account. If there is only one ecb-window then ECB considers
also the edit-windows
If the compile-window is selected then always the last edit-window
which had the point will be used unless @code{other-window} has been
called with a prefix-argument unequal 1.
If there is an active minibuffer:
Regardless of the allowed values above ECB handles the situation of an
active minibuffer during a call to @code{other-window} or
@code{scroll-other-window} like follows:
If the minibuffer-window is selected then ECB always chooses the
window @code{minibuffer-scroll-window} points to (when this variable
is set, otherwise the compile-window or the last selected edit-window
is choosen) when the called command is called to choose the 1. next
window (always true for scrolling another window or true when
@code{other-window} called without prefix-arg or with prefix-arg equal
1). Otherwise the window ARG steps away is choosen (in case of
@code{other-window}).
If there is an active minibuffer but the minibuffer-window is not
selected then @code{other-window} and @code{scroll-other-window}
behave like the original version.
In addition to the allowed values above the value of this option can
also be a function:
A function:
This function gets seven arguments:
@enumerate
@item
A canonical list of all currently visible windows of the
@code{ecb-frame}
@item
A canonical list of all currently visible edit-windows
@item
A canonical list of all currently visible ecb-windows
@item
The window-object of the compile-window if there is any.
@item
The minibuffer-window of the ECB-frame if there is an active
minibuffer.
@item
The result of the function @code{ecb-where-is-point} - see the
documentation of this function for details.
@item
An integer which indicates how many steps away from the current
selected window the ``other-window'' is. Is nil when this function is
called in another context then for @code{other-window}.
@end enumerate
The function has to return a window-object which is then used as
``other window'' for the command @code{other-window} or for scrolling
another window (e.g. with @code{scroll-other-window}). Such a function
has to handle properly all situation for itself.
@code{ecb-get-other-window-smart} is an example for such a function.
@end defopt
@defopt redraw-layout-after-hook
Hooks run direct before the ECB windows will be shown either by
@code{ecb-toggle-ecb-windows} or @code{ecb-show-ecb-windows}. This
means that at runtime of this hook the ECB-windows are already
visible.
@end defopt
@defopt redraw-layout-before-hook
Hooks run direct before the ECB-layout will be redrawn by either
@code{ecb-redraw-layout}.
@end defopt
@defopt redraw-layout-quickly
If non-nil, we will attempt to redraw the layout quickly. Please read
also carefully the documentation of @code{ecb-redraw-layout}.
@end defopt
@defopt select-edit-window-on-redraw
Select the first edit window on @code{ecb-redraw-layout}.
@end defopt
@defopt show-ecb-windows-after-hook
Hooks run direct before the ECB windows will be shown either by
@code{ecb-toggle-ecb-windows} or @code{ecb-show-ecb-windows}. This
means that at runtime of this hook the ECB-windows are already
visible.
IMPORTANT: Showing the hidden ECB-windows is internally done by
calling @code{ecb-redraw-layout} and therefore also the hooks
@code{ecb-redraw-layout-before-hook} and
@code{ecb-redraw-layout-after-hook} are evaluated. So there is the
following sequence of hooks during the process of showing the hidden
ECB-windows:
@enumerate
@item @code{ecb-show-ecb-windows-before-hook}
@item @code{ecb-redraw-layout-before-hook}
@item <redrawing the layout to show the hidden ECB-windows>
@item @code{ecb-redraw-layout-after-hook}
@item @code{ecb-show-ecb-windows-after-hook}
@end enumerate
So be aware which code you add to which hook!
@end defopt
@defopt show-ecb-windows-before-hook
Hooks run direct before the ECB windows will be shown either by
@code{ecb-toggle-ecb-windows} or @code{ecb-show-ecb-windows}. This
means that at runtime of this hook the ECB-windows are still hidden.
IMPORTANT: Showing the hidden ECB-windows is internally done by
calling @code{ecb-redraw-layout} and therefore also the hooks
@code{ecb-redraw-layout-before-hook} and
@code{ecb-redraw-layout-after-hook} are evaluated. So there is the
following sequence of hooks during the process of showing the hidden
ECB-windows:
@enumerate
@item @code{ecb-show-ecb-windows-before-hook}
@item @code{ecb-redraw-layout-before-hook}
@item <redrawing the layout to show the hidden ECB-windows>
@item @code{ecb-redraw-layout-after-hook}
@item @code{ecb-show-ecb-windows-after-hook}
@end enumerate
So be aware which code you add to which hook!
@end defopt
@defopt split-edit-window-after-start
Sets if and how the edit window should be splitted after ECB-start.
But be aware: This option determines only if and how the edit-window
should be splitted at start-time of ECB. There are five different
values allowed for this option:
@itemize @minus
@item @code{nil}:
Do not split the edit-area of ECB after activation, i.e. there will be
only one edit-window after starting ECB.
@item @code{horizontal}:
Split the edit-area in 2 edit-windows side by side.
@item @code{vertical}:
Split the edit-area in 2 edit-windows, one above the other.
@item @code{before-activation}:
Split the edit-area as before the ECB-start, i.e. the edit-area will
have after start a window-layout as the whole frame had before the
start of ECB.
@item @code{before-deactivation}:
Split the edit-area into a window-layout ECB had in its edit-area
direct before the ECB-deactivation. This value preserves the full
state between activations of ECB, i.e. the visibility of the
ECB-windows, the visibility of a compile-window and also the full
split-state of the edit-area. But this can only be done if important
layout-options have not been changed in the meanwhile. These are the
options @code{ecb-layout-name}, @code{ecb-compile-window-height},
@code{ecb-compile-window-width}, @code{ecb-windows-width} and
@code{ecb-windows-height}.
@end itemize
Default value is @code{before-deactivation}.
Some remarks to the value @code{before-activation}: If this value has
been set then ECB needs three permanent adivces even when ECB is
deactivated: @code{split-window}, @code{delete-window} and
@code{delete-other-windows}. But these advices do not change any
behavior of these functions but only storing in an internal
ECB-variable the facts that a window has been splitted or deleted. In
addition to this these advices are 100% error-save, means the
functionality of the original functions will be performed in every(!)
case even if within the advice an error occurs (but normally there can
no errors occur in these advices because they are very simple).
Conclusion: If you want really all ECB-advices being disabled after
deactivating ECB then you have to set this option to other values then
@code{before-activation}. But setting this variable to this value is
really completely save.
@end defopt
@defopt toggle-layout-sequence
Toggle sequence for layout toggling with @code{ecb-toggle-layout}.
Every element of this list has to be a valid layout-name i.e. either
one of the predefined layouts or one of the user-defined layouts.
You can add here as many layouts as you want but to use this option
most effective you should not add more than 2 or 3 layouts so every
layout can be accessed very fast by toggling with
@code{ecb-toggle-layout}. It is also senseful to add layouts which
have the same principal outline, i.e. all their tree-buffers are on
the same side of the frame and the tree-buffer-''column'' (or
-''row'') has identical size for the layouts.
Recommended values are for example:
@itemize @minus
@item (``left10'' ``left15''), toggles between methods and directories/history
@item (``left10'' ``left13''), toggles between methods and directories
@item (``left10'' ``left14''), toggles between methods and history
@item (``left10'' ``left13'' ``left14''), toggles between methods, history and directories
@end itemize
See also option @code{ecb-show-sources-in-directories-buffer}.
This option makes only sense if the value is a list with more than 1
element!
@end defopt
@defopt windows-height
The height of the ECB windows in lines for top-layouts. If the number
is less than 1.0 the width is a fraction of the frame height.
@end defopt
@defopt windows-width
The width of the ECB windows in columns for left- and right layouts.
If the number is less than 1.0 the width is a fraction of the frame
width.
@end defopt
@node ecb-compilation, ecb-create-layout, ecb-layout, Customizable options
@subsection Group ecb-compilation
@noindent
This group contains settings for the compile window of ECB:
@defopt compilation-buffer-names
Additional buffer names that should be displayed in the
compile-window. Buffer names can either be defined as strings or as
regexps. If the buffer-name of a buffer matches one of the defined
string or regexp then it will be displayed in the compile-window of
ECB even if @code{compilation-buffer-p} says nil for this buffer.
It is not recommended to add the eshell-buffer-names to this list
because ECB already handles the eshell-integration as best as
possible (@pxref{Using eshell}).
See also the options @code{ecb-compilation-major-modes} and
@code{ecb-compilation-predicates}.
@end defopt
@defopt compilation-major-modes
Additional major-mode that should be displayed in the compile-window.
All buffers of a major-mode contained in this list are displayed in
the compile-window even if @code{compilation-buffer-p} says nil for
such a buffer.
It is not recommended to add @code{eshell-mode} to this list because
ECB already handles the eshell-integration as best as possible
(@pxref{Using eshell}).
@end defopt
@defopt compilation-predicates
Predicates when a buffer should be treated as compilation-buffer.
Every element of this list has to be a function or lambda-expression
which gets as argument a buffer-object and which has to return not nil
when this buffer should be treated as compilation-buffer (even if
@code{compilation-buffer-p} says nil) and therefore be displayed in
the compile-window of ECB (if there is any).
In combination with the values of @code{ecb-compilation-buffer-names}
and @code{ecb-compilation-major-modes} ECB decides when a buffer is
displayed in the compile-window.
Default value is the function @code{comint-check-proc} which returns
not nil when the buffer is related to a living process.
@end defopt
@defopt compile-window-height
Height of the persistent compilation-window of ECB. If you want a
compilation window shown at the bottom of the ECB-layout then set here
the height of it (Default is a height of 5). If you redraw the current
layout with @code{ecb-redraw-layout} then the compilation window (if
any) has the height you set here. If the number is less than 1.0 the
height is a fraction of the frame height.
If you do not set a persistent compilation window then doing a
compilation or displaying temp-buffers (e.g. *Help*-buffers) splits
temporally the edit window vertically if the edit window is not
splitted already or uses another edit window temporally for
compilation output if the edit window is already splitted. This is the
recommended value for this option because this is the
standard-behavior of Emacs.
Beware: If you set a persistent compilation window then ECB displays all
buffers for which @code{ecb-compilation-buffer-p} returns not nil in
that persistent compilation window. If a buffer which should being
displayed there is not displayed there then try to modify the options
@code{ecb-compilation-buffer-names},
@code{ecb-compilation-major-modes} or
@code{ecb-compilation-predicates} (in this sequence).
See also the options @code{ecb-compile-window-temporally-enlarge} and
@code{ecb-enlarged-compilation-window-max-height} and also the command
@code{ecb-toggle-compile-window-height}!
ECB offers the functionality of such a persistent compile-window
regardless if the special ECB-windows are visible or not (see the
command @code{ecb-toggle-ecb-windows}).
Regardless of the settings you define here: If you have destroyed or
changed the ECB-screen-layout by any action you can always go back to
this layout with @code{ecb-redraw-layout}
@end defopt
@defopt compile-window-prevent-shrink-below-height
Allow the compile-window to be shrunken below its height. A non nil
value means ECB prevents the compile-window from being shrunken below
the threshold of @code{ecb-compile-window-height} by displaying
temp-buffers (e.g. *Help* etc.) or after running compilations or
greps. But interactively it is always allowed to shrink it to every
height!
If nil then ECB does nothing to prevent being shrunken below the value
of @code{ecb-compile-window-height}.
Default is t.
@end defopt
@defopt compile-window-temporally-enlarge
Let Emacs temporally enlarge the compile-window of the ECB-layout.
This option has only an effect if @code{ecb-compile-window-height} is
not nil!
The following values are possible:
@itemize @minus
@item @code{after-display}:
After displaying a ``compilation-buffer'' (in the sense of
@code{ecb-compilation-buffer-p}!) in the compile-window of ECB. For
the max. height of the enlarged compile-window see the option
@code{ecb-enlarged-compilation-window-max-height}.
@item @code{after-selection}:
Selecting the @code{ecb-compile-window} auto. enlarges it and
de-selecting (means leaving @code{ecb-compile-window}) auto. shrinks
it. Enlarging and shrinking the @code{ecb-compile-window} is done with
@code{ecb-toggle-compile-window-height}. See also the
documentation of this function!
@item @code{both}:
The combination of 'after-display and 'after-selection.
@item @code{nil}:
ECB fixes always the height of the @code{ecb-compile-window} at the
value of @code{ecb-compile-window-height}.
@end itemize
To restore the ECB-layout after such a buffer-enlarge just call
@code{ecb-toggle-compile-window-height} or
@code{ecb-redraw-layout}.
@end defopt
@defopt compile-window-width
Width of the compile-window.
Possible values are @code{frame} and @code{edit-window}.
With @code{frame} the compile-window looks like:
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
|--------------| edit-window(s) |
| | |
| Methods | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
With @code{edit-window} the compile-window looks like:
@example
@group
-------------------------------------------------------
| | |
| Directories | |
| | |
|--------------| edit-window(s) |
| | |
| Methods | |
| | |
| |---------------------------------------
| | |
| | Compilation |
| | |
-------------------------------------------------------
@end group
@end example
This option takes only effect if @code{ecb-compile-window-height} is
not nil!
@end defopt
@defopt change-layout-preserves-compwin-state
Changing the layout preserves the state of the compile-window. This is
for example useful if the user toggles between several layouts (see
@code{ecb-toggle-layout}) and wants to preserve the hidden-state of
the compile-window.
@end defopt
@defopt enlarged-compilation-window-max-height
The max height of the compile-window after enlarging it. The max
height of the compilation window after enlarged by
@code{ecb-toggle-compile-window-height}. The following values are
allowed:
@code{best}:
ECB fits the height of the compile-window exactly to the size of its
current contents but never shrinks below the value of
@code{ecb-compile-window-height} or enlarges over the half of the
frame-height of the ECB-frame. The values of the options
@code{compilation-window-height} and @code{temp-buffer-max-height} are
taken into account dependent of the current @code{major-mode} of the
buffer in the compile-window: If @code{compilation-mode} then
@code{compilation-window-height} is used otherwise
@code{temp-buffer-max-height}.
@code{half}:
1/2 the frame-height of the ECB-frame
Any number:
Max height in lines. If the number is less than 1.0 the height is a
fraction of the frame height (e.g. 0.33 results in a max-height of 1/3
the frame-height).
@end defopt
@defopt scroll-other-window-scrolls-compile-window
@code{scroll-other-window} scrolls always the compile-window. For all
details about the scroll-behavior of @code{scroll-other-window} see
the advice documentation of @code{other-window-for-scrolling}.
@end defopt
@node ecb-create-layout, ecb-face-options, ecb-compilation, Customizable options
@subsection Group ecb-create-layout
@noindent
This group contains settings for creating new ECB-layouts:
@defopt create-layout-file
File where all layouts created by @code{ecb-create-new-layout} are
stored.
@end defopt
@defopt ecb-create-layout-frame-height
Frame height of the layout creation frame.
@end defopt
@defopt ecb-create-layout-frame-width
Frame width of the layout creation frame.
@end defopt
@node ecb-face-options, ecb-faces, ecb-create-layout, Customizable options
@subsection Group ecb-face-options
@noindent
This group contains settings for all faces used in ECB:
@defopt directories-general-face
Basic face for the ECB directories buffer. This defines the basic face
the whole directory buffer should displayed with. If the face
@code{ecb-default-general-face} is used then the display of all
ECB-tree-buffers can be changed by modifying only the face
@code{ecb-default-general-face}.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt directory-face
Face used for highlighting current directory in the directories
buffer. If the face @code{ecb-default-highlight-face} is used then the
display of all ECB-tree-buffers can be changed by modifying only the
face @code{ecb-default-highlight-face}.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt directory-not-accessible-face
Face for not accessible dirs in the directories buffer.
@end defopt
@defopt history-face
Face used for highlighting current history-entry in the history
buffer. If the face @code{ecb-default-highlight-face} is used then the
display of all ECB-tree-buffers can be changed by modifying only the
face @code{ecb-default-highlight-face}.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt history-general-face
Basic face for the ECB directory buffer. This defines the basic face
the whole history buffer should displayed with. If the face
@code{ecb-default-general-face} is used then the display of all
ECB-tree-buffers can be changed by modifying only the face
@code{ecb-default-general-face}.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt method-face
Face used for highlighting current method, class or variable in the
methods buffer. If the face @code{ecb-default-highlight-face} is used
then the display of all ECB-tree-buffers can be changed by modifying
only the face @code{ecb-default-highlight-face}.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt method-non-semantic-face
Face used for for displaying tags of sources not supported by
semantic.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt methods-general-face
Basic face for the ECB methods buffer. This defines the basic face the
whole methods buffer should displayed with. If the face
@code{ecb-default-general-face} is used then the display of all
ECB-tree-buffers can be changed by modifying only the face
@code{ecb-default-general-face}.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt source-face
Face used for highlighting current source in the sources buffer. If
the face @code{ecb-default-highlight-face} is used then the display of
all ECB-tree-buffers can be changed by modifying only the face
@code{ecb-default-highlight-face}.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt source-in-directories-buffer-face
Face for source files in the directories buffer.
@end defopt
@defopt sources-general-face
Basic face for the ECB sources buffer. This defines the basic face the
whole sources buffer should displayed with. If the face
@code{ecb-default-general-face} is used then the display of all
ECB-tree-buffers can be changed by modifying only the face
@code{ecb-default-general-face}.
Changes take first effect after finishing and reactivating ECB!
@end defopt
@defopt source-read-only-face
Face for read-only sources.
@end defopt
@defopt tag-header-face
Face used for highlighting the tag header after jumping to it by
clicking onto a node in the methods buffer.
@end defopt
@node ecb-faces, ecb-download, ecb-face-options, Customizable options
@subsection Group ecb-faces
@noindent
This group contains all faces used in ECB:
@table @code
@item ecb-bucket-node-face:
Face which can be used for displaying bucket tags in the methods
buffer. See also @code{ecb-bucket-node-display}.
@item ecb-default-general-face:
Basic face for all ECB tree-buffers.
It's recommended to define here the font-family, the font-size, the basic
color etc.
In GNU Emacs 21.X all faces (even the face
@code{ecb-default-highlight-face}) used in the ECB tree-buffers inherit
from this face. Therefore the default attributes like font etc. of a
face used in a tree-buffer can be very easily changed with face
@code{ecb-default-general-face}.
With XEmacs there is no inheritance-feature but the options
@code{ecb-directories-general-face}, @code{ecb-sources-general-face},
@code{ecb-methods-general-face} and @code{ecb-history-general-face}
offer the choice to use the face @code{ecb-default-general-face} so
also with XEmacs the basic face-settings can be easily changed just by
customizing the face @code{ecb-default-general-face}!
@item ecb-default-highlight-face:
Define basic face for highlighting the selected node in an ECB
tree-buffer.
In GNU Emacs 21.X all highlighting faces in the ECB tree-buffers
inherit from this face. Therefore the default attributes like font
etc. of a face used in a tree-buffer for highlighting the current
tag can be very easily changed with face
@code{ecb-default-highlight-face}.
With XEmacs there is no inheritance-feature but the options
@code{ecb-directory-face}, @code{ecb-source-face},
@code{ecb-method-face} and @code{ecb-history-face} offer the choice to
use the face @code{ecb-default-highlight-face} so also with XEmacs the
basic face-settings can be easily changed just by customizing the face
@code{ecb-default-highlight-face}!
@item ecb-directories-general-face:
Basic face for the ECB directories buffer. Its recommended to define
here the font-family, the font-size, the basic color etc.
@item ecb-directory-face:
Define face used for highlighting current directory in the directories
buffer.
@item ecb-directory-not-accessible-face
Define a face for not accessible dirs in the directories buffer.
@item ecb-history-face:
Define face used for highlighting current history-entry in the history
buffer.
@item ecb-history-general-face:
Basic face for the ECB history buffer. Its recommended to define here
the font-family, the font-size, the basic color etc.
@item ecb-method-face:
Define face used for highlighting current method, class or variable in
the methods buffer.
@item ecb-methods-general-face:
Basic face for the ECB methods buffer. Its recommended to define here
the font-family, the font-size, the basic color etc.
@item ecb-method-non-semantic-face:
Define face used for displaying tags of sources not supported by semantic.
@item ecb-mode-line-data-face
Define face for the data in the mode-line. See
@code{ecb-mode-line-data}.
@item ecb-mode-line-prefix-face
Define face for the prefix in the mode-line. See
@code{ecb-mode-line-prefixes}.
@item ecb-source-face:
Define face used for highlighting current source in the sources
buffer.
@item ecb-source-in-directories-buffer-face:
Define a face for displaying sources in the directories buffer.
@item ecb-sources-general-face:
Basic face for the ECB sources buffer. Its recommended to define here
the font-family, the font-size, the basic color etc.
@item ecb-source-read-only-face
Define a face for read-only sources
@item ecb-tag-header-face:
Define face used for highlighting the tag header after jumping to it
by clicking onto a node in the methods buffer.
@item ecb-tree-guide-line-face:
Define face for the guide-lines in the tree-buffers. See the option
@code{ecb-tree-buffer-style} for a explanation of guide-lines.
@item ecb-type-tag-class-face:
Define face used with option @code{ecb-type-tag-display}.
@item ecb-type-tag-enum-face:
Define face used with option @code{ecb-type-tag-display}.
@item ecb-type-tag-group-face:
Define face used with option @code{ecb-type-tag-display}.
@item ecb-type-tag-interface-face:
Define face used with option @code{ecb-type-tag-display}.
@item ecb-type-tag-struct-face:
Define face used with option @code{ecb-type-tag-display}.
@item ecb-type-tag-typedef-face:
Define face used with option @code{ecb-type-tag-display}.
@item ecb-type-tag-union-face:
Define face used with option @code{ecb-type-tag-display}.
@item ecb-mode-line-win-nr-face
Define face for the window-number in the mode-line. See
@code{ecb-mode-line-display-window-number}.
@end table
Just call @code{customize-face <face-name>} to customize these faces
for your personal taste. Or customize the related option in the group
@ref{ecb-face-options}.
@node ecb-download, ecb-help, ecb-faces, Customizable options
@subsection Group ecb-download
@noindent
This group contains settings for downloading and installing a new ECB
from within ECB:
@defopt download-delete-archive
Should the downloaded archive be deleted after successful
installation or after failure during the installation-process.
Possible values are:
@itemize @minus
@item @code{only-after-success}:
Archive is only deleted after successful installation
but not if a failure occurs during the installation process.
@item @code{always}:
Archive is also deleted if an error occurs.
@item @code{nil}:
Archive will never be deleted.
@end itemize
@end defopt
@defopt download-install-parent-dir
Parent directory where downloaded packages are installed.
ECB installs a downloaded package in this directory, i.e. the downloaded
archive X.tar.gz will be extracted in this directory so afterwards this
directory contains a new subdirectory X which contains the downloaded package.
This directory must be write-able!
@end defopt
@defopt download-package-version-type
Version type ECB is allowed to download for upgrading.
If you want to upgrade to a newer ECB-version via
@code{ecb-download-ecb} or if you must upgrade to newer semantic-
eieio- and/or speedbar-versions (because ECB requires these newer
versions) then this option specifies which version-types are allowed.
ECB checks on the download-sites of ECB/semantic/eieio/speedbar which
versions are currently available and then downloads always the latest
version matching the specified type:
@itemize @minus
@item 2: Get the newest version of all stable versions available.
@item 1: Get the newest version of all stable and beta versions available.
@item 0: Get the newest version of all stable, beta and alpha versions
available.
@item -1: Ask before downloading in the minibuffer for a version
(TAB-completion of all available versions is possible).
@end itemize
So, 2 means stable, 1 means stable and betas, 0 means stable, betas and alphas
and -1 means ask the user for a version.
Per default stable and beta-versions are allowed (value 1).
But all versions must match the restrictions of the specified min- and
max-versions of the required packages. For this see the file README!
@end defopt
@defopt download-url
URL where download-able ECB-versions are located. The ECB-archive-file
(e.g. ecb-1.70.tar.gz) will be appended to this URL and
@code{ecb-download-ecb} will try to download this archive.
Note: Normally this URL should never change but who knows...
@end defopt
@defopt gzip-setup
Configuration for the gzip-utility. For a description about the
possible settings see @code{ecb-wget-setup}.
@end defopt
@defopt tar-setup
Configuration for the tar-utility. For a description about the
possible settings see @code{ecb-wget-setup}.
@end defopt
@defopt wget-setup
Configuration for the wget-utility. Value is a cons-cell where:
@itemize @bullet
@item
car is the name of the wget-executable - if the executable can not be
found in the @var{PATH} then it must be a full path.
@item
cdr is the path type of the file-arguments of this binary. Possible
values are @code{cygwin}, @code{windows} and @code{other} whereas the
latter one is used for all Unix, Linux, Mac OS etc... If @code{cygwin} is
set then the cygpath-utility must be in the PATH!
@end itemize
@end defopt
@node ecb-help, ecb-eshell, ecb-download, Customizable options
@subsection Group ecb-help
@noindent
This group contains settings for the ECB online help:
@defopt help-html-path
Path where the ECB online help in HTML format resides. This must be
the location of the @file{ecb.html} which comes with the ECB
distribution. If is installed by unpacking the archive available on
the ECB website then this is the subdir @code{ecb-help-html-subdir} of
the installation directory of ECB. If it is installed as
XEmacs-package (e.g. via the package manager of XEmacs) then this is
probably either the directory ``../../html/'' or
``../../etc/ecb/html/'' (both relative to the Elisp directory of ECB).
The path can either be an absolute path or a path relative to the directory
where the Elisp files of ECB are.
Normally there should be no need to change this option!
@end defopt
@defopt help-info-path
Path where the ECB online help in info format resides. This must be
the location of the @file{ecb.info} which comes with the ECB
distribution. If is installed by unpacking the archive available on
the ECB website then this is the subdir @code{ecb-help-info-subdir} of
the installation directory of ECB. If it is installed as
XEmacs-package (e.g. via the package manager of XEmacs) then this is
probably the directory ``../../info/'' (relative to the Elisp directory
of ECB).
The path can either be an absolute path or a path relative to the directory
where the Elisp files of ECB are.
Normally there should be no need to change this option!
@end defopt
@defopt show-help-format
The format @code{ecb-show-help} shows its online help. Allowed values
are 'info (for the Info format) and 'html (for HTML format). If the
value is 'html then @code{browse-url-browser-function} says which
browser is used.
Note: If you got ECB as a standard XEmacs-package maybe the
HTML-online-documentation is not included.
@end defopt
@node ecb-eshell, ecb-speedbar, ecb-help, Customizable options
@subsection Group ecb-eshell
@noindent
This group contains settings for eshell integration within the ECB:
@defopt eshell-auto-activate
Startup the eshell and display it in the compile-window. If current
layout does not display a compile-window (see
@code{ecb-compile-window-height}) then nothing is done.
@end defopt
@defopt eshell-enlarge-when-eshell
Enlarge the compile-window if it is selected by @code{eshell}. This
takes only effect if the command @code{eshell} is called!
@end defopt
@defopt eshell-fit-window-to-command-output
Fit the compile-window after an eshell-command to the output. This is
done by the function @code{ecb-eshell-fit-window-to-output} which is
added to @code{eshell-post-command-hook} ie. which is running autom.
after each eshell-command.
@end defopt
@defopt eshell-synchronize
Synchronize eshell with the default-directory of current
source-buffer. The synchronization is done by
@code{ecb-eshell-current-buffer-sync} which can be called
interactively but normally it is called autom. by the
@code{ecb-current-buffer-sync-hook-internal}.
@end defopt
@node ecb-speedbar, ecb-non-semantic, ecb-eshell, Customizable options
@subsection Group ecb-speedbar
@defopt speedbar-before-activate-hook
Hook running directly before ECB activates the integrated speedbar.
For example this hook can be used to change the expansion-mode of the
integrated speedbar via @code{speedbar-change-initial-expansion-list}.
Example: (speedbar-change-initial-expansion-list ``buffers'').
@end defopt
@node ecb-non-semantic, ecb-winman, ecb-speedbar, Customizable options
@subsection Group ecb-non-semantic
@noindent
This group contains settings for parsing and displaying non-semantic files:
@defopt auto-save-before-etags-methods-rebuild
Automatic saving of current buffer before rebuilding its methods.
This option is only relevant for sources which are supported and
parsed by etags (see @code{ecb-process-non-semantic-files}). Because
etags is an external tool a source-buffer can only be reparsed if the
buffer is saved to disk. So the command
@code{ecb-rebuild-methods-buffer} checks for sources which are not
supported by semantic or imenu if either this option is t or if the
major-mode of the source-buffer is contained in this list: In both
cases ECB saves the current source-buffer before it re-runs etags for
reparsing the source. If nil or if the major-mode is not contained
then no automatic saving will be done!
For all source supported by semantic or by imenu this option takes no
effect.
@end defopt
@defopt non-semantic-exclude-modes
Exclude modes from parsing with imenu or etags. Per default, ECB tries
to parse all file-types not supported by semantic with imenu or etags
or some other method (for details see the option
@code{ecb-non-semantic-parsing-function}). If a file-type can not be
parsed by semantic, imenu or etags than this simply results in an
empty method-buffer for this file. But nevertheless you will get a
message ``Sorry, no support for a file of that extension'' which comes
from the speedbar-library and can not switched off. Therefore if a
@code{major-mode} is known as not parse-able by semantic, imenu or etags
it can be added to this option and then it will be excluded from being
tried to parsed.
@end defopt
@defopt non-semantic-methods-initial-expand
Initially expand all tags for not by semantic supported sources.
This option can be customized on a major-mode basis, i.e. if a
@code{major-mode} is contained in this option then all tags for this
modes will be initially expanded - otherwise not.
@end defopt
@defopt non-semantic-parsing-function
Define mode-dependent parsing functions for non-semantic files. This
is an alist where the car is a major-mode symbol and the cdr is a
function-symbol of a function which should be used for parsing a
non-semantic buffer, i.h. a buffer for which no semantic grammar
exists. Such a function gets one argument - the filename of current
buffer - and has to generate and return a tag/tag list which is
understandable by @code{speedbar-insert-generic-list}. speedbar has
already included two functions @code{speedbar-fetch-dynamic-imenu} and
@code{speedbar-fetch-dynamic-etags} which can be used for parsing
buffers with imenu rsp. etags.
This option takes only effect if @code{ecb-process-non-semantic-files}
is not nil: Then ECB checks for non-semantic buffers if current
@code{major-mode} is contained in this option and if yes, then the
specified parsing function is called; if not then the cars of the
elements of @code{speedbar-dynamic-tags-function-list} are called in
that sequence they are listed in this variable. See option
@code{speedbar-dynamic-tags-function-list} for further details.
In most cases imenu-parsing is preferable over etags-parsing because
imenu operates on Emacs-buffers and needs no external tool and
therefore parsing works also if current contents of a buffer are not
saved to disk. But maybe sometimes etags may return better parsing
results
IMPORTANT: if imenu-parsing should be used then the option
@code{speedbar-use-imenu-flag} must be set to not nil!
@end defopt
@defopt process-non-semantic-files
Display content of non-semantic-files in the ECB-methods-buffer. See
also @code{ecb-non-semantic-parsing-function}.
@end defopt
@defopt rebuild-non-semantic-methods-before-hook
Hook running at beginning of the function
@code{ecb-rebuild-methods-buffer-for-non-semantic}. This function is
always called by the command @code{ecb-rebuild-methods-buffer} for not
semantic supported source-types.
Every function of this hook gets one argument: The complete filename
of the current source-buffer in the edit-window. The Method-buffer is
only rebuild by @code{ecb-rebuild-methods-buffer-for-non-semantic} if
either the hook contains no function (the default) or if no function
of this hook returns nil! See @code{run-hook-with-args-until-failure}
for description how these function are processed.
@end defopt
@node ecb-winman, ecb-mode-line, ecb-non-semantic, Customizable options
@subsection Group ecb-winman
@noindent
This group contains settings for supporting several window-managers:
@defopt winman-escreen-number
Number of the escreen which is reserved for ECB. If you go to the
escreen with this number you go always to the escreen with activated
ECB. All other escreen-numbers are escreens with deactivated ECB!
@end defopt
@defopt winman-winring-name
Name of the winring-window-configuration reserved for ECB. If you go
to the window-configuration with this name you go always to the
window-configuration with activated ECB. All other
window-configuration are configurations with deactivated ECB!
@end defopt
@node ecb-mode-line, ecb-version-control, ecb-winman, Customizable options
@subsection Group ecb-mode-line
@noindent
This group contains settings for the modelines of the
ECB-tree-buffers:
@defopt mode-line-data
Data shown in the modelines of the special ECB-buffers. Everey element
of this list is a cons-cell where the car is used to define a
buffer-name and the cdr to define the modeline-data for that buffer.
For details about how to defining a buffer-name see
@code{ecb-mode-line-prefixes} - its completely the same.
The cdr is the data for ths modeline and can either be the symbol
@code{sel-dir} or @code{sel-source} whereas the former one displays
the current selected directory as modeline-data and the latter one the
current selected source-file (without path).
In addition to these two predefined values for every special
ECB-buffer a plain string (which is displayed) or a function can be
specified which gets three args (name of the buffer, current selected
directory and current selected source-file) and must return a string
which will be displayed in the modeline (or nil if no data should be
displayed). Such a function can add the text-property @code{help-echo}
to the result-string. Then this help-string will be displayed when the
user moves the mouse over this section of the modeline.
If a special ECB-buffer should not display special data in its
modeline then this buffer-name should either not being added to this
option or added with ``No data'' (= nil as cdr).
The whole modeline of the special ECB-buffer consists of the prefix of
@code{ecb-mode-line-prefixes} and the data of
@code{ecb-mode-line-data} - eventually prepended by the window-number,
see @code{ecb-mode-line-display-window-number}.
@end defopt
@defopt mode-line-data-face
Face used for the data in the mode-line. See
@code{ecb-mode-line-data}. For XEmacs the face should inherit from the
face @code{modeline} (see @code{set-face-parent})!
@end defopt
@defopt mode-line-display-window-number
Display in the modeline of every special ECB-window the window-number.
The left-top-most window in a frame has the window-number 0 and all
other windows are numbered with increasing numbers in the sequence,
functions like @code{other-window} or @code{next-window} would walk
through the frame.
This can be used to jump to windows by number with commands like:
@lisp
@group
(defun my-switch-to-window-number (number)
``Switch to the nth window''
(interactive ``P'')
(if (integerp number)
(select-window (nth number (window-list)))))
@end group
@end lisp
Currently this feature is only available for GNU Emacs 21.X, because
neither GNU Emacs < 21 nor XEmacs can evaluate dynamically forms in
the mode-line.
@end defopt
@defopt mode-line-prefixes
Prefixes shown in the modelines of the special ECB-buffers. The
displayed prefix then looks like: ``[ <PREFIX>[: ]]'', means if a
prefix is defined for an special ECB-buffer then a single space is
prepended and if there is additional text to display (e.g. the current
directory in the sources buffer, see @code{ecb-mode-line-data}) then
also the string ``: '' is appended.
Everey element of this list is a cons-cell where the car is used to
define a buffer-name and the cdr to define the modeline-prefix for
that buffer.
The buffer-name can either be defined as plain string or with a symbol
which contains the buffer-name as value. The latter one is recommended
to define a prefix for one of the builtin ECB-tree-buffers because
then simply the related option-symbol can be used. To add a prefix for
the builtin directories tree-buffer just set the symbol
@code{ecb-directories-buffer-name} as car.
The cdr is the prefix for a buffer and can either be a string which
used as it is or a function-symbol which is called with three argument
(the buffer-name, the current selected directory and the current
selected source-file) and must return either nil (for no prefix) or a
string which is then used a prefix. Such a function can add the
text-property @code{help-echo} to the result-string. Then this
help-string will be displayed when the user moves the mouse over this
section of the modeline.
If a special ECB-buffer should not have a prefix in its modeline then
this buffer-name should either not being added to this option or added
with ``No prefix'' (= nil as cdr).
@end defopt
@defopt mode-line-prefix-face
Face used for the prefix in the mode-line. See
@code{ecb-mode-line-prefixes}. For XEmacs the face should inherit from
the face @code{modeline} (see @code{set-face-parent})!
@end defopt
@defopt mode-line-win-nr-face
Face used for the window-number in the mode-line. See
@code{ecb-mode-line-display-window-number}. For XEmacs the face should
inherit from the face @code{modeline} (see @code{set-face-parent})!
@end defopt
@node ecb-version-control, ,ecb-mode-line, Customizable options
@subsection Group ecb-version-control
@noindent
This group contains settings for the version-control-support of ECB:
@defopt vc-directory-exclude-regexps
Which directories should be excluded from VC-state-check. If a
directory matches any of the regexps of this option the VC-state of
its sources will not be checked - This option takes only effect if
@code{ecb-vc-enable-support} is not nil.
@end defopt
@defopt vc-enable-support
Enable support for version-control (VC) systems. If on then in the
directories-buffer (if the value of the option
@code{ecb-show-sources-in-directories-buffer} is on for current
layout), the sources-buffer and the history-buffer all file-items are
displayed with an appropriate icon in front of the item-name to
indicate the VC-state of this item. If off then no
version-control-state checking is done.
Because this check can be take some time if files are managed by a not
local Version-control-server ECB performs this check stealthy (see
@code{ecb-stealthy-tasks-delay}) so normally there should no
performance-decrease or additional waiting-time for the user. But to
get sure this option offers three choices: @code{t},
@code{unless-remote} and @code{nil}. See the option
@code{ecb-prescan-directories-for-emptyness} for an explanation for
these three choices.
The option @code{ecb-vc-directory-exclude-regexps} offers are more
fine granularity to exclude the sources of certain directories from
the VC-state-check.
See @code{ecb-vc-supported-backends} and @code{ecb-vc-state-mapping}
how to customize the VC-support itself.
@end defopt
@defopt vc-state-mapping
Mapping between VC-states from the backends and ECB-known VC-states.
ECB understands the following state-values:
@table @code
@item up-to-date
The working file is unmodified with respect to the latest version on
the current branch, and not locked.
@item edited
The working file has been edited by the user. If locking is used for
the file, this state means that the current version is locked by the
calling user.
@item needs-patch
The file has not been edited by the user, but there is a more recent
version on the current branch stored in the master file.
@item needs-merge
The file has been edited by the user, and there is also a more recent
version on the current branch stored in the master file. This state
can only occur if locking is not used for the file.
@item added
The working file has already been added/registered to the VC-system
but not yet commited.
@item unlocked-changes
The current version of the working file is not locked, but the working
file has been changed with respect to that version. This state can
only occur for files with locking; it represents an erroneous
condition that should be resolved by the user.
@item ignored
The version-control-system ignores this file (e.g. because included in
a .cvsignore-file in case of CVS).
@item unknown
The state of the file can not be retrieved; probably the file is not
under a version-control-system.
@end table
All state-values a check-vc-state-function of
@code{ecb-vc-supported-backends} can return must have a mapping to one
of the ECB-state-values listed above. If for a certain
backend-VC-state no mapping can be found then per default 'edited is
assumed!
The default value of this option maps already the possible returned
state-values of @code{vc-state} and @code{vc-recompute-state} (both
GNU Emacs) and @code{vc-cvs-status} (Xemacs) to the
ECB-VC-state-values.
@end defopt
@defopt vc-supported-backends
Define how to to identify the VC-backend and how to check the state.
The value of this option is a list containing cons-cells where the car
is a function which is called to identify the VC-backend for a
DIRECTORY and the cdr is a function which is called to check the
VC-state of the FILEs contained in DIRECTORY.
Identify-backend-function: It gets a full directory-name as argument -
always without ending slash (rsp. backslash for native Windows-XEmacs)
- and has to return a unique symbol for the VC-backend which manages
that directory (e.g. 'CVS for the CVS-system or 'RCS for the
RCS-system) or nil if the file is not managed by a
version-control-system.
Check-vc-state-function: It gets a full filename (ie. incl. the
complete directory-part) and has to return a symbol which indicates
the VC-state of that file. The possible returned values of such a
check-vc-state-function have to be mapped with
@code{ecb-vc-state-mapping} to the allowed ECB-VC-state values.
ECB runs for a certain DIRECTORY all identify-backend-functions in
that order they are listed in this option. For the first which returns
a value unequal nil the associated check-state-function is used to
retrieve the VC-state of all sourcefiles in that DIRECTORY.
There is no need for the identify-backend-function or the
check-vc-state-function to cache any state because ECB automatically
caches internally all necessary informations for directories and files
for best possible performance.
To prepend ECB from checking the VC-state for any file set
@code{ecb-vc-enable-support} to nil.
Default value for GNU Emacs: Support for CVS, RCS, SCCS and Subversion
(for the later one the most recent version of the VC-package incl. the
vc-svn library is needed) is added per default. To identify the
VC-backend the functions @code{ecb-vc-managed-by-CVS},
@code{ecb-vc-managed-by-RCS} rsp. @code{ecb-vc-managed-by-SCCS} rsp.
@code{ecb-vc-managed-by-SVN} are used. For all three backends the
function @code{ecb-vc-state} of the VC-package is used.
Default value for XEmacs: XEmacs contains only a quite outdated
VC-package, especially there is no backend-independent
check-vc-state-function available (like @code{vc-state} for GNU
Emacs). Only for CVS a check-vc-state-function is available:
@code{vc-cvs-status}. Therefore ECB adds per default only support for
CVS and uses @code{ecb-vc-managed-by-CVS} rsp. @code{vc-cvs-status}.
Example for GNU Emacs: If @code{vc-recompute-state} (to get real
state-values not only heuristic ones) should be used to check the
state for CVS-managed files and @code{vc-state} for all other backends
then an element (ecb-vc-dir-managed-by-CVS . vc-recompute-state)
should be added at the beginning of this option.
@end defopt
@defopt vc-xemacs-exclude-remote-cvs-repository
Exclude directories with a remote cvs-repository from VC-check. This
option takes only effect for XEmacs and is needed cause of the
outdated VC-package of XEmacs which offers no heuristic state-checking
and also no option @code{vc-cvs-stay-local}. So this option takes only
effect if @code{vc-cvs-stay-local} is not avaiable. In this case ECB
treats directories which are managed by CVS but have a remote
repository as if the directory would be not managed by CVS (so the
files are not checked for their VC-state). This si done to avoid
blocking XEmacs when running full cvs-commands (e.g. ``cvs status'')
over the net.
Note: When ECB can find the option @code{vc-cvs-stay-local} then this
option will automatically take no effect regardless which
Emacs-version is used.
@end defopt
@node Submitting problem report, Upgrading, Customizing, Top
@chapter Submitting a problem report
@cindex Bug report
@cindex Problem report
If you run into problems with ECB you should first take a look into
@itemize @minus
@item @ref{FAQ} or
@item @ref{Conflicts and bugs} or
@item @ref{Tips and tricks} or
@item the appropriate section of this online-manual.
@end itemize
If your problem(s) still remain you can/should send a problem report
to the ECB mailing list @email{ecb-list@@lists.sourceforge.net}. ECB
offers you a command which does all necessary for you to send a
problem report. Just call @code{ecb-submit-problem-report}! Please
read the documentation of this command, see @ref{Interactive ECB
commands}.
@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.
If you think there are problems concerning parsing-results for certain
sources supported by semantic then you should call
@code{ecb-dump-semantic-toplevel} for the problematic source-buffer
@strong{BEFORE} you call @code{ecb-submit-problem-report} because this
``dump''-command generates for the current-buffer a new buffer with
name ``*ecb-tag-dump*'' which contains all semantic-tags for this
source. The contents of this ``*ecb-tag-dump*'' will then autom. be
added to the problem-report generated by
@code{ecb-submit-problem-report}!
This command creates a problem-report buffer for you. After that you
get a menu ``Mail'' (dependent on the mail-package used, the menu can
have a different name) with commands to send the problem report. But
for this the variable @code{mail-user-agent} must be configured right for
your system. If you cant get working this mechanism you can simply
copy the whole problem-report buffer after filling it out and sending
it with your standard mail-client to
@email{ecb-list@@lists.sourceforge.net}!
Please read also the documentation of the option @code{ecb-debug-mode} and
switch on the debug mode of ECB (also available in the Help-menu of
ECB!) before submitting a problem-report!
@node Upgrading, Tips and tricks, Submitting problem report, Top
@chapter Upgrading and downloading packages
This chapter describes all aspects of upgrading to a newer version of
ECB.
The first section describes how to download and install a new
package from the web, where ``package'' means either ECB itself or the
required libraries semantic, eieio and speedbar.
After installing a new ECB-version ECB checks if the values of the
customized ECB-options are still compatible. If not ECB does some
smart things. This is the topic of the second section.
@menu
* Downloading new versions:: How to download newer versions of packages
* Auto. option-upgrading:: ECB can auto. upgrade your options
@end menu
@node Downloading new versions, Auto. option-upgrading, Upgrading, Upgrading
@section Downloading new versions of ECB and/or required packages
@cindex Download
ECB offers the possibility to upgrade to newer versions direct from
the ECB-website. This can be done if the following requirements are
satisfied:
@enumerate
@item A connection to the web is available
@item The tools ``wget'', ``tar'' and ``gzip'' are installed
With Unix-systems these tools are in the
standard-distribution. If you are running any Microsoft Windows system
then you need cygwin@footnote{cygwin is available at
@ifhtml
@uref{http://cygwin.com/}
@end ifhtml
@ifnothtml
@url{http://cygwin.com/}
@end ifnothtml
} which offers these tools too. On every
system these tools must reside in the @env{PATH} environment-variable!
If you are behind a firewall and you have to use a proxy you maybe
need the following wget-configuration in your file @file{~/.wgetrc}:
@example
@group
# Define your proxies (where 8080 and 8081 are examples
# for the port-numbers)
http_proxy = http://your.proxy.com:8080
ftp_proxy = http://your.ftpproxy.com:8081
# If you do not want to use proxy at all, set this to off.
use_proxy = on
@end group
@end example
@end enumerate
If these requirements are satisfied you can download and install both
ECB itself and also the required versions of semantic, eieio and
speedbar:
@itemize @bullet
@item Download a new ECB-version with @code{ecb-download-ecb}:
A description for this command you will find in @ref{Interactive ECB
commands}. Check also the options of the customize-group
'ecb-download' (@pxref{ecb-download}).
@anchor{Download required packages}
@item Download and install of required packages:
ECB checks at load-time if the packages semantic, eieio and speedbar
are at least installed and at start-time if the required versions of
semantic, eieio and speedbar (see @file{README}) are installed and
loaded into Emacs. If not you will be asked if you want auto. download
and install them. If you confirm this then ECB does the following:
@enumerate
@item
Checking which versions are available at the download-site of the
required packages. With the option
@code{ecb-download-package-version-type} you can specify which type of
versions (only stable, stable and betas or stable, betas and alphas)
you allow to download and install. This option offers also the choice
of asking you for a certain version. Depending on this setting ECB
either ask you which version it should download and install or chooses
autom. the newest version available which is matching both its
min-max-requirements and the setting in
@code{ecb-download-package-version-type}.
NOTE: Currently there are only beta-versions of speedbar available
therefore this option has to be set to 1 (allow stable and beta
versions). But the speedbar beta-versions are very stable!
@item
Downloading and installing the right version (see 1.) of the required
packages. ECB downloads and installs the new package versions in
subdirectories of @code{ecb-download-install-parent-dir}.
@end enumerate
If both of these actions succeed then you will get a message-buffer
which tells you something like:
@example
@group
-----------------------------------------------------------------
Current state of the required packages semantic, eieio, speedbar:
- semantic author-version must be [1.4, 1.4.9]:
Installed in /usr/local/lib/site-lisp/semantic-1.4
- eieio author-version must be [0.17, 0.17.9]:
Correct version already loaded!
- speedbar author-version must be [0.14beta1, 0.15.9]:
Correct version already loaded!
After adding the new directory to your @code{load-path} and then
restarting Emacs the new package(s) can be activated.
-----------------------------------------------------------------
@end group
@end example
@strong{Remark 1}: "P author-version must be [x y]" means, that ECB
requires package P in a version-number >= x and <= y.
@strong{Remark 2}: By setting the option @code{ecb-version-check} to
@code{nil} you can prevent ECB from checking correct versions of
semantic, eieio and speedbar but it's strongly recommended not to do
this!
@end itemize
@node Auto. option-upgrading, , Downloading new versions, Upgrading
@section Automatic upgrading of options
@menu
* User interface:: Options and commands you should know
* Background information:: Maybe some interesting informations
@end menu
@node User interface, Background information, Auto. option-upgrading, Auto. option-upgrading
@subsection User interface for option-upgrading
There are two interactive commands (@pxref{Interactive ECB commands}):
@itemize @minus
@item @code{ecb-upgrade-options}:
Does all necessary beginning with a incompatibility-check for all
options, upgrading/resetting incompatible options and ending with the
display of all upgraded or reset options.
@item @code{ecb-display-upgraded-options}:
Displays an information-buffer which options have been upgraded or
reset. Offers two buttons where the user can decide if the upgraded
options should also being saved by ECB for future settings or if the
buffer should be killed.
@end itemize
If the option @code{ecb-auto-compatibility-check} has a non-nil value
(which is the default) then ECB does all this stuff automatically at
startup. This is very recommended!
If you are interested in some background information, read
@ref{Background information}!
@node Background information, , User interface, Auto. option-upgrading
@subsection Background information
Big packages like ECB will be enhanced and developed continuously so
sometimes a new version must be released. Such packages offer in
general a lot of customizable options so probably some of these
options change the type or are renamed because the old type and/or
name of the option makes no sense in the new release.
Especially options which have changed the type of their value are now
a problem for the user which want to upgrade to the latest
ECB-version: If the user has saved a certain value for option X in its
file @file{.emacs} but the type of this saved value doesn't match the
new defined type in the defcustom-form after an ECB-upgrade then there
can occur serious problems like ECB can not be started anymore or even
Emacs can not be started without errors.
Until now there was only one way to fix these problems: The user must
manually edit his file @file{.emacs} and remove all entries for
options which have now another type. After this and after restarting
Emacs the new default-values of the type-changed options in the new
ECB-release are active and the user can go on using Emacs and ECB. But
this approach to fix the incompatible-option-problem has two serious
drawbacks:
@enumerate
@item
The user must manually edit the customize-section in his file
@file{.emacs}. This should normally not be done and if then only by
old-handed Emacs-users.
@item
The customized value of the option X in the old-release (with the old
type) is lost because after removing the related entry from the
file @file{.emacs} the new default-value is active, so the user must
re-customize the option X.
@end enumerate
OK, this is one half of the option-upgrade-problem but a new ECB-release
can also rename a option from name X to name Y because the new name Y makes
much more sense and/or is more mnemonic. If only the name has changed but
not the type this is not a serious problem like above but also annoying
because the customized value of the old-option X takes no effect in the new
release but instead the default-value of the new-option Y is now active.
But nevertheless this problem has the drawback number 2 (see above).
The last category of upgrade-problems is a renamed option which has also
changed its type.
@noindent
ECB has a solution for all these problems:
@itemize @bullet
@item
It checks all customized values of all ECB-options if they are still
type-compatible. If not then it tries to upgrade the old-value to the
new value-type and if this is not possible then it resets the option
to the new default value and offers then to store it via customize in
the .emacs-file (or in any file which is used for customized options).
But ECB does not touch any customization-file without asking the user!
@item
It offers a special constant @code{ecb-upgradable-option-alist} which
allows the ECB-maintainers to define special transformings for renamed
options so even the value of an old-option X can be savely transformed
to the new-option Y and the old setting is not lost.
@end itemize
All these checks and transformings are done at beginning of activating
ECB - if the option @code{ecb-auto-compatibility-check} is not nil. If
ECB has recognized incompatible or renamed options it does its
upgrading/reseting-job so all ECB-options have correct types so ECB
can start correct. After ECB is started it displays a list of all
upgraded or reseted option with their old and new values.
@node Tips and tricks, Elisp programming, Upgrading, Top
@chapter Tips and tricks
@c TODO: Move some section to the Usage-chapter!!
This chapter contains some tips and tricks how to deal best with some
situations.
@menu
* 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
* Using semanticdb:: Using semanticdb for going to external nodes
@end menu
@node Changing faces, Small screens, Tips and tricks, Tips and tricks
@section Changing faces in the ECB tree-buffers
@cindex Faces
There are two basic faces:
@itemize @bullet
@item @code{ecb-default-general-face}:
Basic face for displaying an ECB-tree-buffer.
Its recommended to define the font-family, the font-size, the basic
color etc. with this face.
In GNU Emacs 21.X all faces (even the face
@code{ecb-default-highlight-face}) used in the ECB tree-buffers
inherit from this face. Therefore the default attributes like font
etc. of a face used in a tree-buffer can be very easily changed with
face @code{ecb-default-general-face}.
With XEmacs there is no inheritance-feature but the options
@code{ecb-directories-general-face}, @code{ecb-sources-general-face},
@code{ecb-methods-general-face} and @code{ecb-history-general-face}
offer the choice to use the face @code{ecb-default-general-face} so
also with XEmacs the basic face-settings can be easily changed just by
customizing the face @code{ecb-default-general-face}.
@item @code{ecb-default-highlight-face}:
Basic face for highlighting the current node in an ECB-tree-buffer.
In GNU Emacs 21.X all highlighting faces used in the ECB tree-buffers
inherit from this face. Therefore the default attributes like font
etc. of a highlighting face used in a tree-buffer can be very easily
changed with face @code{ecb-default-highlight-face}.
With XEmacs there is no inheritance-feature but the options
@code{ecb-directory-face}, @code{ecb-source-face},
@code{ecb-method-face} and @code{ecb-history-face} offer the choice to
use the face @code{ecb-default-highlight-face} so also with XEmacs the
basic face-settings can be easily changed just by customizing the face
@code{ecb-default-highlight-face}.
@end itemize
With these faces you can change the basic attributes easily and fast
for ALL ECB-tree-buffers. But you are also able to display each
ECB-tree-buffer with different faces, see the different options for
every tree-buffer mentioned above.
@strong{Please note} (only for XEmacs users): Cause of the lack of the
font-inheritance feature using ONE other font for the ECB-methods
buffer can NOT be achieved just by setting
@code{ecb-methods-general-face} to @code{ecb-default-general-face} and
changing the font of this default face. In addition you have to set
the same font also for the face @code{ecb-bucket-node-face} like in
the following example:
@example
(defconst my-ecb-font
"-outline-Courier-normal-normal-13-97-96-96-c-*-iso8859-1")
(set-face-font 'ecb-default-general-face my-ecb-font)
(set-face-font 'ecb-bucket-node-face my-ecb-font)
@end example
This code sets the new defined font @code{my-ecb-font} as font for
all@footnote{Of course @code{ecb-directories-general-face},
@code{ecb-sources-general-face}, @code{ecb-methods-general-face} and
@code{ecb-history-general-face} must be set to
@code{ecb-default-general-face}!} ECB-tree-buffers (incl. the methods
buffer).
@node Small screens, Big screens, Changing faces, Tips and tricks
@section Working with small screens
@cindex Small screen
If your screen is very small so you need every square-centimeter for
displaying the buffer which you want to edit, ECB offers you a special
layouts, where only the ECB-methods buffer is displayed on top or on
left-side. Here comes what you should/can do to work best with ECB in
such a situation:
@itemize @bullet
@item First customize your ECB:
@enumerate
@item
Customize @code{ecb-layout-name} to layout-name ``top2'' (on top) or
``left9'' (on left-side)
@item
Ensure that @code{ecb-compile-window-height} is nil.
@item
Optional: Adjust the @code{ecb-windows-height} rsp. @code{ecb-windows-width}.
@item
Save your changes.
@end enumerate
@item To edit your buffers:
Call @code{ecb-toggle-ecb-windows} (also available via the menu ``ECB'' and
by @kbd{C-c . lw}) or @code{ecb-hide-ecb-windows} to hide the ECB-method buffer
so you get all the place of your screen for editing.
@item To browse and select functions:
Call @code{ecb-toggle-ecb-windows} or @code{ecb-show-ecb-windows} to
make the ECB-method buffer visible if not already. If you want select
a method/variable with the keyboard instead with the mouse you should
read the section @ref{Using the keyboard} in this online help!
@end itemize
The possibility of hiding temporally the ECB windows like described
above is also useful for all the other layouts.
@node Big screens, Simulating speedbar, Small screens, Tips and tricks
@section Working with big screens
ECB offers a layout type ``left-right'' with special ECB-tree-windows
on the left and right side of the edit-area. The layouts
``leftright1'' and ``leftright2''are examples for this layout type.
See @ref{Creating a new ECB-layout} and @ref{The layout-engine}
for details about how to create or program more layouts of this type.
Such a layout is eventually the best choice for big screens because
the several ECB-tree-windows are bigger and can display more
informations without scrolling.
With such a layout it can could be senseful to reduce the value of the
option @code{ecb-windows-width} compared to layouts of type left or
right. A value of max. 0.25 should be enough.
@node Simulating speedbar, Integrating speedbar, Big screens, Tips and tricks
@section Simulating speedbar without an extra frame
@cindex Speedbar
You can simulate a speedbar-like layout within ONE frame by doing the
following:
@enumerate
@item
Customize @code{ecb-layout-name} to layout name ``left9'', ``left12'',
``left13'' or ``left14'' dependent to what you like.
@item
Optional: Ensure that @code{ecb-compile-window-height} is nil.
@item
Optional: Adjust the @code{ecb-windows-width}.
@item
Optional: Customize @code{ecb-toggle-layout-sequence} and toggle very fast
between several layouts by @code{ecb-toggle-layout}. See the doc-strings!
@item
Optional: Customize @code{ecb-show-sources-in-directories-buffer} to
not nil if the chosen layout (see 1. and 4.) contains a
directories-tree-buffer.
@item
Save your changes.
@end enumerate
But not only simulating speedbar is possible but also full integrating
it into the ECB and the ECB-frame, @xref{Integrating speedbar}.
@node Integrating speedbar, Large directories, Simulating speedbar, Tips and tricks
@section Integrating speedbar in the ECB-frame
It is very easy to integrate speedbar into ECB. There are two
different ways to do this:
@enumerate
@item
You can either use speedbar in the directories-, sources- or
methods-window of ECB instead of the built-in directory-, sources- or
methods-browser of ECB. This can be done via the option
@code{ecb-use-speedbar-instead-native-tree-buffer}.
@item
Or you can integrate an extra speedbar-window into a layout
independent of the existence of a directory-, sources- or
methods-window. For this you can either use the built-in layout
``left-dir-plus-speedbar'' or you have to create your own layout
interactively with the command @code{ecb-create-new-layout}. This way
is not described in more details because there is nothing more to
describe - just create your layout.
@end enumerate
In general integrating speedbar into the ECB-frame makes sense for
people...
@itemize @bullet
@item
...who like the speedbar way of handling directories and source-files
but also like the ECB-way of displaying the buffer-contents (like
methods and variables in a source-file). This people should use the
option @code{ecb-use-speedbar-instead-native-tree-buffer} and set it
to @code{dir}.
@item
...who like the speedbar way of browsing things like directories,
files, file-contents etc. but who dislike the extra speedbar-frame.
@end itemize
Note: It is not necessary to integrate speedbar if you only want
parsing sources not supported by semantic. From version 1.94 on ECB
supports native parsing and displaying of such sources
(@pxref{Non-semantic sources})!
Regardless the group you belong, with the speedbar-integration feature
of ECB you can combine both worlds, the speedbar- and the ECB-world:
@enumerate
@item Choose a layout which either contains a directories- or a
sources-window but not both of them@footnote{Only one of them is
needed if you use speedbar because speedbar displays directories and
sources in one window. But if you like wasting space then you can also
use a layout with both windows...}.
Because speedbar has also display-modes for buffers and info-nodes and
some other useful things (which can be changed by the speedbar-command
@code{speedbar-change-initial-expansion-list} we recommend layouts
like ``left15'' or ``leftright3'' for using with speedbar.
@item Set the option
@code{ecb-use-speedbar-instead-native-tree-buffer} to not nil. After
this the chosen window of ECB will contain a full featured speedbar
(the only difference to standard speedbar is not residing in an extra
frame).
@end enumerate
Note: If you belong to the first group of people (s.a.) a similar
effect and usability is available by setting
@code{ecb-use-speedbar-instead-native-tree-buffer} to nil and setting
@code{ecb-show-sources-in-directories-buffer} to not nil, because this
combination displays also directories and sources in one window.
So with the option @code{ecb-use-speedbar-instead-native-tree-buffer}
you have the choice which way of displaying and handling ``things''
(directories, sources, methods...) you want (the speedbar- or the
ECB-way).
During speedbar is running within ECB (i.e.
@code{ecb-use-speedbar-instead-native-tree-buffer} is not nil) the
speedbar-command @code{speedbar} is disabled and the speedbar-command
@code{speedbar-get-focus} switches between the speedbar-window and the
edit-window@footnote{The standard behavior is switching between the
speedbar-frame and the attached frame, but this make obviously no
sense during running speedbar with ECB.}.
@strong{IMPORTANT}: ECB can only integrate speedbar-versions >=
0.14beta1! If you use lower versions of speedbar
@code{ecb-use-speedbar-instead-native-tree-buffer} has no effect.
@node Large directories, Remote directories, Integrating speedbar, Tips and tricks
@section Working with large directories
If @code{ecb-source-path} contains directories with many files and
subdirs, especially if these directories are mounted net-drives
(``many'' means here something > 500, dependent on the speed of the
net-connection and the machine), actualizing the sources- and/or
directories- buffer of ECB (if displayed in current layout!) can slow
down dramatically. If this is a problem the contents of certain
directories and also the contents of the sources-buffer can be cached
which increases the speed a lot. See the option
@code{ecb-cache-directory-contents}.
IMPORTANT: The full speed-advantage of this cache-mechanism is only
available if @code{ecb-show-sources-in-directories-buffer} is
@code{nil}, i.e. sources of a directory are displayed in the
ECB-sources-window. The reason is that only with a sources window the
tree-buffer contents for the sources can be cached (i.e. the
buffer-content of the ECB-sources-window) whereas with sources
displayed in the directories buffer only the disk-contents of a
directory are cached - which increases speed too but not so much as
with sources displayed in the extra window ECB-sources.
The cache of a directory can be only refreshed by a POWER-click (with
mouse or keyboard) onto the related directory-node in the
directories-buffer of ECB (@pxref{Using the mouse}).
See also the option @code{ecb-cache-directory-contents-not}. Here are
some useful settings for both of these options:
@itemize @bullet
@item Cache all directories with more than 500 entries:
Set @code{ecb-cache-directory-contents} to ((``.*'' . 500)) and set
@code{ecb-cache-directory-contents-not} to nil.
@item Cache only all directories > 200 beginning with /usr/
Set @code{ecb-cache-directory-contents} to ((``^/usr/.*'' . 200)) and
set @code{ecb-cache-directory-contents-not} to nil.
@item Cache all directories > 500 but NOT these beginning with /usr/:
Set @code{ecb-cache-directory-contents} to ((``.*'' . 500)) and set
@code{ecb-cache-directory-contents-not} to (``^/usr/.*'').
@end itemize
Another way for getting a faster overlook for large directories with
many source-entries is to apply an online-filter to the
sources-buffer. This can be done via the command
@code{ecb-sources-filter} or via the popup-menu of the sources-buffer.
@node Remote directories, Version-control support, Large directories, Tips and tricks
@section Working with remote directories
The term ``remote'' means directories which are remote in the sense of
TRAMP@footnote{TRAMP stands for 'Transparent Remote (file) Access,
Multiple Protocol'. This package provides remote file editing, similar
to ANGE-FTP.}, ANGE-FTP@footnote{This package attempts to make
accessing files and directories using FTP from within Emacs as simple
and transparent as possible.} or EFS@footnote{A system for transparent
file-transfer between remote hosts using the FTP protocol within
Emacs}. Each of these Emacs-addons is intended to make editing
directories and files on remote machines as transparent as possible.
@subsection General remarks
ECB supports such remote directoires out of the box and completely
transparently, i.e. you can add remote directories to the option
@code{ecb-source-path} without any restriction. ECB will handle these
directories transparently with the appropriate tool - either TRAMP,
ANGE-FTP or EFS. So when working with such a remote directory is
possible without ECB it will be possible too with active ECB - at
least as long you are ``connected''!
@strong{Caution}: Suppose you have added a remote dir (e.g.
``user@@host.at.a.server:/dir/'') to @code{ecb-source-path} and you
start ECB when you are offline, means there can be no connection
established to the remote computer (e.g. ``host.at.a.server''). Each
time ECB has to process a remote path ECB pings via the ping-program
the remote host (in the example above it would ping the host
``host.at.a.server'') to test if it is accessible. If not then this
path will be ignored by ECB@footnote{This avoids long lasting and
annoying blocking of ECB when a remote-path is not accessible: Without
a ping ECB would always try to open this directory through the
appropriate library (e.g. TRAMP) and it would depend on the
timeout-mechanism of this library (e.g. TRAMP has 60 seconds) how long
ECB would be blocked. First after this timeout ECB could start
working! A fast ``pre''-ping avoids this problem!}. Ensure that ECB
calls your ping-program (see @code{ecb-ping-program}) with the right
options (see @code{ecb-ping-options}). To avoid to many pings to the
same host ECB caches the ping result so there should be no performance
decrease. But to ensure still correct accessible-results and to avoid
using outdated cache-results ECB discards the cached value of the
accessible-state of a certain host after a customizable time-interval
(please read the documentation of
@code{ecb-host-accessible-check-valid-time}!).
@subsection Excluding remote directories from time-consuming tasks
ECB performs some tasks stealthily and interruptable by the user (see
the option @code{ecb-stealthy-tasks-delay} for additional
explanations) because these tasks are time-consuming and could
otherwise ECB block. Especially for remote directories these special
tasks can cause annoying blocks of Emacs (@pxref{Stealthy background
tasks}).
Therefore it is probably the best to switch on each of the stealthy
tasks with the @code{unless-remote} which is the default activation
(@pxref{Stealthy background tasks}). So a certain stealthy task will
be swtiched on for all local directories (and also for all mounted
drives in the LAN) but not for real remote directories used via TRAMP,
ANGE-FTP or EFS.
@subsection Caching the contents of remote directories
ECB caches per default the contents of remote directories to avoid
annoying delays. The cache is done via the option
@code{ecb-cache-directory-contents} which contains an entry which
covers the syntax of remote directories. If you do not want this
caching (which is strongly recommened) you have to remove this entry
from this option.
@node Version-control support, Using eshell, Remote directories, Tips and tricks
@section Supporting Version control systems
Beginning with version 2.30 ECB supports Version-control systems (in
the following named VC-systems). This means the special tree-buffers
of ECB display files managed by a VC-system with an appropriate
image-icon@footnote{Of course only when Emacs is capable to display
images; otherwise a suitable ascii-icon will be displayed.} in front
of the filename.
The following four options allow full control over this feature (see
also @ref{ecb-version-control}:
@table @code
@item ecb-vc-enable-support
Enable or disable this feature.
@item ecb-vc-supported-backends
The most important option for this feature. Allows to specify how ECB
should test if a directory is managed by a VC-system (how to identify
the VC-backend of a directory) and - if yes - how it should check the
VC-state of a certain file. The former ones are called
@dfn{identify-backend-functions} and the latter ones
@dfn{check-state-functions}.
@item ecb-vc-directory-exclude-regexps
Allows excluding certain directories (on a regexp-basis) from the
VC-support even if they are managed by a VC-system.
@item ecb-vc-state-mapping
Defines the mapping between the state-values returned by a
check-state-function (a function set in
@code{ecb-vc-supported-backends} and used for getting the VC-state of
a file, e.g. @code{vc-state}) and the allowed state-values ECB can
understand.
@end table
Probably the default settings will fit your needs but to get sure you
should carefully read the documentation of these options!
The following subsection give you important informations about
identify-backend-functions, check-state-functions, about working with
remote repositories.
@menu
* 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
@end menu
@node Identifying backends, Checking the state, Version-control support, Version-control support
@subsection How ECB identifies the VC-backend of a dir
ECB tries all functions added as identify-backend-funtions to the
option @code{ecb-vc-supported-backends} until one of them returns not
@code{nil} but a symbol which identifies the backend (e.g.
@code{CVS}). After this check ECB stores the result of this check
(i.e. either the identified backend or the fact that the directory is
not managed by a VC-system) for that directory in a special cache, so
the identify-backend-process will be performed only once per
directory. If for a directory a VC-backend could be identified ECB
stores not only the backend itself for that directory but also the
associated check-state-function defined in
@code{ecb-vc-supported-backends} (@pxref{Checking the state}).
You can add arbitrary functions to this options as long as they get one
directory-argument and return either nil or a backend-symbol. Per
default ECB offers the following functions to identify the VC-backend
CVS, RCS, SCCS or Subversion@footnote{For this the most recent version
of the VC-package (incl. the library vc-svn.el) is needed - as
contained in CVS Emacs}:
@table @code
@item ecb-vc-dir-managed-by-CVS DIRECTORY
Return @code{CVS} if DIRECTORY is managed by CVS. nil if not.
This function tries to be as smart as possible: First it checks if
DIRECTORY is managed by CVS by checking if there is a subdir
@code{CVS}. If no then nil is returned. If yes then for GNU Emacs it
takes into account the value of @code{vc-cvs-stay-local}: If t then
just return @code{CVS}. Otherwise ECB checks the root repository if it
is a remote repository. If not just @code{CVS} is returned. If a
remote repository it checks if the value of @code{vc-cvs-stay-local}
is a string and matches the host of that repository. If yes then just
@code{CVS} is returned. If not then ECB checks if that host is
currently accessible by performing a ping. If accessible @code{CVS} is
returned otherwise nil. This has the advantage that ECB will not be
blocked by trying to get the state from a remote repository while the
host is not accessible (e.g. because the user works offline).
Special remark for XEmacs: XEmacs has a quite outdated VC-package
which has no option @code{vc-cvs-stay-local} so the user can not work
with remote CVS-repositories if working offline for example. So if
there is no option @code{vc-cvs-stay-local} then ECB performs always
the repository check mentioned above.
@item ecb-vc-dir-managed-by-RCS DIRECTORY
Return @code{RCS} if DIRECTORY is managed by RCS. nil if not.
@item ecb-vc-dir-managed-by-SCCS DIRECTORY
Return @code{SCCS} if DIRECTORY is managed by SCCS. nil if not.
@item ecb-vc-dir-managed-by-SVN DIRECTORY
Return @code{SVN} if DIRECTORY is managed by Subversion. nil if not.
Returns always nil if the library vc-svn.el can not be found.
@end table
If ECB should support another VC-backend than CVS, RCS, SCCS or
Subversion you have to write your own identify-backend-funtion for the
used VC-backend (e.g. Clearcase)!
@subsubsection Special remarks for XEmacs
XEmacs contains only a quite outdated VC-package, especially there is
no backend-independent check-vc-state-function available (like
@code{vc-state} for GNU Emacs). Only for CVS a check-vc-state-function
is available: @code{vc-cvs-status}. Therefore ECB adds per default
only support for CVS and uses @code{ecb-vc-managed-by-CVS} rsp.
@code{vc-cvs-status}. See also @ref{Known VC-problems}!
@node Checking the state, Remote repositories, Identifying backends, Version-control support
@subsection How ECB checks the VC-state of a file
After ECB has identified the VC-backend of a directory it will display
the VC-state (e.g. up-to-date, edited, needs-mergs etc...) with a
suitable image-icon in the tree-windows of the ECB-file-browser. To
get this state for a certain file ECB uses that check-state-function
stored in the cache for the directory of that file (@pxref{Identifying
backends}).
You can add any arbitrary functions as check-state-function to
@code{ecb-vc-supported-backends} as long as they get one
filename-argument and return a state-symbol (e.g. @code{up-to-date}.
ECB can understand a certain set of state-values which are then
mapped to suitable image-icons which will in turn be displayed in
front of the filename in the file-browser. Because the values a
check-state-function return can differ from that state-values ECB
understands, ECB offers an option to define a appropriate
state-mapping. The name of this option is @code{ecb-vc-state-mapping}.
See the documentation of this option to get a list of all state-value
ECB understands.
Per default ECB uses - when running under GNU Emacs - the function
@code{vc-state} of the VC-package@footnote{The VC-package of Emacs
offers a standardised and uniform interface for several backends; per
default CVS, RCS, SCCS and Subversion are supported by the
VC-package.} to check the state for the backends CVS, RCS, SCCS and
Subversion. So the default-value of @code{ecb-vc-state-mapping}
contains a mapping between these values @code{ecb-vc-state} can return and
that state-values ECB understands.
If ECB should support other VC-backends than CVS, RCS, SCCS and
Subversion (e.g. Clearcase) you should add that new backend to the
VC-package (see the initial comments of vc.el how to do this) then ECB
will automatically support that new backend. Alternatively it may be
sufficient if you write your own check-state-function for this backend and
add the needed mapping to @code{ecb-vc-state-mapping} if necessary.
@subsubsection Getting heuristic state-values or real ones for CVS
The interface of GNU Emacs' VC-package offers two different ways to
get the VC-state of a file:
@itemize @bullet
@item The real, fresh and expensive approach
VC has a function @code{vc-recompute-state} which always performs a
command ``cvs status'' to get a fresh and real state for a file. As
you can imagine this operation can be very expensive and long lasting
depending on the location of the repository. But the CVS-backend of VC
offers with the option @code{vc-cvs-stay-local} a way to tell Emacs to
stay local even for the sake of getting a real state.
@item The heuristic approach:
The function @code{vc-state} always returns a ``heuristic'' state
which should be used when a fresh and real state is not necessary.
With @code{vc-state} the option @code{vc-cvs-stay-local} will never
take effect.
@end itemize
VC/CVS actually does it this way (regardless if ECB is active or not):
When you visit a file, it always uses just the heuristic to get the
state (comparing file times), regardless of the setting of
@code{vc-cvs-stay-local}. This is because the "fresh-but-slow" state
is determined by calling "cvs status" on the file, and this was deemed
unacceptably slow if done at visiting time under any conditions.
The state is updated by calling @code{vc-recompute-state} prior to
@code{vc-next-action} (C-x v v) which either checks a file in or out.
IF @code{vc-cvs-stay-local} is nil, then this does in fact call "cvs
status" to get the "fresh-but-slow-state", but if
@code{vc-cvs-stay-local} is t, then it just compares the file times
again.
But under certain conditions (e.g. if called for files not already
visited or for files their VC-state has been changed from outside
Emacs, e.g. by checking in the file via command line) @code{vc-state}
does not compute a new heuristic state but returns a cached one
(cached by the VC-package itself not by ECB) which does not reflect
the current VC-state. Example: if you have edited a file within Emacs
and then checked in from outside Emacs @code{vc-state} returns a wrong
state until you call @code{revert-buffer} for this file. Therefore ECB
offers the check-state-function @code{ecb-vc-state} which does the
same as @code{vc-state} but it clears the internal caches of the
VC-package for that file before calling @code{vc-state}.
The bottom line for you is this: If you use @code{ecb-vc-state} in
@code{ecb-vc-supported-backends} to get the version control state,
then you get the same policy that VC uses and you get always a
``correct'' heuristic state (as correct as possible a heuristic state
can be). There should no harm if you use @code{vc-recompute-state} as
a replacement function if you want to get fresh and real state-values,
but then (a) you must make sure to set @code{vc-cvs-stay-local} to
nil, and (b) fetching the state over the network under all conditions
was deemed unacceptably slow in VC.
@node Remote repositories, Refreshing the VC-state, Checking the state, Version-control support
@subsection Important informations about remote repositories
At least CVS can be used in a mode called ``Client/Server'' which
means the root repository is located on a remote machine. We call a
repository which can not being mounted by the client-machine (which
contains the working directory) a @dfn{remote repository}. In most
cases getting the fresh and real VC-state for such repositories will
be unacceptable slow or often users will work offline means with no
connection available to the remote host. To avoid problems like these
ECB offers first an option @code{ecb-vc-directory-exclude-regexps} to
exclude such directories with a remote repository from the VC-support
of ECB and secondary the identify-backend-funtion
@code{ecb-vc-dir-managed-by-CVS} behaves smart with that respect
(@pxref{Identifying backends}). See also
@code{ecb-vc-xemacs-exclude-remote-cvs-repository}!
@subsubsection Remote paths and the VC-support of ECB
ECB supports working with remote directories like TRAMP- or
EFS-directories (@pxref{Remote directories}). Do not confuse remote
directories with remote repositories. A local directory located on
your disk and set in @code{ecb-source-path} can have a remote
repository if managed by a VC-system. A remote directory means a path
in the format of TRAMP, ANGE-FTP or EFS set in @code{ecb-source-path}.
Its very likely that getting the VC-state of files contained in such a
remote directory would be extremly expensive and therefore ECB would
be blocked quite long even if the VC-check is performed stealthy
(@pxref{Stealthy background tasks}).
To avoid problems with such remote directories ECB prevents per
default such directories from being processed by the VC-support of
ECB. But if a user is dying to having the VC-state being displayed in
the tree-buffers ECB offers two ways to switch on the VC-support - see
the option @code{ecb-vc-enable-support}: This option is set per
default to the value @code{unless-remote} which means remote paths
will not be processed but it can be set to @code{t} which means
process all directories regardless if remote or not. It's strongly
recommended to use @code{unless-remote}!
@node Refreshing the VC-state, Adding new backends, Remote repositories, Version-control support
@subsection How to refresh ECB-state-display when changed outside
If all actions concerning version controlling of a file are performed
within Emacs with commands offeres by VC then the displayed state for
such a file in the tree-buffers of ECB will be always correct - in
that sense that ECB will always display that state which the
check-state-function for the file will return. At least with GNU Emacs
for the backends CVS, RCS, SCCS and Subversion this will be true. With
XEmacs only for CVS. For other backends see @ref{Adding new backends}.
But if the VC-state of a file will be changed outside of Emacs
(unfortunately PCL-CVS must be called ``outside'' too because PCL-CVS
doesn't use the functions of the VC-package of Emacs for checking-in
or -out) then ECB can not automatically recognize this and therefore
it can not aurtomatically update the displayed state-image-icon. You
have to tell ECB for which files in the tree-buffers the VC-state
should be recomputed. This can be done via the popup-menus of the
ECB-tree-buffers - The following popup-commands are offered in the
submenu ``Version Control'':
@table @asis
@item ECB-directories-buffer (if sources are displayed within):
``Recompute state for file'' and ``Recompute state for dir'' whereas
the latter one recomputes the VC-state for all files of that directory
the file belongs.
@item ECB-sources-buffer
``Recompute state for file'' and ``Recompute state for dir'' whereas
the latter one recomputes the VC-state for all files currently
displayed in the sources-buffer.
@item ECB-history-buffer
``Recompute state for file'' and ``Recompute state for whole history''
whereas the latter one recomputes the VC-state for all file-entries currently
displayed in the history-buffer.
@end table
@strong{Caution}: The state will only recomputed right under all
situations if you use either @code{ecb-vc-state} or
@code{vc-recompute-state} as check-state-function in
@code{ecb-vc-supported-backends} (@pxref{Checking the state}).
Of course all these commands update the VC-state in all visible
tree-buffers the file is currently displayed (e.g. often a file is
displayed in the sources- and the history-buffer)!
For general informations about the usage of popup-menus in ECB see
@ref{Using the mouse} (subsection ``The right mouse button'').
In addition to these popup-commands using the POWER- rsp. Shift-click
(@pxref{Using the mouse}) onto a directory in the directory-window of
ECB refreshes the VC-state-values of all files contained in this
directory too.
@node Adding new backends, Known VC-problems, Refreshing the VC-state, Version-control support
@subsection Necessary steps and informations for adding new backends
There are mainly three necessary steps for adding a new@footnote{i.e.
not already supported by the VC-package because all these backends are
automatically supported by ECB too!} backend BE which should be
supported by ECB:
@enumerate
@item Adding an identify-backend-function to @code{ecb-vc-supported-backends}
ECB needs a function how to identify the new backend BE for a certain
directory. If there exists already a library (other then VC)
supporting this backend then this library propably contains already
such a function which can be used or can be used at least with a small
elisp-wrapper. If no elisp-library for backend BE exists then you have
probably write the full identify-backend-function for your self. This
function has to be added to @code{ecb-vc-supported-backends}.
@item Adding an check-state-function to @code{ecb-vc-supported-backends}
Associated to the new identify-backend-function mentioned in step 1 a
new check-state-function is needed which can be used by ECB to get the
VC-state for a file. See @ref{Checking the state} for a description
about the needed interface of such a function. In combinatio with the
identify-backend-function from step 1 this function has to be added to
@code{ecb-vc-supported-backends}.
@item Enabling automatic state-update after checkin/out
This step is not essential if you do not need the displayed VC-state
automatically updated after a checkin/out of a file via the commands
available for backend BE (e.g. clearcase.el offers for the backend
Clearcase elisp-commands to checkin and checkout a file which then
should also update the displayed state in the ECB-tree-buffers. All
you need is a way to tell these commands that they should clear the
ECB-VC-cache for the file and then restart the ECB-VC-check-mechanism.
This should be done after these commands have finished their original
job.
ECB enables this per default for all backends supported by the
VC-package with the following code. Maybe this is a good starting
point.
@example
@group
(defvar ecb-checkedin-file nil
"Stored the filename of the most recent checked-in file. Is only set by the
after-advice of `vc-checkin' and `ecb-vc-checkin-hook' \(resets it to nil).
Evaluated only by `ecb-vc-checkin-hook'.
This is the communication-channel between `vc-checkin' and
`ecb-vc-checkin-hook' so this hook-function gets the filename of the
checked-in file.")
(defadvice vc-checkin (after ecb)
"Simply stores the filename of the checked-in file in `ecb-checkedin-file'
so it is available in the `vc-checkin-hook'."
(setq ecb-checkedin-file (ecb-fix-filename (ad-get-arg 0))))
(defun ecb-vc-checkin-hook ()
"Ensures that the ECB-cache is reset and the entry for the most recent
checkedin file is cleared. Uses `ecb-checkedin-file' as last checked-in file."
(when ecb-checkedin-file
(ecb-vc-cache-remove ecb-checkedin-file)
(ecb-vc-reset-vc-stealthy-checks)
(setq ecb-checkedin-file nil)))
@end group
@end example
@end enumerate
@node Known VC-problems, ,Adding new backends, Version-control support
@subsection Currently know problems with the VC-support
@subsubsection Remote repositories and XEmacs
Currently there are mostly problems related to XEmacs - cause of its
outdated VC-package which allows no heuristic state-computation but
always runs ``cvs status'' to get the VC-state for a file (done by
@code{vc-cvs-status}). This can be horrible slow for remote
CVS-root-repositories. Now ECB performs the VC-check stealthy and only
in idle-time of Emacs but even so XEmacs can be blocked espcially if
the cygwin-build of XEmacs is used: This XEmacs-version is
substantially slower concering file-operations and has sometimes a
very slow and delayed response-behavior for mouse- and keyboard
interrupts - so even ECB let the user interrupt by using
@code{input-pending-p} before getting the VC-state of a file XEmacs
sometimes does not react to such user-interrupts and seems to be
blocked.
Current solution: ECB offers the option
@code{ecb-vc-xemacs-exclude-remote-cvs-repository} which excludes
remote repositories from being checked. This option is per default t
for XEmacs. Whenever XEmacs syncs up its VC-package with the Emacs one
this option will automatically take no effect.
@node Using eshell, Grepping directories, Version-control support, Tips and tricks
@section Optimal using of eshell in ECB
@cindex eshell
ECB offers a very smart integration of the ``eshell'' if you are using
a compile window (@pxref{Temp- and compile-buffers})@footnote{Of
course you can use eshell also if there is no compile-window. Then it
is just displayed in the edit-area and there is no special
integration.}
Here is a short summary of provided features:
@itemize @bullet
@item
Ability to jump to the eshell buffer within the compilation window by
simply call @code{eshell} (bound to @kbd{C-c . e}). If the eshell
isn't running it will be started.
@item
Expands the compilation window when you run commands. So for example
it allows you to view the eshell in minimized mode and then when you
run ``ls'' the window automatically expands (but always depending on
the output of the command you run).
@item
Synchronizes the current directory of the eshell with the current
buffer in the current active edit-window of ECB.
@item
Provides smart window layout of the eshell buffer. This makes sure
that the eshell is taking up the exact amount of space and that
nothing is hidden.
@end itemize
Here comes a detailed explanation of these features and how to use it
(all these features are only available if you use a persistent
compile-window, i.e. if @code{ecb-compile-window-height} is not nil):
You do not have to learn a new command for the eshell-start - just
call @code{eshell} (for convenience also bound to @kbd{C-c . e}) and
the eshell will displayed in the compile-window of ECB (if eshell is
not already alive then it will be started automatically).
ECB tries to display the contents of the eshell-buffer as best as
possible, means ECB can autom. enlarge and shrink the compile-window
so the contents of the eshell are fitting the window. See option
@code{ecb-eshell-enlarge-when-eshell} and
@code{ecb-eshell-fit-window-to-command-output}. Normally this is done
autom. but you can also you the standard compile-window
enlarging-command of ECB: @code{ecb-toggle-compile-window-height}.
ECB tries also to recenter the eshell-buffer as best as possible.
Normally this is done autom. but you can do it on demand with the
command @code{ecb-eshell-recenter}.
If option @code{ecb-eshell-synchronize} is true then ECB always
synchronizes the command prompt of eshell with the directory of
current source-buffer of the current active edit-window.
With the option @code{ecb-eshell-auto-activate} you can start eshell
autom. in the compile-window when ECB is started but of course if a
compile-window exists.
@node Grepping directories, Working with JDEE, Using eshell, Tips and tricks
@section Grepping directories with ECB
ECB offers in the popup-menus in the directories- and
sources-tree-buffer commands for easy (recursive) grepping the current
directory under point (directory-buffer) rsp. the current-directory
(sources-buffer). In every case just the function of the options
@code{ecb-grep-function} rsp. @code{ecb-grep-find-function} is called
and the @code{default-directory} is tempor. set to the chosen
directory so the grep will performed in this directory regardless of
the @code{default-directory} of current buffer in the edit-window.
Other smart things beyond that are not done by ECB, see also
@code{ecb-grep-function}!
So, how to exclude some subdirectories or files from the grep?
Basically this has to be done with the ``-prune'' option of the
find-utility: If the standard-grep facility of Emacs is used then this
is not easy but with the library @file{igrep.el} there is a convenient
way to exclude things like CVS- or RCS-directories from the find-call:
See the variable @code{igrep-find-prune-clause} of the library
@file{igrep.el}.
@node Working with JDEE, Compile-window on demand, Grepping directories, Tips and tricks
@section Working best with ECB and JDEE
ECB is completely language independent, i.e. it works with any
language supported by semantic (e.g. C, C++, Java, Elisp etc.).
But there are some special integrations for the great
Java-Development-Environment JDEE:
@itemize @bullet
@item Displaying contents of class under point
With the command @code{ecb-jde-display-class-at-point} you can display
the contents of the class which contains the definition of the
``thing'' at point (which can be a method, variable etc.).
@item Creating new source-files
The popup-menus in the directories- and the sources-buffer offer a
command ``Create Source'' which allows easy creating new java-sources
by calling the command @code{jde-gen-class-buffer}.
@item Adding user-extensions to the popup-menus
The options @code{ecb-directories-menu-user-extension} and
@code{ecb-sources-menu-user-extension}@footnote{If you need a dynamic
way of menu-extension then you should have a look at the options
@code{ecb-directories-menu-user-extension-function} and
@code{ecb-sources-menu-user-extension-function}.} allow adding often
used JDEE-commands to the popup-menus of the directories- or
sources-buffer. One example is to add building the project of current
directory. Here is a function which could be added to
@code{ecb-directories-menu-user-extension}:
@example
@group
(defun ecb-dir-popup-jde-build (node)
"Build project in directory."
(let ((project-file
(expand-file-name jde-ant-buildfile (tree-node-get-data node))))
(jde-ant-build project-file "build")))
@end group
@end example
Of course you can add entries to the option
@code{ecb-methods-menu-user-extension} and
@code{ecb-methods-menu-user-extension} too.
@end itemize
@node Compile-window on demand, Non-semantic sources, Working with JDEE, Tips and tricks
@section Displaying the compile-window on demand
If you like displaying all output of compile/grep/etc. an all
temp-buffers like *Help*-buffers in an extra compile-window
(@pxref{Temp- and compile-buffers}) but you dislike wasting the space
of this compile-window if you are just editing then you can get a
compile-window ``on demand''. Just do the following:
@enumerate
@item
Customize @code{ecb-compile-window-height} to not nil and save it for
future sessions. This gives you an extra compile-window at the
bottom.
@item
Add the following to your .emacs:
@example
(add-hook 'ecb-activate-hook
(lambda ()
(let ((compwin-buffer (ecb-get-compile-window-buffer)))
(if (not (and compwin-buffer
(ecb-compilation-buffer-p compwin-buffer)))
(ecb-toggle-compile-window -1)))))
@end example
This hides the extra compile-window directly after the start of ECB
because there is no need for a compile-window at this moment. But the
hiding will not be done if there is a compile-window and if a
``compile-buffer'' in the sense of @code{ecb-compilation-buffer-p} is
displayed in this compile-window. Without this additional check the
compile-window would always be hidden after the ECB-start even when
ECB is reactivated after a deactivation by the window-manager-support
of ECB (@pxref{Window-managers and ECB}); but in these cases we want
to preserve the state before deactivation as good as possible (see
also option @code{ecb-split-edit-window-after-start}).
@end enumerate
This is all you have to do. Now if you run @code{compile} (or
@code{grep} or other compile-modes) or display temp-buffers like
*Help*-buffers then ECB autom. displays the compile-window at the
bottom and display the output there.
If you have finished with using the compile- or temp-output (e.g.
fixing errors) then you can throw away the compile-window just by
@code{ecb-toggle-compile-window} - ECB will reactivate it autom.
before next compilation or help-buffer-display.!
@node Non-semantic sources, Hide-show, Compile-window on demand, Tips and tricks
@section Parsing and displaying non-semantic sources
ECB is mostly designed to display parsing information for files
supported by semantic. But beginning with version 1.94 it also
supports other parsing engines like imenu and etags, so also files not
supported by semantic but by imenu/etags can be displayed in the
Method-buffer of ECB. See @ref{Definition of semantic- and
non-semantic-sources} for a description of ``semantic-sources'' and
``non-semantic-sources''.
If support of non-semantic-sources is enabled then ECB will display
the contents of all sources which can be displayed by speedbar too.
This comes from the fact that ECB uses speedbar-logic to parse sources
with imenu or etags.
In most cases imenu-parsing is preferable over etags-parsing because
imenu operates on Emacs-buffers and needs no external tool and
therefore parsing works also if current contents of a buffer are not
saved to disk.
This section describes all important aspects about parsing and
displaying file-contents of file-types not supported by semantic but
by imenu and/or etags.
@subsection Enabling parsing and displaying of non-semantic-sources
Enabling is simply done with the option @code{ecb-process-non-semantic-files}.
ECB offers an option @code{ecb-non-semantic-parsing-function} to
specify on a major-mode basis which parsing-method should be used:
imenu or etags. Normally there should be no need to change this option
but read the documentation of this option (@pxref{ecb-non-semantic})
for further details.
IMPORTANT:
@itemize
@item
If imenu-parsing should be used then the option
@code{speedbar-use-imenu-flag} must be set to not @code{nil}!
@item
If some non-semantic-sources are not parsed (i.e. there is an empty
Methods-buffer) and you think that they should then maybe they are neither
supported by imenu nor by etags or you have to check the options
@code{ecb-non-semantic-parsing-function} and
@code{speedbar-dynamic-tags-function-list} and - especially for etags -
@code{speedbar-fetch-etags-parse-list}, @code{speedbar-fetch-etags-arguments}
and @code{speedbar-fetch-etags-command}.
@item
Even with support for semantic-, imenu- and etags-parsing there will
remain some file-types rsp. @code{major-modes} which are not
parse-able, neither by semantic, imenu nor etags. This is no problem
because these files simply have an empty Methods-buffer. But
nevertheless you will get a message ``Sorry, no support for a file of
that extension'' which comes from the speedbar-library and can not
switched off. Therefore if a @code{major-mode} is known as not
parse-able by semantic, imenu or etags it can be added to the option
@code{ecb-non-semantic-exclude-modes} and then it will be excluded
from being tried to parsed and this (annoying) message will not occur.
@end itemize
@subsection Automatic rescanning/reparsing of non-semantic-sources
In contrast to semantic (see @code{global-semantic-auto-parse-mode})
there is no built-in mechanism for autom. reparsing
non-semantic-sources and then updating the contents of the
Methods-buffer.
For non-semantic-sources you have always at least to call
@code{ecb-rebuild-methods-buffer} (bound to @kbd{C-c . r}) or saving
the source-file (if @code{ecb-auto-update-methods-after-save} is true)
to update the Method-buffer@footnote{Maybe future versions of ECB (>
1.94) will offer an autom. mechanism for this.}.
Depending on the parsing-mechanism the following options have to be
switched on so ECB can rebuild the methods-buffer for
non-semantic-sources:
@itemize @bullet
@item imenu:
The imenu-option @code{imenu-auto-rescan} must be enabled and
@code{imenu-auto-rescan-maxout} has to be set big enough to auto-parse
big files too! But this results not directly in an autom. updated
Method-buffer. This is first done after calling the command
@code{ecb-rebuild-methods-buffer} or saving the source-file (if
@code{ecb-auto-update-methods-after-save} is true).
@item etags:
Only if @code{ecb-auto-save-before-etags-methods-rebuild} is switched on
the command @code{ecb-rebuild-methods-buffer} rebuilds the
method-buffer with current source-contents. See description of this
option for an explanation.
@end itemize
Tip: If you want to program your own real. automatic
rescan/reparse/rebuild mechanism for non-semantic-sources you can do:
Adding to @code{after-change-functions} a function F which either runs
itself @code{ecb-rebuild-methods-buffer-for-non-semantic} or which
adds only another function FF to an idle-timer and the function FF
runs @code{ecb-rebuild-methods-buffer-for-non-semantic}. The latter
approach has the advantage that the reparse/rebuild is not performed
immediately after every change but first after Emacs is idle for a
senseful interval (e.g. 4 seconds) after last change. Of course the
function FF has to cancel its own idle-timer at the end, so the next
idle-timer is first started again after the next change (i.e. by
function F which is still contained in @code{after-change-functions}.
@subsection Customizing the display of the tags
For non-semantic-sources ECB uses does no special organizing of tags
in groups and sub-tags but it completely uses the tag-hierarchy the
imenu- and etags-parsers of speedbar return. So the displayed tag
hierarchy can only be customized with some options speedbar offers for
this:
@code{speedbar-tag-hierarchy-method},
@code{speedbar-tag-group-name-minimum-length},
@code{speedbar-tag-split-minimum-length} and
@code{speedbar-tag-regroup-maximum-length}. See the speedbar
documentation for details about these options.
With the option @code{ecb-method-non-semantic-face} you can define the
face used for displaying the tags in the Method-buffer for
non-semantic-sources.
@code{ecb-non-semantic-methods-initial-expand} can be useful too.
@node Hide-show, Window-managers and ECB, Non-semantic sources, Tips and tricks
@section Using hide-show from the methods-buffer-menu
The popup-menu of the Methods-buffer offer two entries for either
hiding or showing the block which is related to the selected tag
(that tag for which the popup-menu was opened):
@itemize @bullet
@item ``Jump to tag and hide block'':
Jumps to the tag and calls @code{hs-hide-block} from the
hideshow-library which is shipped with (X)Emacs. After that the block
is hidden, i.e. only the header-line of that tag (method, variable
etc.) is visible, the rest is hidden behind the ``...''.
@item ``Jump to tag and show block'':
Jumps to the tag and calls @code{hs-show-block}. This shows the related
hidden block if the block was hidden via @code{hs-hide-block} or the
menu-entry ``Jump to tag and hide block'' (s.a.).
@end itemize
For this feature the library @file{hideshow.el} is used which should
normally being included in the (X)Emacs-distribution. If this library
is not loaded into Emacs, ECB does this automatically before the first
call to one of these menu-entries.
IMPORTANT: If in some @code{major-mode} hiding and showing does not
work as you expect it to work then you must probably add an entry for
this @code{major-mode} to the hideshow-variable
@code{hs-special-modes-alist}. See the documentation of this variable
for further details. One example of such a @code{major-mode} is
@code{jde-mode} of the Java Development Environment JDEE; just add an
entry for it like the already contained entries for @code{c++-mode} or
@code{java-mode} and hiding and showing will work for you with JDEE
too.
@node Window-managers and ECB, Using semanticdb, Hide-show, Tips and tricks
@section Support of several Emacs-window-managers
@cindex winring
@cindex escreen
@cindex window-manager
There are several window-managers available which offer an easy
interface to jump between different window-configurations within the
same frame. A window configuration is the layout of windows and
associated buffers within a frame. There is always at least one
configuration, the current configuration. You can create new
configurations and cycle through the layouts in either direction.
Window configurations are often named or numbered, and you can jump to
and delete named rsp. numbered configurations.
Without special support by ECB these window-managers would not work in
combination with ECB!
ECB currently supports the following managers:
@itemize @bullet
@item winring.el:
Written by Barry A. Warsaw @email{bwarsaw@@python.org}, available at
@ifhtml
@uref{http://www.python.org/emacs/}
@end ifhtml
@ifnothtml
@url{http://www.python.org/emacs/}
@end ifnothtml
@item escreen.el:
Written by Noah Friedman @email{friedman@@splode.com}, available at
@ifhtml
@uref{http://www.splode.com/~friedman/software/emacs-lisp/}
@end ifhtml
@ifnothtml
@url{http://www.splode.com/~friedman/software/emacs-lisp/}
@end ifnothtml
@end itemize
@strong{IMPORTANT}: With one of these window-managers installed and
active you can run applications like Gnus, VM or BBDB in the same
frame as ECB! Just use different window-configurations (winring.el) or
escreens (escreen.el) for ECB and the other applications. Especially
with winring.el you can give every configuration a descriptive name
like ``ECB'' or ``Gnus''; afterwards you can jump to a
window-configuration by name!
When you go back to the ECB-window-configuration (winring.el) or the
ECB-escreen (escreen.el) with any of the special
window-manager-commands then the state of ECB will be restored exactly
as you have left it when going to another window-configuration rsp.
escreen. This includes the whole splitting state of the edit-area and
the visibilty of the ecb-windows and of the compile-window!
The rest of this section describes how to enable the special
ECB-support for these window-managers and how to use them.
@subsection Enabling of the support
Every support must be enabled explicitly:
@itemize @bullet
@item winring:
Call @code{ecb-winman-winring-enable-support}. This @strong{MUST} be
done @strong{BEFORE} the first call to any winring-command, so also
before calling @code{winring-initialize}!
@item escreen:
Call @code{ecb-winman-escreen-enable-support}. This @strong{MUST} be
done @strong{BEFORE} the first call to any escreen-command, so also
before calling @code{escreen-install}!
@end itemize
If a window-manager-support should be enabled autom. after Emacs-start
just put the following into your @file{.emacs}:
@lisp
@group
(ecb-winman-winring-enable-support)
(winring-initialize)
;; or - if you like escreen more
(ecb-winman-escreen-enable-support)
(escreen-install)
@end group
@end lisp
@subsection Usage of a window-manager in combination with ECB
After enabling the support of one of the supported window-managers
just go on as described in the commentary or introduction of the
respective library-file(s) of the window-manager. Here is a short
description:
@itemize @bullet
@item winring:
First you have to define how to identify the ECB-window-configuration,
i.e. the configuration with activated ECB. This done with the option
@code{ecb-winman-winring-name}. There is always only one
window-configurations with name @code{ecb-winman-winring-name}!
Then run @code{winring-initialize}. If ECB is active then the
resulting window-configuration is the ECB-window-configuration.
Otherwise you can create the ECB-window-configuration when you first
time call @code{winring-new-configuration} with name equal to
@code{ecb-winman-winring-name}. In general you can run all commands of
the winring-library. If you jump to the ECB-window-configuration then
ECB will be autom. activated and if you leave the
ECB-window-configuration then ECB will autom. deactivated.
@item escreen:
First you have to define how to identify the ECB-escreen
i.e. that escreen with activated ECB. This done with the option
@code{ecb-winman-escreen-number}. There is always only one
escreen with number @code{ecb-winman-escreen-number}!
Then run @code{escreen-install} (deactivates ECB if currently
running). After that you can call @code{escreen-create-screen} and
@code{escreen-goto-screen}@footnote{And of course all other
@code{escreen-goto-*} commands!}. These commands autom. activate ECB
if creating or selecting the escreen with number
@code{ecb-escreen-number} (default = 1) and autom. deactivate ECB if
leaving the ECB-escreen.
@end itemize
@subsection Disabling the support
There is normally no need to do this but nevertheless it can be done
by @code{ecb-winman-escreen-disable-support} rsp.
@code{ecb-winman-winring-disable-support}.
@node Using semanticdb, , Window-managers and ECB, Tips and tricks
@section Using semanticdb to jump to type-tags defined in other files
In OO-languages like CLOS, eieio and C++ there can be type-tags in the
method-buffer which are somehow virtual because there is no definition
in the current source-file. But such a virtual type collects all its
outside defined members like methods in C++ which are defined in the
@file{*.cc} file whereas the class-definition is defined in the
associated header-file. ECB uses semanticdb to open the definition-file
of such a tag and to jump to the definition of this tag. Same for
parent-tags in the methods-buffer. This feature can only work
correctly if semanticdb is well configured!
Here is a C++-example:
This class is defined in a file @file{ParentClass.h}:
@example
@group
class ParentClass
@{
protected:
int p;
@};
@end group
@end example
This class is defined in a file @file{ClassWithExternals.h}
@example
@group
#include "ParentClass.h"
class ClassWithExternals : public ParentClass
@{
private:
int i;
public:
ClassWithExternals();
~ClassWithExternals();
@};
@end group
@end example
Both the constructor and the destructor of the class
``ClassWithExternals'' are defined in a file
@file{ClassWithExternals.cc}:
@example
@group
#include "test.h"
ClassWithExternals::ClassWithExternals(int i,
boolean b,
char c)
@{
return;
@}
void
ClassWithExternals::~ClassWithExternals()
@{
return;
@}
@end group
@end example
ECB displays the contents of @file{ClassWithExternals.cc} in its methods-buffer like
follows:
@example
@group
[-] [Includes]
`- test.h
[-] ClassWithExternals
| +ClassWithExternals (+i:int, +b:class boolean, +c:char):ClassWithExternals
`- +~ClassWithExternals ():void
@end group
@end example
Both the constructor and the destructor of the class
``ClassWithExternals'' are grouped under their class-type. ECB now
uses semanticdb to jump to the definition of class
``ClassWithExternals'' when you click onto the type-node
``ClassWithExternals'' in the methods-buffer.
The contents of @file{ClassWithExternals.h} are displayed like
follows:
@example
@group
[-] [Includes]
`- ParentClass.h
[-] ClassWithExternals:class
| [-] [Parents]
| `- ParentClass
| [-] [Variables]
| `- -i:int
| +ClassWithExternals ():ClassWithExternals
| +~ClassWithExternals ():void
`- [+] [Misc]
@end group
@end example
ECB uses semanticdb to jump to the definition of the class
``ParentClass'' when you click onto the node ``ParentClass''.
To enable this feature @code{global-semanticdb-minor-mode} must be
enabled and semanticdb must be correctly configured. This means
mainly that the option @code{semanticdb-project-roots} must be setup
well. See the manual of semanticdb for further informations about
this.
@node Elisp programming, Conflicts and bugs, Tips and tricks, Top
@chapter Entry points for Elisp programmers
This chapter describes how ECB can be used/programmed/driven by an
Elisp-program. This contains:
@menu
* 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
@end menu
@node List of variables, List of hooks, Elisp programming, Elisp programming
@section Variables for Elisp-programs
Variables an Elisp-program can use beyond those ones mentioned in
@ref{The layout-engine}:
@itemize @bullet
@item @code{ecb-source-path-functions}
@end itemize
Look at the documentation of these variables to get a description.
@node List of hooks, tree-buffer, List of variables, Elisp programming
@section Available hooks of ECB
The following hooks are available:
@cindex Hooks
@itemize @bullet
@item @code{ecb-activate-before-new-frame-created-hook}
@item @code{ecb-activate-before-layout-draw-hook}
@item @code{ecb-activate-hook}
@item @code{ecb-after-directory-change-hook}
@item @code{ecb-before-activate-hook}
@item @code{ecb-before-deactivate-hook}
@item @code{ecb-common-tree-buffer-after-create-hook}
@item @code{ecb-current-buffer-sync-hook}
@item @code{ecb-deactivate-hook}
@item @code{ecb-directories-buffer-after-create-hook}
@item @code{ecb-hide-ecb-windows-after-hook}
@item @code{ecb-hide-ecb-windows-before-hook}
@item @code{ecb-history-buffer-after-create-hook}
@item @code{ecb-methods-buffer-after-create-hook}
@item @code{ecb-redraw-layout-after-hook}
@item @code{ecb-redraw-layout-before-hook}
@item @code{ecb-show-ecb-windows-after-hook}
@item @code{ecb-show-ecb-windows-before-hook}
@item @code{ecb-sources-buffer-after-create-hook}
@end itemize
Look at the documentation of these hooks to get a detailed description.
@node tree-buffer, Adviced functions, List of hooks, Elisp programming
@section The library tree-buffer.el
The library tree-buffer.el is an ECB-independent library written
completely in emacs lisp and can be used also by other applications
than ECB. But the main purpose of tree-buffer.el is to offer a small
but powerful API to create new tree-buffers for ECB, add new
tree-nodes to a tree-buffer and thus use such a tree-buffer to display
arbitrary information structured by a tree.
This chapter is for emacs-lisp-programmers and describes how to create
a new tree-buffer, how to add new tree-nodes to a tree-buffer
(includes removing and updating already existing tree-nodes) and how
to use the offered tree-buffer- and tree-node-APIs.
@menu
* 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
@end menu
@node Introduction, A new tree-buffer, tree-buffer, tree-buffer
@subsection General description of tree-buffers
This subchapter is a general introduction in the main concepts of a
tree-buffer.
@subsubsection What is a tree-buffer?
A @dfn{tree-buffer} is meant to display certain informations (e.g. a
directory-tree) in a tree-structure consisting of @dfn{tree-nodes}.
Every line in a tree-buffer displays exactly one tree-node. Each node
has exactly one parent-node and can have any arbitrary number of
@dfn{children}-nodes. If a tree-node has no children then it is called
a @dfn{leaf}. A tree-node contains several ``slots'' wheras the most
important ones are the ``name'', ``displayed-name'' and ``data''. See
@ref{A new tree-node} for a detailed explanation.
The difference between a natural tree like a fir and a tree-buffer is
that the root(-node) of a tree-buffer is not visible but only its
children. In the example below the nodes parent-node-1 and
parent-node-2 are the children of the invisible root-node. Each
tree-buffer has exactly one root-node which is created automatically
by `tree-buffer-create'.
If a tree-node contains at least one child it is displayed with a
special expand/collapse-symbol (see the example below). This symbol
allows expanding (rsp. collapsing) the tree-node wheras expanding
means to display the children-nodes and collapsing means to hide the
childrens of a tree-node.
Here is an example of a tree-buffer:
@example
@group
<root-node> ------------------------[root-node (invisible)]
[+] <parent-node-1> -------.
[-] <parent-node-2> -------|
[-] <expanded> --------|
<leaf-node-1> -----|
<leaf-node-2> -----|-----[tree-nodes]
<leaf-node-3> -----|
<leaf-node-4> -----|
[+] <collapsed> -------
|
`-----------------[expand/collapse-symbol]
@end group
@end example
In most cases an action is triggered when clicking with the mouse onto
a tree-node@footnote{Of course using the keyboard is also possible,
see @ref{Tree-buffer keybindings}.} (e.g. clicking onto
``leaf-node-1'' or ``parent-node-1'' in the example above). Which
action is triggered by which key depends on what you specify at
creation-time of the tree-buffer - see @ref{A new tree-buffer} for
details.
The creation-interface of a tree-buffer allows defining special
popup-menus when clicking with the right mouse-button (of course also
possible via keyboard, see @ref{Tree-buffer keybindings}) onto a
tree-node (e.g. some senseful actions possible for directory-nodes
like grepping this directory or performing version-control actions for
this directory or something else).
@subsubsection General recipe for a tree-buffer
The following sequence of tasks is the general recipe for a
tree-buffer beginning from creation and ending with the display.
@enumerate
@item Create the tree-buffer
Creating a new tree-buffer has to be done with
@code{tree-buffer-create} for non ECB-tree-buffers and with the macro
@code{defecb-tree-buffer-creator} when the tree-buffer should be used
as an ECB-tree-buffer, so it is an ECB-interactor. See @ref{A new
tree-buffer} for all details.
@item Add tree-nodes to the tree-buffer
Adding nodes to the new tree-buffer (means make the new tree-buffer
the current buffer and call @code{tree-node-new} for a new tree-node
(note that a root-node for this tree-buffer has been autom. created by
@code{tree-buffer-create}!). The first tree-node you add to a
tree-buffer must have always the root-node (avaliable via
@code{tree-buffer-get-root}) as parent-node. The next nodes can have
either one of the fromerly added nodes or the root-node too. All
tree-nodes haveing the root-node as parent will be displayed at the
toplevel of the tree-buffer. See @ref{A new tree-node} for all
details.
@item Display the tree-buffer with current nodes and state
When you are finished building up the tree-node-structure call
@code{tree-buffer-update} to display the current tree-structure (again
after making the tree-buffer the current-buffer). See @ref{Updating a
tree-buffer} for all details.
@end enumerate
@strong{IMPORTANT}: First a call of @code{tree-buffer-update} updates
the @strong{display} of a tree-buffer, means shows all the tree-nodes
in an emacs-buffer! Neither creating a tree-buffer nor adding
tree-nodes display anything; this just builds the internal
tree-structure.
@strong{IMPORTANT}: See @ref{Programming special windows} for details
about programming interactors (special windows) regardless if they
were build as tree or not. There you can find a.o. how to
automatically synchronizing a special window with the current
edit-buffer.
@node A new tree-buffer, A new tree-node, Introduction, tree-buffer
@subsection How to create a new tree-buffer
The creator-function for a new tree-buffer depends on the fact if the
new tree-buffer should be used as an ECB-interactor or not. For a new
ECB-interactor the macro @code{defecb-tree-buffer-creator} has to be
used, otherwise the function @code{tree-buffer-create}. In the end
both methods use @code{tree-buffer-create} because the BODY-argument
of @code{defecb-tree-buffer-creator} must contain a call to this
function!.
This section describes all arguments of @code{tree-buffer-create}.
Except the first argument @var{NAME} all arguments are key-arguments
of the form :arg-name arg-value, so for example a call looks like
@example
(tree-buffer-create <buffer-name> :frame <frame-object> ...).
@end example
These key-arguments (all except the first argument @code{NAME}) can be
arranged in any arbitrary order but all of them are not-optional! The
key-arg-name is always a : followed by the lowercase version of the
mentioned argument below (e.g. @code{FRAME} --> :frame,
@code{MOUSE-ACTION-TRIGGER} --> :mouse-action-trigger).
Here is a description of the arguments of @code{tree-buffer-create} -
also available as docstring for this function (via @kbd{C-h f}). The
description below contains also some examples for complex-arguments!
@table @code
@item @code{NAME}
Buffername of the new tree-buffer.
@item @var{FRAME}
Frame in which the tree-buffer is displayed and valid. All
key-bindings and interactive functions of the tree-buffer work only if
called in @var{FRAME} otherwise nothing is done!
@item @var{MOUSE-ACTION-TRIGGER}
When a mouse-action is triggered. Allowed values:
@code{button-release} and @code{button-press}.
@item @var{IS-CLICK-VALID-FN}
@code{tree-buffer-create} rebinds @kbd{mouse-1}, @kbd{mouse-2},
@kbd{RET} (and @kbd{TAB}) and also in combination with shift and
control (not with @kbd{TAB}). @var{IS-CLICK-VALID-FN} is called first
if a node or an expand-symbol is clicked. This function is called with
five arguments:
@itemize @minus
@item mouse-button:
The clicked mouse-button or RET or TAB (0 = RET or TAB, 1 = mouse-1, 2
= mouse 2)
@item shift-pressed:
Non nil if the SHIFT-key was pressed during mouse-click or RET.
@item control-pressed:
Non nil if the CONTROL-key was pressed during mouse-click or RET.
@item meta-pressed:
Non nil if the META-key was pressed during mouse-click or RET.
@item tree-buffer-name:
The buffer-name of the tree-buffer where the node has been clicked.
@end itemize
The function must return not nil iff exactly this click/hit is
accepted. If the function returns nil then really nothing is done by
the tree-buffer after this click/hit!
Here is an example (call @kbd{C-h f} to see what it does) for this
callback-function:
@example
@group
(defun ecb-interpret-mouse-click (mouse-button
shift-pressed
control-pressed
meta-pressed
tree-buffer-name)
(if (eq mouse-button 0)
(list (if control-pressed 2 1) shift-pressed meta-pressed
'keyboard)
(if (and (not (eq mouse-button 1)) (not (eq mouse-button 2)))
nil
(case ecb-primary-secondary-mouse-buttons
(mouse-1--mouse-2
(if control-pressed
nil
(list mouse-button shift-pressed meta-pressed 'mouse)))
(mouse-1--C-mouse-1
(if (not (eq mouse-button 1))
nil
(list (if control-pressed 2 1) shift-pressed meta-pressed
'mouse)))
(mouse-2--C-mouse-2
(if (not (eq mouse-button 2))
nil
(list (if control-pressed 2 1) shift-pressed meta-pressed
'mouse)))
(otherwise nil)))))
@end group
@end example
This example would be passed as parameter as follows:
@example
(tree-buffer-create "myname"
:is-click-valid-fn 'ecb-interpret-mouse-click
...)
@end example
@item @var{NODE-SELECTED-FN}
Function to call if a node has been selected. This function
is called with the following parameters:
@itemize @minus
@item node: The selected node
@item mouse-button (0 = RET, 1 = mouse-1, 2 = mouse 2)
@item shift-pressed
@item control-pressed
@item meta-pressed
@item tree-buffer-name
@end itemize
For the last four arguments see the description above. This function
has to ensure that the expandable- and expanded-state of the selected
node is correct after returning.
Here is an example (call @kbd{C-h f} to see what it does) for this
callback-function:
@example
@group
(defun ecb-tree-buffer-node-select-callback (node
mouse-button
shift-pressed
control-pressed
meta-pressed
tree-buffer-name)
(let* ((ecb-button-list (ecb-interpret-mouse-click mouse-button
shift-pressed
control-pressed
meta-pressed
tree-buffer-name))
(ecb-button (nth 0 ecb-button-list))
(shift-mode (nth 1 ecb-button-list))
(meta-mode (nth 2 ecb-button-list))
(keyboard-p (equal (nth 3 ecb-button-list) 'keyboard))
(maximized-p (ecb-buffer-is-maximized-p tree-buffer-name)))
;; now we dispatch to the right action
(when ecb-button-list
(cond ((ecb-string= tree-buffer-name ecb-directories-buffer-name)
(ecb-directory-clicked node ecb-button nil shift-mode
meta-mode))
((ecb-string= tree-buffer-name ecb-sources-buffer-name)
(ecb-source-clicked node ecb-button nil shift-mode
meta-mode))
((ecb-string= tree-buffer-name ecb-history-buffer-name)
(ecb-history-clicked node ecb-button nil shift-mode
meta-mode))
((ecb-string= tree-buffer-name ecb-methods-buffer-name)
(ecb-method-clicked node ecb-button nil shift-mode
meta-mode))
((ecb-string= tree-buffer-name ecb-analyse-buffer-name)
(ecb-analyse-node-clicked node ecb-button nil shift-mode
meta-mode))
(t nil)))))
@end group
@end example
This example would be passed as parameter as follows:
@example
(tree-buffer-create "myname"
:node-selected-fn 'ecb-tree-buffer-node-select-callback
...)
@end example
@strong{IMPORTANT}: This callback must not modify the slot
@var{EXPANDED} of the passed node because this is done automatically
by the tree-buffer-library!
@item @var{NODE-EXPANDED-FN}
Function to call if a node is expandable, point stays onto the
expand-symbol and node is not already expanded. This function is
called with the following parameters:
@itemize @minus
@item node: The selected node
@item mouse-button (0 = TAB, 1 = mouse-1, 2 = mouse 2)
@item shift-pressed
@item control-pressed
@item meta-pressed
@item tree-buffer-name
@end itemize
This function should add all children nodes to this node if not
already done (if possible). This function has to ensure that the
expandable- and expanded state of the selected node is correct after
returning!
@strong{IMPORTANT}: This callback must not modify the slot
@var{EXPANDED} of the passed node because this is done automatically
by the tree-buffer-library!
@item @var{NODE-COLLAPSED-FN}
Function to call if a node is expandable, point stays onto the
expand-symbol and node is already expanded. This function is called
with the following parameters:
@itemize @minus
@item node: The selected node
@item mouse-button (0 = TAB, 1 = mouse-1, 2 = mouse 2)
@item shift-pressed
@item control-pressed
@item meta-pressed
@item tree-buffer-name
@end itemize
This function is only a callback to inform the owner/user of this
tree-buffer that this node has been collapsed. This function must not
modify the expandable- or expanded state of the selected node!
Often a sensefull value for this parameter is the function
@code{ignore}.
@strong{IMPORTANT}: This callback must not modify the slot
@var{EXPANDED} of the passed node because this is done automatically
by the tree-buffer-library!
@item @var{NODE-MOUSE-OVER-FN}
Function to call when the mouse is moved over a node. This function is
called with three arguments: NODE, WINDOW, NO-PRINT, each of them
related to the current tree-buffer. If NO-PRINT is nil then the
function must print the text itself in any manner. This function must
always return the text which either is printed by the function itself
or by the caller (if NO-PRINT is not nil). The current buffer for this
function is the tree-buffer itself. With XEmacs this function is only
called if the tree-buffer track-mouse mechanism is activated (see the
function @code{tree-buffer-activate-follow-mouse}). With GNU Emacs >=
21 this function is called by the @code{help-echo} property added to
each node.
Here is an example (call @kbd{C-h f} to see what it does) for this
callback-function:
@example
@group
(defun ecb-mouse-over-analyse-node (node &optional window no-message
click-force)
(let ((str (when (or click-force
(ecb-show-minibuffer-info
node window
(car ecb-analyse-show-node-info)))
(if (equal (cdr ecb-analyse-show-node-info)
'full-info)
(ecb-analyse-gen-tag-info
(car (tree-node->data node)))
(tree-node->name node)))))
(prog1 str
(unless no-message
(ecb-nolog-message str)))))
@end group
@end example
@item @var{MOUSE-HIGHLIGHT-FN}
If nil then in this tree-buffer no node is highlighted when the mouse
moves over it. If t then each node is highlighted when the mouse moves
over it. If a function then it is called with the node as argument and
if it returns not nil then the node will be highlighted when the mouse
moves over it - otherwise no highlighting takes place.
@item @var{NODE-DATA-EQUAL-FN}
Function used by the tree-buffer to test if the data of two tree-nodes
are equal. The function is called with two args: The DATA-slots of the
two tree-nodes (see @ref{A new tree-node} for details about the
data-slots).
Here is an example (call @kbd{C-h f} to see what it does) for this
callback-function:
@example
@group
(defun ecb-analyse-compare-node-data (left right)
"Return not nil when LEFT and RIGHT are identical node-datas."
(and (equal (nth 2 left) (nth 2 right))
(ecb-compare-methods-buffer-node-data (car left)
(car right))))
@end group
@end example
Often a suitable value for this parameter is @code{equal}.
@item @var{MAYBE-EMPTY-NODE-TYPES}
Nil or a list of node-types (a node-type is an integer which must be
set with @code{tree-node-new}). Nodes with one of these types are
treated as empty if they are not expandable (i.e. they have no
children) and will be displayed with the empty-symbol ([x]); for other
nodes see next argument.
@item @var{LEAF-NODE-TYPES}
Nil or a list of node-types (see above). Nodes with one of these types
are treated as leafs and will be displayed with the leaf-symbol (*).
Summary for @var{MAYBE-EMPTY-NODE-TYPES} and @var{LEAF-NODE-TYPES}:
@itemize @bullet
@item
Expandable nodes will always be displayed either with the open- or
with the close-symbol.
@item
Not-expandable nodes with a node-type contained in
@var{MAYBE-EMPTY-NODE-TYPES} will be displayed with the empty-symbol.
@item
Not-expandable nodes with a node-type contained in
@var{LEAF-NODE-TYPES} will be displayed with the leaf-symbol.
@item
All other nodes will be displayed with no symbol just with correct
indentation.
@end itemize
@item @var{MENU-CREATOR}
Nil or function which has to return nil or a list of conses, each cons
for a known node-type of this tree-buffer (the node-type of a node is
an integer). Example: ((0 . menu-for-type-0) (1 . menu-for-type-1)).
The cdr of a cons must be a menu in the same format
@code{tree-buffer-create-menu} expects as argument - see the
documentation of this function for details. This function gets two
arguments: The name of the tree-buffer and the node for which a
popup-menu should be opened.
Here is an example for such a menu-creator-callback:
@example
@group
(defconst ecb-analyse-nodedata-tag-with-pos 0)
(defconst ecb-analyse-nodedata-tag-without-pos 1)
(defconst ecb-analyse-nodedata-no-tag 2)
(defconst ecb-analyse-nodetype-bucket 0)
(defconst ecb-analyse-nodetype-context 1)
(defconst ecb-analyse-nodetype-arguments 2)
(defconst ecb-analyse-nodetype-completions 3)
(defconst ecb-analyse-nodetype-localvars 4)
(defconst ecb-analyse-nodetype-prefix 5)
(defconst ecb-analyse-nodetype-assignee 6)
(defconst ecb-analyse-nodetype-function 7)
(defconst ecb-analyse-nodetype-function-arg 8)
(defun ecb-analyse-create-menu (node)
"Return a popup-menu suitable for NODE."
(let* ((data (tree-node->data node))
(tag-p (not (equal (nth 1 data) ecb-analyse-nodedata-no-tag)))
(tag-with-pos-p (equal (nth 1 data)
ecb-analyse-nodedata-tag-with-pos))
(nodetype (nth 2 data)))
(delq nil (list (if (equal nodetype ecb-analyse-nodetype-completions)
'(ecb-analyse-complete "Complete"))
(if tag-p
'(ecb-analyse-show-tag-info "Show tag info"))
(if tag-with-pos-p
'(ecb-analyse-jump-to-tag "Jump to tag"))))))
(defun ecb-analyse-menu-creator (tree-buffer-name node)
"Creates the popup-menus for the analyse-buffer."
(let ((nodetype (tree-node->type node)))
(unless (equal nodetype ecb-analyse-nodetype-bucket)
(mapcar (function (lambda (type)
(cons type (ecb-analyse-create-menu node))))
`(,ecb-analyse-nodetype-context
,ecb-analyse-nodetype-arguments
,ecb-analyse-nodetype-completions
,ecb-analyse-nodetype-localvars
,ecb-analyse-nodetype-prefix
,ecb-analyse-nodetype-assignee
,ecb-analyse-nodetype-function
,ecb-analyse-nodetype-function-arg)))))
@end group
@end example
This example would be passed as parameter as follows:
@example
(tree-buffer-create "myname"
:menu-creator 'ecb-analyse-menu-creator
...)
@end example
@item @var{MENU-TITLES}
Nil or a list conses, each cons for a node-type. See
@var{MENU-CREATOR}. The cdr of a cons must be either a string or a
function which will be called with current node under point and must
return a string which is displayed as the menu-title.
@item @var{MODELINE-MENU-CREATOR}
Nil or a function which has to return nil or a menu in the same format
@code{tree-buffer-create-menu} expects as argument - see the
documentation of this function for details. This function gets one
argument: The name of the tree-buffer. If the function returns a menu
then this menu will be displayed when the user clicks with
mouse-button 3 at the modeline of the tree-buffer. The menu-title will
be ``Tree-buffer modeline-menu''.
@item @var{TRUNC-LINES}
Should lines in this tree buffer be truncated (not nil).
@item @var{READ-ONLY}
Should the treebuffer be read-only (not nil).
@item @var{TREE-INDENT}
Spaces subnodes should be indented. Ignored if @var{TREE-STYLE} is
@code{image} (see below).
@item @var{INCR-SEARCH-P}
Should the incremental search be enabled in the tree-buffer. Three
choices: @code{prefix}, @code{substring}, @code{nil}. See the command
@code{tree-buffer-incremental-node-search}.
@item @var{INCR-SEARCH-ADDITIONAL-PATTERN}
Every search-pattern is prefixed with a regexp to jump over not
important stuff of a displayed node-name at incr. search.. This is per
default: beginning spaces and guide characters (|`-) and all
expand/collapse-buttons [+], [x], rsp. [-]!
If this argument is not nil then it must be a cons-cell where car is a
string which should be a regexp-pattern which is added to the
basic-prefix pattern (see above) and both of them prefix the
incr-search-pattern. The cdr is the number of subexpressions in this
additoonal pattern.
@item @var{ARROW-NAVIGATION}
If not nil then a smart navigation with arrow keys is offered:
@itemize @minus
@item Left-arrow:
If node is expanded then it will be collapsed otherwise point
jumps to the next "higher" node in the hierarchical tree (higher means
the next higher tree-level or - if no higher level available - the next
higher node on the same level).
@item Right-arrow:
If node is not expanded then it will be expanded.
Onto a not expandable node the horizontal arrow-keys go one character in the
senseful correct direction.
@item Up- and down-key:
Point jumps to the first character of the previous (up) rsp. next node
(down). ``First'' character means either the first character of the
expand-symbol (in case @var{EXPAND-SYMBOL-BEFORE-P} is not nil) or of
the displayed node-name. Or with other words: The first
non-indentation and non-guide-line (see @var{TREE-STYLE}) character of
a node.
@end itemize
@item @var{HOR-SCROLL-STEP}
Number of columns a hor. scroll in the tree-buffer should scroll. If
not nil then @kbd{M-mouse-1} and @kbd{M-mouse-2} scroll left and right
and also @kbd{M-<left-arrow>} and @kbd{M-<right-arrow>}. Ignored with
XEmacs.
@item @var{DEFAULT-IMAGES-DIR}
Full path where the default images for the tree-buffer can be found.
It should contain an image for every name of
@code{tree-buffer-tree-image-names}.
@item @var{ADDITIONAL-IMAGES-DIR}
Additional image-dir which should be searched first for images needed
for current tree-buffer. If the image can not be found in this
directory then @var{DEFAULT-IMAGES-DIR} is searched. If the image can't even
found here the related ascii-symbol is used.
@item @var{IMAGE-FILE-PREFIX}
Common prefix for all image-files for this tree-buffer, e.g. ``ecb-''.
@item @var{TREE-STYLE}
There are three different styles available: Image-style (value
@code{image}): Very nice and modern because image-icons are used to display
the tree-buffer. For this style the arguments @var{TREE-INDENT} and
@var{EXPAND-SYMBOL-BEFORE-P} have no effect.
Ascii-style with guide-lines (value @code{ascii-guides}) and
ascii-style without guidelines (value @code{ascii-no-guides}. See
@ref{Tree-buffer styles} for details about the tree-styles.
Both ascii-styles are affected by the args @var{TREE-INDENT} and
@var{EXPAND-SYMBOL-BEFORE-P}.
@item @var{ASCII-GUIDE-FACE}
If @var{TREE-STYLE} is @code{ascii-guides} then this defines the face
the guides should be displayed with.
@item @var{TYPE-FACER}:
Nil or a list of one or more conses, each cons for a node-type (a
node-type is an integer which must be set with @code{tree-node-new}).
The cdr of a cons can be:
@itemize @minus
@item a face-symbol
@item a function-symbol which gets two arguments (see
@code{tree-buffer-insert-text}). This function can do anything, but
normally it should face a tree-node.
@item the symbol t. Then the tree-buffer assumes that the node-text is
already faced and therefore it does not face the node, means it does
nothing then inserting the node-text, if the tree-buffer is updated.
@end itemize
@item @var{EXPAND-SYMBOL-BEFORE-P}
If not nil then the expand-symbol is displayed before the node-text.
Ignored when @var{TREE-STYLE} is @code{image} and Emacs can display
images.
@item @var{HIGHLIGHT-NODE-FACE}
Face used for highlighting current selected node in this
tree-buffer.
@item @var{GENERAL-FACE}
General face in which the whole tree-buffer should be displayed.
@item @var{AFTER-CREATE-HOOK}:
A function or a list of functions (with no arguments) called directly
after creating the tree-buffer and defining it's local keymap. For
example such a function can add additional key-bindings for this
tree-buffer local keymap (use @code{local-set-key} for this).
Here is an example for such a hook:
@example
@group
(defun ecb-common-after-tree-buffer-create-actions ()
"Things which should be performed after creating a tree-buffer.
The tree-buffer is the current buffer."
(local-set-key (kbd "C-t")
'ecb-toggle-do-not-leave-window-after-select)
(if ecb-running-xemacs
(define-key modeline-map
'(button2up)
'ecb-toggle-maximize-ecb-window-with-mouse)
(local-set-key [mode-line mouse-2]
'ecb-toggle-maximize-ecb-window-with-mouse)))
@end group
@end example
@item @var{AFTER-UPDATE-HOOK}:
A function or a list of functions (with no arguments) called each time
after the tree-buffer has been updated via @code{tree-buffer-update}.
@end table
Here is an example how to create a tree-buffer (if you want a
tree-buffer not for ECB then just strip off the
@code{defecb-tree-buffer-creator} and just call
@code{tree-buffer-create}):
@example
@group
(defecb-tree-buffer-creator ecb-create-analyse-tree-buffer
ecb-analyse-buffer-name
"Create the tree-buffer for analyse-display."
(tree-buffer-create
ecb-analyse-buffer-name
:frame ecb-frame
:mouse-action-trigger ecb-tree-mouse-action-trigger
:is-click-valid-fn 'ecb-interpret-mouse-click
:node-selected-fn 'ecb-tree-buffer-node-select-callback
:node-expanded-fn 'ecb-tree-buffer-node-expand-callback
:node-collapsed-fn 'ecb-tree-buffer-node-collapsed-callback
:node-mouse-over-fn 'ecb-mouse-over-analyse-node
:mouse-highlight-fn 'ecb-analyse-node-mouse-highlighted-p
:node-data-equal-fn 'ecb-analyse-compare-node-data
:maybe-empty-node-types nil
:leaf-node-types nil
:menu-creator 'ecb-analyse-menu-creator
:menu-titles (ecb-analyse-gen-menu-title-creator)
:modeline-menu-creator 'ecb-common-tree-buffer-modeline-menu-creator
:trunc-lines (ecb-member-of-symbol/value-list
ecb-analyse-buffer-name
ecb-tree-truncate-lines)
:read-only t
:tree-indent ecb-tree-indent
:incr-search-p t
:incr-search-additional-pattern nil
:arrow-navigation ecb-tree-navigation-by-arrow
:hor-scroll-step ecb-tree-easy-hor-scroll
:default-images-dir (car ecb-tree-image-icons-directories)
:additional-images-dir (ecb-member-of-symbol/value-list
ecb-analyse-buffer-name
(cdr ecb-tree-image-icons-directories)
'car 'cdr)
:image-file-prefix "ecb-"
:tree-style ecb-tree-buffer-style
:ascii-guide-face ecb-tree-guide-line-face
:type-facer nil
:expand-symbol-before-p ecb-tree-expand-symbol-before
:highlight-node-face ecb-analyse-face
:general-face ecb-analyse-general-face
:after-create-hook (append
(list (lambda ()
(ecb-common-after-create-actions)))
ecb-common-tree-buffer-after-create-hook
ecb-analyse-buffer-after-create-hook)
:after-update-hook nil))
@end group
@end example
@node A new tree-node, Updating a tree-buffer, A new tree-buffer, tree-buffer
@subsection How to create a new tree-node
When a new tree-buffer has been created, then the most senseful
programming-task is adding some tree-nodes to it.
@subsubsection Content of a tree-node
A tree-node is an object which stores in special @dfn{slots} several
data necessary to link the node with other nodes, to display the node
and to hold some associated node-data (e.g. a tag created by the
semantic-library).
A tree-node can have the following slots:
@table @code
@item @var{NAME}
The name of the node. Regardless how the node is displayed; see
@var{SHRINK-NAME} and @var{DISPLAYED-NAME}.
@item @var{TYPE}
The type of the node; must currently be an interger! The type is used
to classify the nodes, so for example all nodes of a certain type can
display the same popup-menu - see @code{tree-buffer-create} or @ref{A
new tree-buffer} which parts of a tree-buffer are distinguished by
node-types.
@item @var{DATA}
The data of the node; This can be any arbitrary emacs-lisp-object.
This slots holds that data asscociated with the node and represented
by the node in the tree-buffer. Example: Assume a tree-buffer
displaying a directory-tree where each node just displays as its name
the name of (sub)directories, but not the full path. The full path is
stored in the @var{DATA}-slot of a node so when clicking onto this
node the asscociated directory can be open for example in a
dired-buffer.
@item @var{EXPANDABLE}
If not nil then the node is expandable means it has children.
@item @var{EXPANDED}
If not nil then the node is currently expanded, means its
children are visible in the tree-buffers as subnodes of the node.
@item @var{PARENT}
The parent tree-node. This is the link to the father (rsp. mother ;-)
of the node. It must be a object of type tree-node!
@item @var{CHILDREN}
List of children tree-nodes. They must be all objects of type
tree-node!
@item @var{SHRINK-NAME}
Decides if the @var{NAME} can be shortened when displayed in a narrow
tree buffer window. The following values are valid:
@itemize @minus
@item @code{beginning}:
The @var{NAME} is truncated at the beginning so the end is always
visible.
@item @code{end}:
The @var{NAME} is truncated at the end. If the tree-node is EXPANDABLE
the name is truncated so that the expand symbol is visible.
@item @code{nil}:
The @var{NAME} is never truncated. In this case @var{DISPLAYED-NAME}
is equal to @var{NAME}.
@end itemize
@item @var{INDENTSTR}
Containes the full indentation-string for the node. So a single node
can easily be redrawn.
@item @var{DISPLAYED-NAME}
Contains the current displayed name of the node. The
displayed name can be different from the @var{NAME} according to the value of
@var{SHRINK-NAME}.
@end table
@subsubsection Creating a new tree-node and adding it to the tree
A new tree-node has to be created with the function
@code{tree-node-new}. This ``constructor'' accepts the following
parameter: @var{NAME}, @var{TYPE}, @var{DATA}, @var{NOT-EXPANDABLE},
@var{PARENT} and @var{SHRINK-NAME}.
For all parameters except @var{NOT-EXPANDABLE} the description is
available in the slot-description in the section above. If
@var{NOT-EXPANDABLE} is set to not nil then the slot @var{EXPANDABLE}
will be set to @code{nil}; otherwise to @code{t}.
@code{tree-node-new} returns a new tree-node.
The new node can either being added implicitely to the tree via the
optional @var{PARENT}-parameter when calling @code{tree-buffer-new} or
explicitely by first creating the new node without setting the
parent-node but later setting the parent-node via the according
accessor (see next section below). Children should only being added
with @code{tree-node-add-children} - see next section.
@subsubsection Accessing the slots of a tree-node
The section above shows which slots a tree-node have.
A slot with name XXX is getable with the following piece of code:
@lisp
(tree-node->xxx <a tree node>)
@end lisp
Here is an example how to get the value of the slot @var{DATA}:
@example
(tree-node->data <a tree node>)
@end example
A slot with name XXX is setable with the following piece of code:
@lisp
(setf (tree-node->xxx <a tree node>) <new value>)
@end lisp
Again an example with slot @var{DATA} which sets this slot to the
string ``~/a_subdir_of_HOME'':
@example
(setf (tree-node->data <a tree node>) "~/a_subdir_of_HOME")
@end example
@strong{IMPORTANT}: Adding new children to a node should always being
done with the function @code{tree-node-add-children} because this
functions encapsulates all the necessary stuff needed to add children
to a node (mainly adding the children itself and setting the node itself as
parent for every children).
See @ref{The tree-buffer-API} for the rest of the API available for
tree-nodes.
@node Updating a tree-buffer, Tree-buffer keybindings, A new tree-node, tree-buffer
@subsection How to update a tree-buffer-display after changes
When finished with adding tree-nodes to the tree-structure you mostly
want to display the current tree and its state in the buffer/window so
a user can see the current tree and can use it.
Threre are two ways to update a tree-buffer for display:
@enumerate
@item Updating the whole tree-buffer:
This is the most used way to update the tree-buffer display. It's
quite simple, just call @code{tree-buffer-update}. In most cases you
want to call it without arguments.
If you want to display a certain expanded node and as much as possible
subnodes of this node then pass this node-object as first argument to
@code{tree-buffer-update}.
If you do not have the need to display a completely new tree-structure
but you want only to display a previously cached display-state then
pass this cached-state as second argument to
@code{tree-buffer-update}. See the documentation of this function and
also @ref{Tree-buffer How to} for a detailled description how to do
this.
@item Updating only a single node of the tree-buffer:
Sometimes it can be useful to update only exactly one special node,
e.g. when your application codes some node-state in the displayed
node-name (e.g. ECB displays the version-control state of a file as
part of the related node-name) then it is necessary to update only
this node if the state has changed.
This can be done with the function @code{tree-buffer-update-node}. For
this function the mentioning in this section can be misleading because
this function can not only update the node-display but in general the
slots @var{NAME}, @var{SHRINK-NAME}, @var{TYPE}, @var{DATA} and
@var{EXPANDABLE}. Do @kbd{C-h f} to see the documentation of this
function for all details!
@end enumerate
@node Tree-buffer keybindings, The tree-buffer-API, Updating a tree-buffer, tree-buffer
@subsection Default and customizable keybindings of a tree-buffer
When creating a tree-buffer with @code{tree-buffer-create} the
following keys will automatically being bound:
@table @asis
@item @kbd{delete}
@itemx @kbd{backspace}
@itemx @kbd{home}
@itemx @kbd{end}
@itemx @kbd{a} (and each other key bound to @code{self-insert-command})
All of these keys are bound to the command
@code{tree-buffer-incremental-node-search} if the argument
@var{INCR-SEARCH-P} of @code{tree-buffer-create} was set to not nil.
See the documentation of @code{tree-buffer-incremental-node-search}
for all details.
@item @kbd{RET}
@itemx @kbd{C-RET}
@itemx @kbd{S-RET}
@itemx @kbd{M-RET}
@itemx @kbd{C-S-RET}
@itemx @kbd{mouse-1}
@itemx @kbd{C-mouse-1}
@itemx @kbd{S-mouse-1}
@itemx @kbd{M-mouse-1}
@itemx @kbd{mouse-2}
@itemx @kbd{C-mouse-2}
@itemx @kbd{S-mouse-2}
@itemx @kbd{M-mouse-2}
All these keys are bound to an action-dispatcher which works as
follows:
If the callback-function in slot @var{IS-CLICK-VALID-FN} of the
tree-buffer (@pxref{A new tree-buffer}) returns nil then nothing is
done.
If either @kbd{RET} has been hitted or point is as the node-name (i.e.
the user has clicked with the mouse-1/2 at the node-name) then the
callback-function in slot @var{NODE-SELECTED-FN} is called with the
needed arguments (@pxref{A new tree-buffer}).
If point is at the expand/collape-button then depending on the
expansion-state of the node either the callback in slot
@var{NODE-EXPANDED-FN} or @var{NODE-COLLAPSED-FN} is called (for
parameters see again @ref{A new tree-buffer}).
@strong{IMPORTANT}: None of these callbacks must modify the slot
@var{EXPANDED} of the passed node because this is done automatically
by the action-dispatcher!
At the end the dispatcher updates the tree-buffer-display with
optimized display of the clicked/selected node - see @ref{Updating a
tree-buffer}. This means @code{tree-buffer-update} is called with that
node as argument.
@item @kbd{TAB}
Depending on the expansion-state of the node either the callback in
slot @var{NODE-EXPANDED-FN} or @var{NODE-COLLAPSED-FN} is called (for
parameters see again @ref{A new tree-buffer}).
@strong{IMPORTANT}: None of these callbacks must modify the slot
@var{EXPANDED} of the passed node because this is done automatically
by the action-dispatcher!
At the end the the tree-buffer-display is updated with optimized
display of the clicked/selected node - see @ref{Updating a
tree-buffer}. This means @code{tree-buffer-update} is called with that
node as argument.
@item @kbd{mouse-3}
Activates the popup-menu for the current tree-buffer for current
node-type (if defined). See @ref{A new tree-buffer} at argument
@var{MENU-CREATOR} and @var{MENU-TITLES}. These callbacks are called
for getting the menu and the menu-title.
@item @kbd{modeline-mouse-3}
Activates the popup-menu for the modeline of the current tree-buffer
(if defined). See @ref{A new tree-buffer} at argument
@var{MODELINE-MENU-CREATOR}. This callback is called for getting the
modeline-menu.
@item @kbd{M-m}
This key is bound to the command
@code{tree-buffer-show-node-menu-keyboard}: Activates the popup-menu
of current tree-buffer for current node-type via keyboard. If called
with a prefix-arg then the library @file{tmm.el} is used for
displaying the popup-menu - ignored with XEmacs.
@item @kbd{<up>}
@itemx @kbd{<down>}
@itemx @kbd{<left>}
@itemx @kbd{<right>}
These keys are bound to the command @code{tree-buffer-arrow-pressed}
which implements the smart arrow-key-navigation described in @ref{A
new tree-buffer} at argument @var{ARROW-NAVIGATION}.
@end table
In addition to these automatically bound keys you can add further
keybindings to the local-keymap of the tree-buffer with the parameter
@var{AFTER-CREATE-HOOK} of @code{tree-buffer-create}. See @ref{A new
tree-buffer} for an example which binds @kbd{C-t} in this hook.
@node The tree-buffer-API, Do not with tree-buffer, Tree-buffer keybindings, tree-buffer
@subsection All functions available for tree-buffers and tree-nodes
This chapter lists the complete AI available for tree-buffers and
tree-nodes.
@strong{IMPORTANT}: These are the only functions and macros of
tree-buffer.el you are allowed to use for programming with
tree-buffers and tree-nodes. If you use other - not here listed -
functions, macros or variables of tree-buffer.el then you run the risk
of unwanted side-effects or program-behaviors!
@subsubsection The API for a tree-buffer:
See the documentation of these functions (e.g. via @kbd{C-h f}) to get
the details how to use it.
@itemize
@item @code{tree-buffer-add-image-icon-maybe}
@item @code{tree-buffer-find-image}
@item @code{tree-buffer-create}@footnote{If the tree-buffer should be
used by ECB then you must use @code{defecb-tree-buffer-creator} - see
the documentation!}
@item @code{tree-buffer-defpopup-command}
@item @code{tree-buffer-destroy}@footnote{Not needed when
@code{defecb-tree-buffer-creator} has been used for creation.}
@item @code{tree-buffer-empty-p}
@item @code{tree-buffer-expand-node}
@item @code{tree-buffer-get-node-at-point}
@item @code{tree-buffer-node-data-equal-p}
@item @code{tree-buffer-recenter}
@item @code{tree-buffer-highlight-node-data}
@item @code{tree-buffer-remove-highlight}
@item @code{tree-buffer-remove-node}
@item @code{tree-buffer-clear-tree}
@item @code{tree-buffer-displayed-nodes-copy}
@item @code{tree-buffer-search-displayed-node-list}
@item @code{tree-buffer-number-of-displayed-nodes}
@item @code{tree-buffer-get-data-store}
@item @code{tree-buffer-set-data-store}
@item @code{tree-buffer-get-root}
@item @code{tree-buffer-set-root}
@item @code{tree-buffer-update}
@item @code{tree-buffer-update-node}
@end itemize
@subsubsection The API for a tree-node
See the documentation of these functions (e.g. via @kbd{C-h f}) to get
the details how to use it.
@itemize
@item @code{tree-node-add-children}
@item @code{tree-node-linelength}
@item @code{tree-node-new}
@item @code{tree-node-new-root}
@item @code{tree-node-remove-child}
@item @code{tree-node-remove-child-by-data}
@item @code{tree-node-find-child-by-data}
@item @code{tree-node-find-child-by-name}
@item @code{tree-node-search-subtree-by-data}
@item @code{tree-node-sort-children}
@item @code{tree-node-toggle-expanded}
@end itemize
In addition to these functions the tree-node API contains all accessors
for a tree-node which are described in @ref{A new tree-node}.
@node Do not with tree-buffer, Tree-buffer How to, The tree-buffer-API, tree-buffer
@subsection Things which are strictly forbidden
Variable @code{tree-buffers}: Only for internal use! It contains all
tree-buffers of current Emacs-instance, means @strong{all}
tree-buffers of @strong{all} applications which uses currently
tree-buffers. Every application must store its own collection of
tree-buffers in an own variable! For example: ECB stores its
tree-buffer set in @code{ecb-tree-buffers}!
Variable @code{tree-buffer-displayed-nodes}: Only for internal use!
Contains all the current visible nodes of current tree-buffer in
top-to-bottom order. This variable is buffer-local in each
tree-buffer! Do not use it directly! When you want to cache the
current display, then see @ref{Tree-buffer How to} how to do this.
@strong{IMPORTANT}: An application may only use the API tree-buffer.el
provides but no internal variables - see @ref{The tree-buffer-API}!
@node Tree-buffer How to, ,Do not with tree-buffer, tree-buffer
@subsection How to deal with certain programming-requirements
This chapter describes in detail how to solve certain
programming-challenges with tree-buffers.
@subsubsection Caching the current tree-buffer display
Sometimes it can be useful or important to cache the current display
of a tree-buffer and display later exactly this cached display-state.
Here is how to do this:
@enumerate
@item Caching the display:
You have to do two tasks: First store the current internal structure
of the tree-buffer; you must do this with the function
@code{tree-buffer-displayed-nodes-copy}. Then store the
buffer-contents of that tree-buffer you want to cache; you can do this
for example with @code{buffer-substring}. For both tasks you must make
the tree-buffer the current-buffer.
@item Displaying a previous tree-buffer-cache:
Make the tree-buffer the current buffer, call
@code{tree-buffer-update} and pass as second argument @var{CONTENT}
the data you have stored in step 1. See the documentation of
@code{tree-buffer-update} for details.
Here is an example:
@example
@group
(tree-buffer-update
nil
(cons (nth 2 cache-elem) ;; the stored buffer-string
(nth 1 cache-elem) ;; the stored tree-structure
)))
@end group
@end example
@end enumerate
@node Adviced functions, The layout-engine, tree-buffer, Elisp programming
@section How to deal with the adviced window-functions
ECB offers three macros for packages which work during an activated
ECB. They allow an easy temporally@footnote{I.e. regardless of the
settings in @code{ecb-advice-window-functions}!} usage of either all
original-functions, all adviced functions or only some adviced
functions:
@itemize @minus
@item @code{ecb-with-original-functions}
@item @code{ecb-with-adviced-functions}
@item @code{ecb-with-some-adviced-functions}
@end itemize
For a detailed explanation of each macro read the documentation with
@code{describe-function}!
@node The layout-engine, , Adviced functions, Elisp programming
@section How to program new layouts and new special windows
There are two aspects concerning this topic:
@enumerate
@item
Programming a new layout which contains several special ECB-windows
like directories, sources, methods, history or other special windows
and arranging them in a new outline.
@item
Creating complete new special windows (e.g. a local-variable window
for a graphical debugger like JDEbug of JDEE), adding them to a layout
and synchronizing them with the current active edit-window.
@end enumerate
The former one covers merely the layout-programming aspect which is
explained in the first subsection of this chapter whereas the latter
one covers all aspects of creating new special windows and what is
necessary to synchronize it with the current active edit-window of
ECB. This is explained in the second subsection which will refers to
the first subsection.
@menu
* 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
@end menu
@node Programming a new layout, Programming special windows, The layout-engine, The layout-engine
@subsection How to program a new layout
If you just want creating a new layout with the standard ECB-windows
like directories, sources, methods, history and speedbar it's is
strongly recommended to define the new layout interactively with the
command @code{ecb-create-new-layout} (@pxref{Creating a new
ECB-layout}).
If you want creating a new layout and if this layout should contain
other special windows than the standard ECB-windows then it's still
recommended to define this layout interactively with
@code{ecb-create-new-layout} and using the option to give the created
windows user-defined types. For every user defined type you have then
just to program the necessary buffer-set function. For all the details
see @ref{Creating a new ECB-layout}.
But if you do not like the interactive way (because you are tough and
brave) but you want programming the new layout with Elisp then use the
macro @code{ecb-layout-define} (the following definition has stripped
the prefix ``ecb-'' for better indexing this manual):
@defmac layout-define name type &rest create-code
Creates a new ECB-layout with name @var{NAME}. @var{TYPE} is the type
of the new layout and is literal, i.e. not evaluated. It can be left,
right, top or left-right. @var{DOC} is the docstring for the new
layout-function ``ecb-layout-function-<name>''. @var{CREATE-CODE} is
all the lisp code which is necessary to define the
ECB-windows/buffers. This macro adds the layout with @var{NAME} and
@var{TYPE}to the internal variable @code{ecb-available-layouts}.
Preconditions for @var{CREATE-CODE}:
@enumerate
@item
Current frame is splitted at least in one edit-window and the
``column'' (for layout types left, right and left-right) rsp. ``row''
(for a top layout) for the special ECB-windows/buffers. The width of
the ``column'' rsp. the height of the ``row'' is always defined with
the option @code{ecb-windows-width} rsp. @code{ecb-windows-height}.
Depending on the value of the option @code{ecb-compile-window-height}
there is also a compile window at the bottom of the frame which is
stored in @code{ecb-compile-window}.
@item
All windows are not dedicated.
@item
Neither the edit-window nor the compile-window (if there is one) are
selected for types left, right and top. For type left-right the left
column-window is selected
@item
All ECB-advices for the functions in
@code{ecb-advice-window-functions} are disabled!
@end enumerate
Things @var{CREATE-CODE} has to do:
@enumerate
@item
Splitting the ECB-tree-windows-column(s)/row (s.a.) in all the
ECB-windows the layout should contain (directories, sources, methods
and history). The split must not be done with other functions than
@code{ecb-split-hor} and @code{ecb-split-ver}! It is recommended not to
to use a ``hard'' number of split-lines or -rows but using fractions
between -0.9 and +0.9! Tip: It is recommended to spilt from right to
left and from bottom to top or with other words: First create the
right-most and bottom-most special windows!
@item
Making each special ECB-window a dedicated window. This can be done with
one of the following functions:
@itemize @minus
@item @code{ecb-set-directories-buffer}
@item @code{ecb-set-sources-buffer}
@item @code{ecb-set-methods-buffer}
@item @code{ecb-set-history-buffer}
@item @code{ecb-set-speedbar-buffer}
@end itemize
Each layout can only contain one of each tree-buffer-type!
In addition to these functions there is a general macro:
@code{defecb-window-dedicator}: This macro defines a so called
``window-dedicator'' which is a function registered at ECB and called
by ECB to perform any arbitrary code in current window and makes the
window autom. dedicated at the end. This can be used by third party
packages like JDEE to create arbitrary ECB-windows besides the
standard tree-windows.
To make a special ECB-window a dedicated window either one of the five
functions above must be used or a new ``window-dedicator''-function
has to be defined with `defecb-window-dedicator' and must be used
within the layout-definition.
@item
Every(!) special ECB-window must be dedicated as described in 2.
@item
@var{CREATE-CODE} must work correctly regardless if there is already a
compile-window (stored in @code{ecb-compile-window}) or not
(@code{ecb-compile-window} is nil).
@end enumerate
Things @var{CREATE-CODE} can do or can use:
@enumerate
@item
The value of @code{ecb-compile-window} which contains the compile-window (if
there is one). Using the values of @code{ecb-compile-window-height},
@code{ecb-windows-width}, @code{ecb-windows-height}.
@end enumerate
Things @var{CREATE-CODE} must NOT do:
@enumerate
@item Splitting the edit-window
@item Creating a compile-window
@item
Deleting the edit-window, the compile-window (if there is any) or the
ECB-windows-column(s)/row (see Precondition 1.)
@item
Referring to the value of @code{ecb-edit-window} because this is always nil
during @var{CREATE-CODE}.
@end enumerate
Postconditions for @var{CREATE-CODE}:
@enumerate
@item
The edit-window must be the selected window and must not be dedicated
and not be splitted.
@item
Every window besides the edit-window (and the compile-window) must be
a dedicated window (e.g. a ECB-tree-window).
@end enumerate
@end defmac
Use this macro to program new layouts within your @file{.emacs} or any
other file which is loaded into your Emacs. After loading the file(s)
with all the new layout-definitions you can use it by customizing the
option @code{ecb-layout-name} to the appropriate name or with the
command @code{ecb-change-layout}.
With the function @code{ecb-layout-undefine} you can remove a layout
from the list of available layouts:
@defun layout-undefine name
Unbind ecb-layout-function-<NAME> and
ecb-delete-window-ecb-windows-<NAME> and remove @code{NAME} from
@code{ecb-available-layouts}.
@end defun
Here is an example for a new layout programmed with
@code{ecb-layout-define}:
@example
@group
(ecb-layout-define "my-own-layout" left nil
;; The frame is already splitted side-by-side and point stays in the
;; left window (= the ECB-tree-window-column)
;; Here is the creation code for the new layout
;; 1. Defining the current window/buffer as ECB-methods buffer
(ecb-set-methods-buffer)
;; 2. Splitting the ECB-tree-windows-column in two windows
(ecb-split-ver 0.75 t)
;; 3. Go to the second window
(other-window 1)
;; 4. Defining the current window/buffer as ECB-history buffer
(ecb-set-history-buffer)
;; 5. Make the ECB-edit-window current (see Postcondition above)
(select-window (next-window)))
@end group
@end example
This layout definition defines a layout with name ``my-own-layout''
which looks like:
@example
@group
-------------------------------------------------------
| | |
| | |
| | |
| Methods | |
| | |
| | |
| | Edit |
| | |
| | |
|--------------| |
| | |
| History | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
@end group
@end example
@node Programming special windows, Possible layout-outlines, Programming a new layout, The layout-engine
@subsection All aspects of programming special windows
ECB offers a flexible programmable layout-engine for other packages to
display their own contents and informations in special ECB-windows. An
example could be a graphical debugger which offers a special window for
displaying local variables and another special window for messages
from the debugger-process (like JDEbug of JDEE@footnote{JDEE is
available at
@ifhtml
@uref{http://jdee.sunsite.dk/}
@end ifhtml
@ifnothtml
@url{http://jdee.sunsite.dk/}
@end ifnothtml
}).
This section explains all aspects of programming new special windows,
adding them to a new layout and synchronizing them with edit-window of
ECB. This can be done best with an easy example which nevertheless
covers all necessary aspects to be a good example and skeleton for
complex tools (like a graphical debugger) which want to use the
layout-engine of ECB do display their own information.
@strong{IMPORTANT}: See @ref{tree-buffer} for a full documentation of
the library tree-buffer.el which can be used for programming a new
special window as a tree!
Here comes the example:
@subsubsection The outline of the example layout:
@example
@group
-------------------------------------------------------
|Bufferinfo for <filename>: |[prior] |
|Type: file |[next] |
|Size: 23456 | |
|Modes: rw-rw-rw- | |
|-----------------------------------------------------|
| |
| |
| |
| |
| edit-window |
| |
| |
| |
| |
-------------------------------------------------------
| |
| compilation-window |
| |
-------------------------------------------------------
@end group
@end example
@subsubsection The description of the layout-contents
The top-left window always displays informations about the current
buffer in the selected edit-window. This window demonstrates how
autom. synchronizing a special window/buffer of a layout with current
edit-window.
The top-right window contains an read-only ``action-buffer'' and
offers two buttons which can be used with the middle mouse-button to
scroll the edit-window. This is not very senseful but it demonstrates
how to control the edit-window with actions performed in a special
window/buffer of a layout.
(If you have not set a compilation-window in
@code{ecb-compile-window-height} then the layout contains no persistent
compilation window and the other windows get a little more place).
@subsubsection The example code
Now let have us a look at the several parts of the Elisp-program
needed to program this new example layout. ECB contains a library
@file{ecb-examples.el} which contains the full working code of this
example. To test this example and to play with it you can load this
library into Emacs (with @code{load-library} for example) and then
calling @code{ecb-change-layout} (bound to @kbd{C-c . lc}) and
inserting ``example-layout1'' as layout-name. An alternative is
calling @code{ecb-examples-activate} and
@code{ecb-examples-deactivate}. For details see file
@file{ecb-examples.el}.
The following steps only contain code-skeletons to demonstrate the
principle. The full working code is available in
@file{ecb-examples.el}.
@subsubsection The bufferinfo buffer of the example
The name of the bufferinfo buffer:
@lisp
(defconst ecb-examples-bufferinfo-buffer-name " *ECB buffer info*")
@end lisp
Two helper functions for displaying infos in a special buffer:
@lisp
@group
(defun ecb-examples-print-file-attributes (buffer filename)
(ecb-with-readonly-buffer buffer
(erase-buffer)
(insert (format "Bufferinfo for %s:\n\n" filename))
;; insert with the function `file-attributes' some
;; informations about FILENAME.
))
(defun ecb-examples-print-non-filebuffer (buffer buffer-name)
(ecb-with-readonly-buffer buffer
(erase-buffer)
;; analogous to `ecb-examples-print-file-attributes'
))
@end group
@end lisp
The main synchronizing function added to
@code{ecb-current-buffer-sync-hook} for autom. evaluation by
@code{ecb-current-buffer-sync} which runs dependent on the values of
@code{ecb-window-sync} and @code{ecb-window-sync-delay}. This function
synchronizes the bufferinfo buffer with the current buffer of the
edit-window if that buffer has changed.
@lisp
@group
(defun ecb-examples-bufferinfo-sync ()
(ecb-do-if-buffer-visible-in-ecb-frame
'ecb-examples-bufferinfo-buffer-name
;; here we can be sure that the buffer with name
;; `ecb-examples-bufferinfo-buffer-name' is displayed in a
;; window of `ecb-frame'
;; The macro `ecb-do-if-buffer-visible-in-ecb-frame' locally
;; binds the variables visible-buffer and visible-window!! See
;; documentation of this macro!
(let ((filename (buffer-file-name (current-buffer))))
(if (and filename (file-readable-p filename))
;; real filebuffers
;; here we could add a smarter mechanism;
;; see ecb-examples.el
(ecb-examples-print-file-attributes visible-buffer
filename)
;; non file buffers like help-buffers etc...
(setq ecb-examples-bufferinfo-last-file nil)
(ecb-examples-print-non-filebuffer visible-buffer
(buffer-name
(current-buffer)))
))))
@end group
@end lisp
Two conveniance commands for the user:
@lisp
@group
(defun ecb-maximize-bufferinfo-window ()
"Maximize the bufferinfo-window.
I.e. delete all other ECB-windows, so only one ECB-window and the
edit-window\(s) are visible \(and maybe a compile-window). Works
also if the ECB-analyse-window is not visible in current layout."
(interactive)
(ecb-display-one-ecb-buffer ecb-examples-bufferinfo-buffer-name))
(defun ecb-goto-bufferinfo-window ()
"Make the bufferinfo-window the current window."
(interactive)
(ecb-goto-ecb-window ecb-examples-bufferinfo-buffer-name))
@end group
@end lisp
The function which makes the bufferinfo-buffer dedicated to a window
and registers the new special window/buffer at ECB.
@lisp
@group
(defecb-window-dedicator ecb-examples-set-bufferinfo-buffer
ecb-examples-bufferinfo-buffer-name
"Set the buffer in the current window to the bufferinfo-buffer
and make this window dedicated for this buffer."
(switch-to-buffer (get-buffer-create
ecb-examples-bufferinfo-buffer-name))
(setq buffer-read-only t))
@end group
@end lisp
This is all what we need for the special bufferinfo buffer. We have
demonstrated already three of the important functions/macros of the
layout-engine API of ECB: @code{ecb-with-readonly-buffer},
@code{ecb-do-if-buffer-visible-in-ecb-frame} and
@code{defecb-window-dedicator} (@pxref{The layout-engine API}.
Especially the second macro is strongly recommended for programming
good synchronizing functions which do not waste CPU!
@subsubsection The action buffer of the example
The name of the action-buffer:
@lisp
(defconst ecb-examples-action-buffer-name " *ECB action buffer*")
@end lisp
Two helper functions for creating a readonly action-buffer with a
special local key-map for the middle-mouse-button and two buttons
[prior] and [next]:
@lisp
@group
(defun ecb-examples-insert-text-in-action-buffer (text)
(let ((p (point)))
(insert text)
(put-text-property p (+ p (length text)) 'mouse-face
'highlight)))
(defun ecb-examples-action-buffer-create ()
(save-excursion
(if (get-buffer ecb-examples-action-buffer-name)
(get-buffer ecb-examples-action-buffer-name)
(set-buffer (get-buffer-create
ecb-examples-action-buffer-name))
;; we setup a local key-map and bind middle-mouse-button
;; see ecb-examples.el for the full code
;; insert the action buttons [prior] and [next] and
;; make it read-only
(ecb-with-readonly-buffer (current-buffer)
(erase-buffer)
(ecb-examples-insert-text-in-action-buffer "[prior]")
;; analogous for the [next] button
)
(current-buffer))))
@end group
@end lisp
The function which performs the actions in the action-buffer if
clicked with the middle-mouse button onto a button [next] or [prior].
@lisp
@group
(defun ecb-examples-action-buffer-clicked (e)
(interactive "e")
(mouse-set-point e)
(let ((line (buffer-substring (ecb-line-beginning-pos)
(ecb-line-end-pos))))
(cond ((string-match "prior" line)
(ecb-select-edit-window)
(call-interactively 'scroll-down))
((string-match "next" line)
;; analogous for [next]
))))
@end group
@end lisp
Two conveniance-commands for the user:
@lisp
@group
(defun ecb-maximize-action-window ()
"Maximize the action-window.
I.e. delete all other ECB-windows, so only one ECB-window and the
edit-window\(s) are visible \(and maybe a compile-window). Works
also if the ECB-analyse-window is not visible in current layout."
(interactive)
(ecb-display-one-ecb-buffer ecb-examples-action-buffer-name))
(defun ecb-goto-action-window ()
"Make the action-window the current window."
(interactive)
(ecb-goto-ecb-window ecb-examples-action-buffer-name))
@end group
@end lisp
The function which makes the action-buffer dedicated to a window and
registers it at ECB.
@lisp
@group
(defecb-window-dedicator ecb-examples-set-action-buffer
(buffer-name (ecb-examples-action-buffer-create))
"Set the buffer in the current window to the action-buffer
and make this window dedicated for this buffer."
(switch-to-buffer (buffer-name (ecb-examples-action-buffer-create))))
@end group
@end lisp
We do not need more code for the action buffer. All of the code is
standard emacs-lisp which would also needed if used without ECB. You
see that you can use any arbitrary code as second argument for
@code{defecb-window-dedicator} as long it returns a buffer-name.
@subsubsection Adding the bufferinfo- and action-buffer to a new layout
Now we add the bufferinfo- and the action-buffer to a new layout of
type top with name ``example-layout1'':
@lisp
@group
(ecb-layout-define "example-layout1" top
;; dedicating the bufferinfo window to the bufferinfo-buffer
(ecb-examples-set-bufferinfo-buffer)
;; creating the action-window
(ecb-split-hor 0.75)
;; dedicate the action window to the action-buffer
(ecb-examples-set-action-buffer)
;; select the edit-window
(select-window (next-window)))
@end group
@end lisp
This all what we need to define the new layout. See @ref{Programming a
new layout} for more details of the pure layout-programming task.
@subsubsection Synchronizing the bufferinfo-buffer automatically
The last thing we have to do is to synchronize the bufferinfo-buffer
with current edit-window. We do this by adding
@code{ecb-examples-bufferinfo-sync} to the hook
@code{ecb-current-buffer-sync-hook'} (The file @file{ecb-examples.el}
shows a smarter mechanism for (de)activating the new layout and the
synchronization but this works also very well).
@lisp
(add-hook 'ecb-current-buffer-sync-hook 'ecb-examples-bufferinfo-sync)
@end lisp
@subsubsection Activating and deactivating new layouts
Because a set of new special windows integrated in a new layout is
often just the GUI of a complete tool (like a graphical debugger) we
demonstrate here the complete activation and deactivation of such a
tool or at least of the tool-GUI. We decide that the GUI of our
example ``tool'' needs a compile-window with height 5 lines and the
height of the special windows ``row'' on top should be exactly 6 lines
(normally width and height of the special windows should be a fraction
of the frame, but here we use 6 lines@footnote{You can change the code
in the file @file{ecb-examples.el} to use a frame-fraction of 0.2
instead of 6 hard lines, just try it!}
Here comes the (de)activation code.
The code for saving and restoring the state before activation (the
full code is available in @file{ecb-examples.el}:
@lisp
@group
(defun ecb-examples-preactivation-state(action)
(cond ((equal action 'save)
;; code for saving the state
)
((equal action 'restore)
;; code for restoring the state
)))
@end group
@end lisp
The following function activates the GUI of our example tool:
@lisp
@group
(defun ecb-examples-activate ()
(interactive)
;; activating the synchronization of the bufferinfo-window
(add-hook 'ecb-current-buffer-sync-hook
'ecb-examples-bufferinfo-sync)
;; saving the state
(ecb-examples-preactivation-state 'save)
;; switch to our preferred layout
(setq ecb-windows-height 6)
(setq ecb-compile-window-height 5)
(ecb-layout-switch "example-layout1"))
@end group
@end lisp
This function deactivates the GUI of our example-tool and restores the
state as before activation:
@lisp
@group
(defun ecb-examples-deactivate ()
(interactive)
(remove-hook 'ecb-current-buffer-sync-hook
'ecb-examples-bufferinfo-sync)
(ecb-examples-preactivation-state 'restore)
(ecb-layout-switch ecb-layout-name))
@end group
@end lisp
Now we have all code for the new layout and the new layout-buffers.
The example is ready for use; just load @file{ecb-examples.el} (s.a.).
@node Possible layout-outlines, The layout-engine API, Programming special windows, The layout-engine
@subsection The wide range of possible layout-outlines
In the two previous sections @ref{Programming a new layout} and
@ref{Programming special windows} we have explained in detail how to
program new layouts and how to program new special windows/buffers and
adding them to a new layout.
The intention of this section is to be a summary what are the real
restrictions for a new layout-outline programmed with
@code{ecb-layout-define}. This is necessary because until now we just
programmed ``obvious'' layouts, means layout which are in principle
very similar to the standard ones which means one big edit-window and
some special windows ``around'' this edit-window. This section will
show you that a layout can have also very different outlines.
OK, here are the real restrictions and conditions for a layout
programmed with @code{ecb-layout-define}:
@enumerate
@item
It must have exactly one edit-window regardless of its size. The user
of this layout can later split this edit-window in as many
edit-windows as he like.
@item
All other windows created within the @var{CREATE-CODE} body of
@code{ecb-layout-define} (@pxref{Programming a new layout}) must be
dedicated to their buffers.
@item
All the dedicated windows must (exclusive!) either reside on the left,
right, top or left-and-right side of the edit-window. This will be
defined with the @var{TYPE}-argument of @code{ecb-layout-define}
(@pxref{Programming a new layout}).
@end enumerate
You see, there are only three restrictions/conditions. These and only
these must be fulfilled at layout-programming.
Demonstrating what this really means and how flexible the
layout-engine of ECB really is, can be done best with some
``pathological'' layout-outlines. All the following are correct
layouts (working code is added below each layout):
The following is a top layout with three vertical layered special
windows.
@example
@group
------------------------------------------------------------------
| |
| Upper special window |
| |
|----------------------------------------------------------------|
| |
| Middle special window |
| |
|----------------------------------------------------------------|
| |
| Lower special window |
| |
|================================================================|
| |
| Edit-area |
| (can be splitted by the user in several edit-windows) |
------------------------------------------------------------------
| |
| Compilation-window (optional) |
| |
------------------------------------------------------------------
@end group
@end example
Here is the code for that top layout (all buffers are dummy-buffers):
@lisp
@group
;; The "window dedicator" functions:
(defecb-window-dedicator ecb-set-usw-buffer "Upper special window"
(switch-to-buffer (get-buffer-create "Upper special window")))
(defecb-window-dedicator ecb-set-msw-buffer "Middle special window"
(switch-to-buffer (get-buffer-create "Middle special window")))
(defecb-window-dedicator ecb-set-lsw-buffer "Lower special window"
(switch-to-buffer (get-buffer-create "Lower special window")))
;; The layout itself:
(ecb-layout-define "example-layout3" top
nil
;; here we have an edit-window and above one top window which we can
;; now split in several other windows. Dependent on the value of
;; `ecb-compile-window-height' we have also a compile-window at the
;; bottom.
(ecb-set-usw-buffer)
(ecb-split-ver 0.33)
(ecb-set-msw-buffer)
(ecb-split-ver 0.5)
(ecb-set-lsw-buffer)
;; select the edit-window.
(select-window (next-window)))
@end group
@end lisp
The following is a left-right layout which has six special windows in
the left-''column'' and one big special window in the
right-''column''. For left-right layouts the left-''column'' and the
right-''column'' have always the same width.
@example
@group
------------------------------------------------------------------
| | | | |
| Left1 | Left5 | | |
| | | | |
|-------------| | | |
| | | | | |
| | | | | |
| | | | | |
| Left2| Left3|-------| Edit-area | Right1 |
| | | | (can be splitted | |
| | | | in several edit- | |
| | | | windows) | |
|-------------| | | |
| | | | |
| Left4 | Left6 | | |
| | | | |
------------------------------------------------------------------
| |
| Compilation-window (optional) |
| |
------------------------------------------------------------------
@end group
@end example
Here is the code for that left-right layout, again with dummy-buffers
(depending to your screen-resolution you will need a quite big value
for @code{ecb-windows-width}, e.g. 0.4):
Here is one of the ``window dedicator''-functions@footnote{The
``window dedicators'' for all these ecb-windows/buffers are
not explicitly described - they look all like
@code{ecb-set-left1-buffer} - of course with different buffer-names!}:
@lisp
@group
(defecb-window-dedicator ecb-set-left1-buffer "Left1"
(switch-to-buffer (get-buffer-create "Left1")))
@end group
@end lisp
Here is the layout-definition itself:
@lisp
@group
(ecb-layout-define "example-layout2" left-right
nil
;; here we have an edit-window and left and right two windows each
;; with width `ecb-windows-width'. Dependent to the value of
;; `ecb-compile-window-height' we have also a compile-window at the
;; bottom.
(ecb-set-left1-buffer)
(ecb-split-hor 0.66 t)
(ecb-split-ver 0.75)
(ecb-set-left4-buffer)
(select-window (previous-window (selected-window) 0))
(ecb-split-ver 0.25 nil t)
(ecb-set-left2-buffer)
(ecb-split-hor 0.5)
(ecb-set-left3-buffer)
(select-window (next-window (next-window)))
(ecb-set-left5-buffer)
(ecb-split-ver 0.5)
(ecb-set-left6-buffer)
(select-window (next-window (next-window)))
(ecb-set-right1-buffer))
;; select the edit-window
(select-window (previous-window (selected-window) 0)))
@end group
@end lisp
Especially the last example should demonstrate that even very
complicated layouts are easy to program with @code{ecb-layout-define}.
If such layouts are senseful is another topic ;-)
@node The layout-engine API, , Possible layout-outlines, The layout-engine
@subsection The complete layout-engine API of ECB
This section lists all functions, macros, variables and user-options
the layout-engine API of ECB offers foreign packages. Call
@code{describe-function} rsp. @code{describe-variable} to get a
detailed description.
Functions and macros for programming with layouts and special
ecb-windows:
@itemize @minus
@item @code{defecb-window-dedicator}
@item @code{ecb-available-layouts-member-p}
@item @code{ecb-canonical-ecb-windows-list}
@item @code{ecb-canonical-edit-windows-list}
@item @code{ecb-compile-window-live-p}
@item @code{ecb-compile-window-state}
@item @code{ecb-do-if-buffer-visible-in-ecb-frame}
@item @code{ecb-exec-in-window}
@item @code{ecb-get-current-visible-ecb-buffers}
@item @code{ecb-layout-define}
@item @code{ecb-layout-switch}
@item @code{ecb-layout-undefine}
@item @code{ecb-point-in-compile-window}
@item @code{ecb-point-in-ecb-window}
@item @code{ecb-point-in-edit-window}
@item @code{ecb-select-edit-window}
@item @code{ecb-split-hor}
@item @code{ecb-split-ver}
@item @code{ecb-where-is-point}
@item @code{ecb-with-dedicated-window}@footnote{Normally not needed because
@code{defecb-window-dedicator} does all necessary.}
@end itemize
Utility functions/macros:
@itemize @minus
@item @code{ecb-display-one-ecb-buffer}
@item @code{ecb-enlarge-window}
@item @code{ecb-fix-filename}
@item @code{ecb-goto-ecb-window}
@item @code{ecb-window-live-p}
@item @code{ecb-with-readonly-buffer}
@end itemize
Some other maybe useful functions/macros:
@itemize @minus
@item @code{ecb-with-adviced-functions}
@item @code{ecb-with-original-functions}
@item @code{ecb-with-some-adviced-functions}
@end itemize
Some useful @strong{READONLY} variables:
@itemize @minus
@item @code{ecb-compile-window}
@item @code{ecb-last-edit-window-with-point}
@item @code{ecb-last-source-buffer}
@end itemize
@strong{Caution}: DO NOT USE THE VARIABLE @code{ecb-edit-window} IN
YOUR PROGRAMS!
User-options and hooks related to the layout-engine API:
@itemize @minus
@item @code{ecb-current-buffer-sync-hook}
@item @code{ecb-hide-ecb-windows-after-hook}
@item @code{ecb-hide-ecb-windows-before-hook}
@item @code{ecb-redraw-layout-after-hook}
@item @code{ecb-redraw-layout-before-hook}
@item @code{ecb-show-ecb-windows-after-hook}
@item @code{ecb-show-ecb-windows-before-hook}
@item @code{ecb-windows-height}
@item @code{ecb-windows-width}
@item @code{ecb-compile-window-height}
@end itemize
@node Conflicts and bugs, FAQ, Elisp programming, Top
@chapter Conflicts and bugs of ECB
This chapter describes what to do when there are conflicts with other
packages and also the known (and currently unfixed) bugs of ECB. If
possible (and in most cases it is possible ;-) then a practicable
solution or workaround is described.
@menu
* Conflicts:: Conflicts with other packages
* Bugs:: Known bugs
@end menu
@node Conflicts, Bugs, Conflicts and bugs, Conflicts and bugs
@section Conflicts with other packages
This chapter contains a list of already known conflict between ECB and
other packages and how to solve them - in most cases ECB already
contains a suitable workaround.
That is followed by a general recipe what you can do when you have
detected a conflict between ECB and a package is not listed in the
know-conflicts-section.
@subsection Proved workarounds or recommendations for other packages
Here is a list of packages which are proved to work properly with ECB
and if not (i.e. there are conflicts) then helpful
solutions/hints/workarounds are offered:
@subsubsection Package bs.el
@cindex bs package
@cindex bs-show
The package bs.el offers a nifty buffer-selection buffer. The main
command of this package is @code{bs-show}. With ECB < 2.20 this
command does not really working well within activated ECB. But as of
version 2.20 of ECB there should be no problems using this package.
If you add ``*buffer-selection*'' as buffer-name to the option
@code{ecb-compilation-buffer-names} then ECB will always display the
buffer-selection buffer of bs in the compile-window (if there is one).
Otherwise bs will use the edit-area to do its job.
@subsubsection Package BBDB
@cindex BBDB
As of ECB 2.21 there should be no conflicts between BBDB and ECB, so
BBDB can be used even when the ECB-windows are visible.
But if you encounter problems then it is recommened to use one of the
window-managers escreen.el or winring.el (@pxref{Window-managers and
ECB}). With such a window-manager ECB and BBDB should work together
very well under all circumstances!
@subsubsection Package calendar.el
@cindex calendar package
With activated ECB @code{calendar} does not shrink its window to the small
size but splits the window equally. But if you add this to your
@file{.emacs} it works:
@example
@group
(add-hook 'initial-calendar-window-hook
(function (lambda ()
(when (and ecb-minor-mode
(ecb-point-in-edit-window))
;; if no horizontal split then nothing
;; special to do
(or (= (frame-width) (window-width))
(shrink-window (- (window-height) 9))))
)))
@end group
@end example
@subsubsection Package cygwin-mount.el
@cindex cygwin-mount package
There can be a conflict between ECB and cygwin-mount.el if the
following conditions are true:
@itemize @minus
@item You are working with cygwin-mount.el (sounds clear :-)
@item You have set @code{cygwin-mount-build-mount-table-asynch} to not
nil
@item ECB is automatically started after starting Emacs (e.g. with
@code{ecb-auto-activate} or calling @code{ecb-activate} in
@code{window-setup-hook})
@item Your Emacs-setup contains a call of @code{cygwin-mount-activate}.
@end itemize
Under these circumstances Emacs 21.X sometimes eats up the whole CPU (at
least with Windows XP) and the cygwin-mount-table is never build.
But there is an easy work-around: Call @code{cygwin-mount-activate}
first *AFTER* ECB is activated. This can be done with the hook
@code{ecb-activate-hook}:
@example
@group
(add-hook 'ecb-activate-hook
(function (lambda ()
(require 'cygwin-mount)
(setq cygwin-mount-build-mount-table-asynch t)
(cygwin-mount-activate))))
@end group
@end example
@subsubsection Package desktop.el
@cindex desktop
ECB works perfectly with the desktop-saver desktop.el. But to ensure
this the option @code{desktop-minor-mode-table} @strong{MUST} contain
the following entry:
@example
(ecb-minor-mode nil)
@end example
Without this entry desktop.el tries for each buffer it loads after
Emacs-start to enable @code{ecb-minor-mode} and therefore to start
ECB. This conflicts with ECB! Therefore you must add the entry above
to @code{desktop-minor-mode-table}!
Further it is strongly recommended to add entries for all the
minor-mode of the semantic-package to @code{desktop-minor-mode-table},
so for example add also:
@example
@group
(semantic-show-unmatched-syntax-mode nil)
(semantic-stickyfunc-mode nil)
(senator-minor-mode nil)
(semantic-idle-scheduler-mode nil)
@end group
@end example
Which modes you have to add depends on which modes of semantic you
use. But to get sure you should add all minor-modes of the
semantic-package because these modes are normally activated by the
related ``global'' command (e.g.
@code{global-semantic-show-unmatched-syntax-mode}) or by adding the
minor-mode to the related major-mode-hook.
It has also been reported that just disabling the Tip-Of-The-Day
(option: @code{ecb-tip-of-the-day}) fixes the compatibility-problems
with desktop.el. Just try it out!
@subsubsection Package edebug (Lisp Debugger)
@cindex edebug
It is strongly recommended to run edebug only when the ECB-windows are
hidden. With visible ECB-windows there will probably serious conflicts
between the ECB-layout and the edebug-window-manager.
@subsubsection Package ediff.el
@cindex ediff
In most cases ECB works very well with ediff (see option
@code{ecb-run-ediff-in-ecb-frame}). But currently suspending ediff
with @code{ediff-suspend} and restoring the ediff-session (e.g. with
command @code{eregistry}) does confuse the window-management of ECB.
If you often use ediff in a scenario where you suspend ediff and
reactivate it later then it is recommended to exit ECB first
(@code{ecb-deactivate} or @code{ecb-minor-mode})!
@subsubsection Package func-menu.el
@cindex func-menu package
This package has been reported to produce some conflicts under some
circumstances when ECB is activated. Some of them could be reproduced
by the ECB-maintainer. So the recommendation is to disable
func-menu-support when using ECB. Normally using func-menu makes no
sense in combination with ECB because ECB provides the same and even
more informations as func-menu - so func-menu is redundant ;-)
@subsubsection Package Gnus (Newsreader)
@cindex Gnus
As of ECB 2.21 there should be no conflicts between Gnus and ECB, so
Gnus can be used even when the ECB-windows are visible.
But if you encounter problems then it is recommened to use one of the
window-managers escreen.el or winring.el (@pxref{Window-managers and
ECB}). With such a window-manager ECB and Gnus should work together
very well under all circumstances!
@subsubsection Package JDEE (Java Development Environment)
@cindex JDEE
JDEE has a lot of ``dialogs'' where the user can select among several
choices. An example is importing classes via the command
@code{jde-import-find-and-import}. These dialogs are strongly designed
to work in an environment where a new temporary window is created, the
contents of the dialog are displayed in the new window, the user
select his choice and hits [OK]. After that the new window is deleted
and the selection is performed (for example the chosen import
statement are inserted in the source-buffer.
@strong{Caution}: ECB can work very well with this dialogs but only if
the buffer-name of these dialog-buffers (normally ``Dialog'') is not
contained in the option @code{ecb-compilation-buffer-names}. So do not
add the string ``Dialog'' to this option!
@strong{Please Note}: Regardless if a persistent compile-window is used
(i.e. @code{ecb-compile-window-height} is not nil) or not, these
JDEE-dialogs will always being displayed by splitting the edit-window
of ECB and not within the compile-window.
@subsubsection Package scroll-all.el (scroll-all-mode)
@cindex scroll-all-mode
@cindex scroll-all
ECB advices @code{scroll-all-mode} so it is working correct during
running ECB. This means if point stays in an edit-window and the
edit-window is splitted then all edit-windows are scrolled by
@code{scroll-all-mode} and no other window! If point stays in any
other window just this selected window is scrolled. This is the only
senseful behavior of @code{scroll-all-mode} with ECB.
@subsubsection Package VC (Version Control)
@cindex VC package
@cindex Version control
The variable @code{vc-delete-logbuf-window} must be set to nil during
active ECB. This can be done with the hooks mentioned in @ref{Elisp
programming}.
@subsubsection Package VM (Emacs Mail-Client)
@cindex VM package
As of ECB 2.21 there should be no conflicts between VM and ECB, so
VM can be used even when the ECB-windows are visible.
But if you encounter problems then it is recommened to use one of the
window-managers escreen.el or winring.el (@pxref{Window-managers and
ECB}). With such a window-manager ECB and VM should work together very
well under all circumstances!
@subsubsection Package winner.el (winner-mode)
@cindex winner-mode
@cindex winner
@code{winner-mode} is autom. disabled as long as ECB is running. ECB
has its own window-management which is completely incompatible with
@code{winner-mode}! But @code{winner-mode} makes also not really sense
with ECB.
@subsubsection Package wb-line-number.el
@cindex wb-line-number
Do not use the package wb-line-number.el in combination with ECB - it
will not work and it will not work under any circumstances and there
is no way to make it work together and there will be no way in the
future!
The reason behind that is: wb-line-number.el uses additional dedicated
windows to display the line-numbers. And ECB can not work if there
there are additional dedicated windows - additional to that ones
created by ECB.
@subsubsection Application xrefactory
@cindex xrefactory
Xrefactory (also known as Xref, X-ref and Xref-Speller), the
refactoring browser for (X)Emacs@footnote{Xrefactory is available at
@ifhtml
@uref{http://www.xref-tech.com}
@end ifhtml
@ifnothtml
@url{http://www.xref-tech.com}
@end ifnothtml
}, can be used during running ECB regardless if the ECB-windows are
visible or not. There should be no conflicts as of ECB versions >=
2.21.
If there are conflicts with the Xref-browser then the most recommended
way is to use one of the window-manager escreen.el or winring.el (and
then use different escreens or window-configurations for ECB and
Xrefactory-browsing - @ref{Window-managers and ECB}).
@subsection What to do for unknown conflicts with other packages
As of version 2.20 the layout-engine of ECB is so flexible that
normally there should be no conflicts with other packages unless these
packages have their own complete window-layout-management (e.g. Gnus,
BBDB, Xrefactory). But these packages can and should be handled very
well with the window-manager-support of ECB (@pxref{Window-managers
and ECB}).
So if you detect an unknown (i.e. not listed in the conflicts-list in
the next subsection) conflict with a small package and some of its
commands and you have installed an ECB-version < 2.20 the first task
you have to do is to upgrade to a version >= 2.20!
If this doesn't solve the problem a very probable reason for the
conflict is that the command fails if called from another window than
an edit-window of the ecb-frame. So please check if the problem
disappears if you call the failing command from an edit-window of ECB.
If this is true then you you can add the following code to your
.emacs (and of course replace the XXX with the failing command):
@example
@group
(defadvice XXX (before ecb activate)
"Ensures `XXX' works well when called from another window
as an edit-window. Does nothing if called in another frame
as the `ecb-frame'."
(when (equal (selected-frame) ecb-frame)
(unless (ecb-point-in-edit-window)
(ecb-select-edit-window))))
@end group
@end example
This before-advice runs before the command XXX and ensures that the
XXX is called from within an edit-window if the current selected
window is not an edit-window. It does nothing if called for another
frame as the ecb-frame.
If such an advice solves the problem then please send a note with the
solution to the ECB-mailing-list or direct to the ECB-maintainer so
the solution can be integrated in the next ECB-release
If calling from an edit-window fails too then please file a complete
bug-report to the ECB-mailing-list (@pxref{Submitting problem
report}). This report should contain a detailed description which
command of which package fails under which circumstances!
@node Bugs, , Conflicts, Conflicts and bugs
@section Known bugs
This section describes all currently known bugs of ECB. The
maintainers of ECB try to fix these bugs as soon as possible.
@subsection Following the source-file link in a help-buffer
The following bug occurs only in ECB-versions < 1.96 and is fixed
since ECB 1.96!!
This bug only occurs if a compile-window is used and visible!
If you call functions like @code{describe-function} which displays a
help-buffer in the compile-window, then you will often get an output
like this in the compile-window:
@example
ecb-activate is an interactive compiled Lisp function in `ecb'.
(ecb-activate)
Activates the ECB...
@end example
The link to `ecb' is normally a click-able link, means if you click
with the middle-mouse button onto it the file is opened (in our
example @file{ecb.el} would be opened.
If you click onto it when the help-buffer is already the current
buffer (i.e. the compile-window is already selected before the click!)
then all is working fine (i.e. the file is opened in the edit-window),
but if you click onto the link without selecting the compile-window
before (i.e. the edit-window is the current selected window) then the
file is opened in the compile-window which is probably not what you
want. Not a big problem but annoying.
The only available workaround is, first selecting the compile-window
and then clicking onto the link!
@subsection Extra history-entries for JDEE source-buffers
ECB on occasions creates an extra edit buffer for entries in the
history window. For example, let say there are three entries in the
history window:
@example
@group
Test1
Test2
Test3
@end group
@end example
In the edit window Test1 file is edited. When clicked on Test2 entry
in history, on occasion instead of switching to the existing buffer for
Test2, a new edit buffer is opened for Test2 file. At this point, there
are four entries in the history as follows:
@example
@group
Test2
Test2<2>
Test1
Test3
@end group
@end example
@node FAQ, Command Index, Conflicts and bugs, Top
@chapter Frequently asked questions
This is the Emacs Code Browser FAQ.
@c To produce prettier output we make a small empty column between the
@c question- and the answer-column. Therefore every Q/A-item must look
@c like:
@c
@c @c an empty line between every Q/A-item
@c @item @tab @tab
@c
@c @c The Q/A-item
@c @item
@c <The text of the question?>
@c @tab @tab
@c <The text of the answer>
@multitable @columnfractions 0.40 0.01 0.59
@item
@ifnotinfo
@strong{Question}
@end ifnotinfo
@ifinfo
QUESTION
@end ifinfo
@tab @tab
@ifnotinfo
@strong{Answer}
@end ifnotinfo
@ifinfo
ANSWER
@end ifinfo
@c an empty line between every Q/A-item
@item @tab @tab
@c The Q/A-item
@item
What is the first step i should do if i have problems with ECB?
@tab @tab
Read carefully the related sections of the online-help of ECB.
@item @tab @tab
@item
What should i do, if a have a problem which can not be solved even
after reading the online-help?
@tab @tab
Send a problem-report to the ECB-mailing-list with the command
@code{ecb-submit-problem-report}.
@ifinfo
@*
@end ifinfo
See @ref{Submitting problem report}.
@item @tab @tab
@item
What should i do, if another package seems not to work correct with
ECB?
@tab @tab
Take a look into @ref{Conflicts}. If your package is not listed there
then submit a problem-report.
@item @tab @tab
@item
Can ECB parse and display source-contents not supported by semantic?
@tab @tab
Yes, in all version >= 1.94. ECB can now parse and display all
source-contents supported by semantic, imenu or etags - same as
speedbar. See @ref{Non-semantic sources}.
@item @tab @tab
@item
Why are the lines in the ECB-, temp- and compilation-buffers not
wrapped but truncated?
@tab @tab
Check the variable @code{truncate-partial-width-windows} and set it to
nil.
@item @tab @tab
@item
Why doesn't ECB work correct with VC?
@tab @tab
The variable @code{vc-delete-logbuf-window} must be set to nil during
active ECB. This can be done with the hooks of ECB.
@item @tab @tab
@item
Does ECB support C++ as well as Java?
@tab @tab
This depends strongly on the used semantic-version, but all
semantic-versions >= semantic-1.4.3 support C++ really well.
@item @tab @tab
@item
Does ECB support Perl?
@tab @tab
If perl can be parsed either by imenu, etags or semantic then ECB
supports perl. Of course ECB would support perl best if perl is
supported by semantic.
@item @tab @tab
@item
Does ECB support language XYZ?
@tab @tab
See question ``Does ECB support Perl?'' and replace ``Perl'' with
``XYZ'' in the answer.
@item @tab @tab
@item
How to add new languages to ECB?
@tab @tab
Add the language XYZ to semantic (perform all necessary steps described in
the semantic-manual) and ECB will automatically support language XYZ!
There is nothing to do in ECB itself! Same when you write an imenu- or
etags-support for language XYZ.
@item @tab @tab
@item
Why does ECB not recognize my source-files for C++?
@tab @tab
Your C++-files have probably an extension which is not mapped to
c++-mode in @code{auto-mode-alist} and/or your own Emacs-setup has
``destroyed'' the correct value of the hook-variable
@code{c++-mode-hook}.
@ifinfo
@*
@end ifinfo
See @ref{Setting up Emacs}.
@item @tab @tab
@item
Why doesn't ECB display the node name in the echo area if mouse moves
over it?
@tab @tab
There can be several reasons: First the value of the option
@code{ecb-show-node-name-in-minibuffer} must be either @code{always} or
@code{if-too-long}. If this is OK, then maybe you have turned on
follow-mouse AFTER activating ECB; follow-mouse must be turned on
BEFORE ECB is activated, e.g. in the @code{ecb-activate-hook}! But with
Emacs 21.X and XEmacs there are no problems with this feature, just
activate it.
@item @tab @tab
@item
Is it possible to make the history of ECB persistent?
@tab @tab
You can use the library ``desktop.el'' which works very well with ECB.
Then all files of your recent Emacs-session will be opened
automatically after next Emacs-start and will be added automatically
to the ECB-history after ECB-start.
@item @tab @tab
@item
Is there an ``Intellisense''-mechanism like with other IDEs?
@tab @tab
For Java the JDEE@footnote{
@ifhtml
@uref{http://jdee.sunsite.dk/}
@end ifhtml
@ifnothtml
@url{http://jdee.sunsite.dk/}
@end ifnothtml
} has this feature and for all other languages
semantic offer something similar, see
@ifhtml
@uref{http://cedet.sourceforge.net/intellisense.shtml}
@end ifhtml
@ifnothtml
@url{http://cedet.sourceforge.net/intellisense.shtml}
@end ifnothtml
@item @tab @tab
@item
Can i use ECB in combination with Gnus within one frame?
@tab @tab
You can, but for ECB-versions < 1.96 it is not recommended because
each of them has it's own window-management and probably there will be
conflicts, so use different frames for ECB and Gnus! But beginning
with ECB 1.96 you can use either escreen.el or winring.el as
``window-manager'' which allows you in consequence to use ECB and
applications like Gnus in one frame!
@ifinfo
@*
@end ifinfo
@xref{Window-managers and ECB}.
@item @tab @tab
@item
Can i speed up displaying the contents of big-size directories?
@tab @tab
Yes, see the option @code{ecb-cache-directory-contents}. Read the
section
@ifinfo
@*
@end ifinfo
@ref{Large directories}.
@item @tab @tab
@item
Is it possible to create/use other layouts than the built-in ones?
@tab @tab
Yes. @ref{Creating a new ECB-layout} and
@ifinfo
@*
@end ifinfo
@ref{The layout-engine} are the relevant sections. The former one
describes how to create interactively new layouts where the latter
one is for Elisp-programmers.
@item @tab @tab
@item
Can i use speedbar as directory-browser within ECB?
@tab @tab
Yes, see @ref{Integrating speedbar}.
@item @tab @tab
@item
Can i exclude subdirectories from the recursive grep in the directories buffer?
@tab @tab
Yes, see @ref{Grepping directories}.
@item @tab @tab
@item
How can i prevent contaminating each directory with a file @file{semantic-cache}?
@tab @tab
Set @code{semanticdb-default-save-directory} to a directory.
@item @tab @tab
@item
Why ECB displays large portions of current source-file with dark background?
@tab @tab
This comes from semantic;
@ifinfo
@*
@end ifinfo
see @ref{Setting up Emacs}.
@item @tab @tab
@item
Why ECB underlines some parts of current source-file?
@tab @tab
This comes from semantic;
@ifinfo
@*
@end ifinfo
see @ref{Setting up Emacs}.
@item @tab @tab
@item
Can i add my own commands to the popup-menus of tree-buffers?
@tab @tab
Yes, see @ref{Using the mouse}.
@item @tab @tab
@item
Can ECB display the compile-window ``on demand''?
@tab @tab
Yes, see @ref{Tips and tricks}.
@item @tab @tab
@item
Which buffers are treated as compilation-buffers by ECB?
@tab @tab
See the docstring of the function @code{ecb-compilation-buffer-p}.
@item @tab @tab
@item
How can i change the modeline of an ECB-tree-buffer?
@tab @tab
You can change it with the options @code{ecb-mode-line-prefixes},
@code{ecb-mode-line-data} and
@code{ecb-mode-line-display-window-number}.
@item @tab @tab
@item
Can the tree-buffers being selected faster than with the
standard-keybindings of ECB?
@tab @tab
Yes, see option @code{ecb-mode-line-display-window-number}.
@item @tab @tab
@item
Can ECB display the window-number in the modeline of the special windows?
@tab @tab
Yes, see option @code{ecb-mode-line-display-window-number}.
@item @tab @tab
@item
How can i change the keybindings of ECB?
@tab @tab
You can do this with option @code{ecb-key-map} (@pxref{ecb-general}).
@item @tab @tab
@item
What can i do if hiding/showing from the methods-buffer does not work?
@tab @tab
Either the current @code{major-modes} is not supported by hideshow or
you have to add an entry to @code{hs-special-modes-alist}
@ifinfo
@*
@end ifinfo
(@pxref{Hide-show}).
@item @tab @tab
@item
Can i maximize one of the ECB-windows for better overlook?
@tab @tab
Yes, see @ref{Maximizing the ECB windows}.
@item @tab @tab
@item
Can i hide the ECB-windows for getting more editing-space?
@tab @tab
Yes, see @ref{Hiding the ECB windows}.
@item @tab @tab
@item
Can i define the actions ECB performs after visiting a tag?
@tab @tab
Yes, see @ref{Visiting tags}.
@item @tab @tab
@item
Buffers are not displayed correctly in the compile-window?
@tab @tab
See @ref{Problems with the compile window}.
@item @tab @tab
@item
Can ECB work together with window-managers like escreen.el?
@tab @tab
Yes, see @ref{Window-managers and ECB}.
@item @tab @tab
@item
Can i remove these ``ugly'' vertical lines from a tree-buffer?
@tab @tab
Yes, see option @code{ecb-tree-buffer-style}.
@item @tab @tab
@item
ECB does not display images in the tree-buffers - what can i do?
@tab @tab
Customize @code{ecb-tree-buffer-style} and restart ECB. But note: GNU
Emacs <= 21.3.X for Windows does not support image-display so ECB uses
always ascii-guide-lines even when here the image-style is set in
@code{ecb-tree-buffer-style}.
@item @tab @tab
@item
Do @code{special-display-function} et. al. work with ECB.
@tab @tab
Yes, see
@ifinfo
@*
@end ifinfo
@ref{Using special-display with ECB}.
@item @tab @tab
@item
Can i activate the popup-menu of a tree-buffer from keyboard?
@tab @tab
Yes, see @ref{Using popup-menus}.
@item @tab @tab
@item
Can i display the popup-menu of a tree-buffer with tmm?
@tab @tab
Yes, see @ref{Using popup-menus}.
@item @tab @tab
@item
Does ECB disable all advices after deactivation?
@tab @tab
``Nes''@footnote{Nes is a combination of No and Yes :-)}, see remarks
in the documentation of the option
@code{ecb-split-edit-window-after-start}.
@item @tab @tab
@item
Can ECB preserve the full state of ECB between deactivation and next
activation?
@tab @tab
Yes, see the option @code{ecb-split-edit-window-after-start}.
@item @tab @tab
@item
Can i change the behavior how ECB chooses another window for selecting
it or scrolling it.
@tab @tab
Yes, see @ref{The other window}.
@item @tab @tab
@item
Can i increase the allowed depth of nested submenus.
@tab @tab
Yes, see the docstring of the option
@code{ecb-directories-menu-user-extension}.
@item @tab @tab
@item
Can i apply some filters to the Tree-buffers.
@tab @tab
Yes, see @ref{Filtering the tree-buffers}
@item @tab @tab
@item
With XEmacs i get sometimes an error ``Wrong number of arguments:
widen (1)''. What can i do?
@tab @tab
Disable the func-menu support in your XEmacs-setup. See
@ref{Conflicts}.
@item @tab @tab
@item
Can i use desktop.el in combination with ECB?
@tab @tab
Yes, see @ref{Conflicts}.
@item @tab @tab
@item
Opening directories takes a long time - what can i do?
@tab @tab
Read @ref{Large directories}.
@item @tab @tab
@item
ECB seems to be blocked sometimes - what is the reason?
@tab @tab
ECB performs some stealthy tasks when idle - this can cause sometimes
a blocked Emacs but this tasks will be immetiatelly interrupted by any
user-event so there should be normally no problems. But especially for
mounted net-drives some of the stealthy tasks can take time up to some
seconds for each file - and during one file-operation it can not be
interrupted. See also @code{ecb-stealthy-tasks-delay}.
@item @tab @tab
@item
Can i exclude certain directories from being checked for emptyness?
@tab @tab
Yes, see option @code{ecb-prescan-directories-exclude-regexps}.
@item @tab @tab
@item
Can i exclude certain directories from checking the VC-state of the
contained sources?
@tab @tab
Yes, see option @code{ecb-vc-directory-exclude-regexps}.
@item @tab @tab
@item
Can i exclude certain directories from checking the read-only-state of
the contained sources?
@tab @tab
Yes, see option @code{ecb-read-only-check-exclude-regexps}.
@item @tab @tab
@item
ECB ignores the remote-paths i have added to @code{ecb-source-path}.
@tab @tab
Maybe you have to check the option @code{ecb-ping-options}. Ensure
that this option contains a value suitable for your ping-program (see
@code{ecb-ping-program}).
@ifinfo
@*
@end ifinfo
See also @ref{Remote directories}.
@item @tab @tab
@item
ECB seems to be blocked a long time.
@tab @tab
Maybe you use cygwin-XEmacs. Then either the empty-dir-check (see
option @code{ecb-prescan-directories-for-emptyness}) or the VC-support
(see @code{ecb-vc-enable-support}) can block ECB.
@ifinfo
@*
@end ifinfo
For the latter one see @ref{Known VC-problems}.
@item @tab @tab
@item
ECB seems to be blocked during the VC-state update in the
tree-windows.
@tab @tab
Maybe the root repository for the current directory is a
remote-repository. This can result in a long lasting check-time per
file.
@ifinfo
@*
@end ifinfo
See also @ref{Version-control support} for hints what you can do.
@item @tab @tab
@item
I have encountered some problems with the display of the VC-state in
the tree-buffers.
@tab @tab
See also @ref{Version-control support} for hints what you can do.
@item @tab @tab
@item
I get errors when trying to download new ECB with
@code{ecb-download-ecb}.
@tab @tab
Ensure that the ECB-configuration of these tools is correct for your
system (see @code{ecb-wget-setup}, @code{ecb-gzip-setup} and
@code{ecb-tar-setup}).
@end multitable
@node Command Index, Option Index, FAQ, Top
@unnumbered Command Index
@noindent
This index contains all user commands of ECB.
@strong{Please note}: The commands in this index are listed without
the prefix ``ecb-'' (e.g. the command @code{ecb-activate} is listed
with name ``activate'').
@printindex fn
@node Option Index, Concept Index, Command Index, Top
@unnumbered Option Index
@noindent
This index contains all customizable options of ECB.
@strong{Please note}: All options in this index are listed without the
prefix ``ecb-'' (e.g. the option @code{ecb-layout-name} is listed with
name ``layout-name'').
@printindex vr
@node Concept Index, , Option Index, Top
@unnumbered Concept Index
@printindex cp
@contents
@bye
@c LocalWords: texinfo Berndl java ECB ecb texi berndl Exp setfilename vr cp
@c LocalWords: settitle syncodeindex fn ifinfo paragraphindent exampleindent
@c LocalWords: footnotestyle frobbed ecbver dircategory direntry titlepage sp
@c LocalWords: titlefont vskip pt Jesper Nordenberg dir ifnottex Elisp imenu
@c LocalWords: etags perl iftex ref tex url ifhtml uref detailmenu eshell API
@c LocalWords: keybindings speedbar Grepping JDEE website eieio xref subdirs
@c LocalWords: loadtime autoloads Bytecompiling bytecompile EMACSINFOPATH hxx
@c LocalWords: pxref alist multitable columnfractions ifnotinfo hh HH cxx cpp
@c LocalWords: CC jde setq RET kbd Alt minibuffer cindex dfn grep ascii popup
@c LocalWords: screenshot splitted sourcecode noindent de itemx rsp CTRL hor
@c LocalWords: senseful modeline subnode uml const gm Ctrl docstring autom lc
@c LocalWords: subsubsection fontify defun asis Hist leftright lr nav dired
@c LocalWords: deffn var CLEARALL cedet sourcepath classpath arg html regexp
@c LocalWords: backtrace def incl defopt cdr keysequence SPC DEL LFD ESC NUL
@c LocalWords: alt abc horiz filenumber rexexp bigdir iff cvsignore lib ini
@c LocalWords: elc obj dll rexexps assoc taglist bovinate toplevel oo CLOS
@c LocalWords: defclass colorized XYZ XYC structs colorizing struct enum adv
@c LocalWords: func comint proc min subdir wget gzip cygwin ifnothtml env iso
@c LocalWords: http defcustom upgradable defconst lw doc ls grepping tempor
@c LocalWords: igrep CVS gen maxout FF hs hideshow JDEbug defmac ver undefine
@c LocalWords: Bufferinfo rw bufferinfo readonly filebuffer filebuffers pos
@c LocalWords: cond buf preactivation usw msw lsw asynch XP Newsreader BBDB
@c LocalWords: VC vc logbuf BNF Intellisense IDEs semanticdb printindex
|