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
|
\input texinfo.tex @c -*- mode: texinfo; coding: iso-2022-8 -*-
@c %**start of header
@documentencoding ISO-8859-1
@setfilename ../info/xemacs-faq.info
@settitle Frequently asked questions about XEmacs
@setchapternewpage off
@c %**end of header
@finalout
@titlepage
@title XEmacs FAQ
@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2006/07/01 05:19:48 $
@sp 1
@author Ben Wing <ben@@xemacs.org>
@author Tony Rossini <rossini@@u.washington.edu>
@author Chuck Thompson <cthomp@@xemacs.org>
@author Steve Baur <steve@@xemacs.org>
@author Andreas Kaempf <andreas@@sccon.com>
@author Christian Nyb@o{} <chr@@mediascience.no>
@author Sandra Wambold <wambold@@xemacs.org>
@page
@end titlepage
@ifinfo
@dircategory XEmacs Editor
@direntry
* FAQ: (xemacs-faq). XEmacs FAQ.
@end direntry
@end ifinfo
@ignore
*****************************************
***** To update the menus and nodes *****
*****************************************
First, the first argument to @node (the name itself) needs to be correct.
Use a macro if necessary to update the @node names from the
@unnumberedsubsec commands. Also note that the command we're about to
run will not correctly fix up the part of the menu to the right of a ::.
It will leave existing text in place but not change anything. If you
make a lot of changes and want to update this semi-automatically, use
M-x occur to pick out all @unnumberedsubsec lines then do some editing
magic to coerce them into the right format and cut and paste as necessary:
1. M-x occur @unnumberedsubsec
2. <select a rectangle including all text before the Q#.#.#>
3. C-x r t *<space>
4. go to the top and use the following macro to get the indentation right.
(setq last-kbd-macro (read-kbd-macro
"C-s : RET : <right> M-x indent- to- column RET 14 RET <home> <down>"))
5. Cut and paste the menus into the detailmenu at the top and
individual menus at the top of the appropriate chapters. (#### I
wonder, does texinfo-master-menu generate the detailmenu from the
individual menus or vice-versa or neither?)
Then,
6. C-u C-c C-u m (C-u M-x texinfo-master-menu) will update the menus
and nodes. However, it appears that even though it tries to
preserve the existing menu structure as much as possible, it
doesn't do a perfect job. It messes up in at least two ways: The
indentation in the part of the main menu above the detailmenu will
be screwed up, and the #.0 titles will be removed from both the
detailmenu and the individual chapter menus. In addition,
sometimes random things get screwed up in individual parts of the
menus. Therefore:
1. Use the Lisp line below to get the spacing correct for the Q#.#.#
menu entries.
(set (make-local-variable 'texinfo-column-for-description) 14)
2. Copy the whole detailmenu beforehand.
3. Run C-u C-c C-u m to fix up the nodes.
4. Run `fix-main-menu' and `fix-omitted-menu-lines'.
5. Check the new detailmenu carefully to see if anything is screwed up
compared to the old detailmenu you copied.
6. If so, paste back the appropriate sections and fix up the corresponding
part of the chapter-specific menu.
(defun fix-main-menu ()
(interactive)
(save-restriction
(let (p q)
(goto-char (point-min))
(re-search-forward "^@menu")
(setq p (match-beginning 0))
(re-search-forward "^$")
(setq q (match-end 0))
(narrow-to-region p q)
(goto-char p)
(while (search-forward ":: " nil t)
(indent-to-column 26)))))
(defun fix-omitted-menu-lines ()
(interactive)
(save-excursion
(loop for x from 1 to 10 do
(goto-char (point-min))
(re-search-forward (format "@unnumberedsec \\(%d.0: .*\\)" x))
(let ((line (match-string 1)))
(re-search-backward "^@menu")
(forward-line 1)
(unless (looking-at "[0-9]+.0:")
(insert line)
(insert "\n"))
(goto-char (point-min))
(re-search-forward "^@menu")
(search-forward (format "Q%d.0.1:" x))
(forward-line -1)
(unless (looking-at "[0-9]+.0:")
(insert "\n")
(insert line))))))
*****************************************
***** Other work *****
*****************************************
When you've rearranged and renumbered a bunch of nodes, you can get
the numbers agreeing again. The macro below assumes that the
unnumberedsubsec number is correct, and fixes up the node to agree.
Only the first part of the node is fixed and the other parts may still
be wrong; but they will be fixed as part of
@code{texinfo-master-menu}.
(setq last-kbd-macro (read-kbd-macro
"<f1> unnumberedsubsec SPC RET C-s : RET <left> C-x C-x <f3> <home> <up> <C-right> <right> C-s , RET <left> C-x C-x <f4> <home> 2*<down>"))
@end ignore
@node Top, Introduction, (dir), (dir)
@top XEmacs FAQ
This is the guide to the XEmacs Frequently Asked Questions list---a
compendium of questions and answers pertaining to one of the finest
programs ever written. XEmacs is much more than just a Text Editor.
This FAQ is freely redistributable. This FAQ is distributed in the hope
that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you have a Web browser, the official hypertext version is at
@iftex
@*
@end iftex
@uref{http://www.xemacs.org/FAQ/xemacs-faq.html}
@ifset CANONICAL
@html
This document is available in several different formats:
@itemize @bullet
@item
@uref{xemacs-faq.txt, As a single ASCII file}, produced by
@code{makeinfo --no-headers}
@item
@uref{xemacs-faq.dvi, As a .dvi file}, as used with
@uref{http://www.tug.org, TeX.}
@item
As a PostScript file @uref{xemacs-faq-a4.ps, in A4 format},
as well as in @uref{xemacs-faq-letter.ps, letter format}
@item
In html format, @uref{xemacs-faq_1.html, split by chapter}, or in
@uref{xemacs-faq.html, one monolithic} document.
@item
The canonical version of the FAQ is the texinfo document
@uref{xemacs-faq.texi, man/xemacs-faq.texi}.
@item
If you do not have makeinfo installed, you may @uref{xemacs-faq.info,
download the faq} in info format, and install it in @file{<XEmacs
library directory>/info/}. For example in
@file{/usr/local/lib/xemacs-21.4/info/}.
@end itemize
@end html
@end ifset
@c end ifset points to CANONICAL
@menu
* Introduction:: Introduction, Policy, Credits.
* Installation:: Installation and Troubleshooting.
* Editing:: Editing Functions.
* Display:: Display Functions.
* External Subsystems:: Interfacing with the OS and External Devices.
* Internet:: Connecting to the Internet.
* Advanced:: Advanced Customization Using XEmacs Lisp.
* Other Packages:: Other External Packages.
* Current Events:: What the Future Holds.
* Legacy Versions:: New information about old XEmacsen.
@detailmenu
--- The Detailed Node Listing ---
1 Introduction, Policy, Credits
1.0: What is XEmacs?
* Q1.0.1:: What is XEmacs?
* Q1.0.2:: What is the current version of XEmacs?
* Q1.0.3:: How do you pronounce XEmacs?
* Q1.0.4:: What does XEmacs look like?
* Q1.0.5:: Who wrote XEmacs?
* Q1.0.6:: Who wrote the FAQ?
1.1: Getting XEmacs
* Q1.1.1:: Where can I find XEmacs?
* Q1.1.2:: Are binaries available?
* Q1.1.3:: How do I get the bleeding-edge sources?
* Q1.1.4:: Where can I obtain a printed copy of the XEmacs User's Manual?
1.2: Versions for Different Operating Systems
* Q1.2.1:: Do I need X11 to run XEmacs?
* Q1.2.2:: What versions of Unix does XEmacs run on?
* Q1.2.3:: Is there a port of XEmacs to Microsoft Windows?
* Q1.2.4:: Can I build XEmacs on MS Windows with X support? Do I need to?
* Q1.2.5:: What are Cygwin and MinGW, and do I need them to run XEmacs?
* Q1.2.6:: What are the differences between the various MS Windows emacsen?
* Q1.2.7:: How does the port cope with differences in the Windows user interface?
* Q1.2.8:: Is there a port of XEmacs to the Macintosh?
* Q1.2.9:: Is there a port of XEmacs to MS-DOS?
* Q1.2.10:: Is there a port of XEmacs to OS/2?
* Q1.2.11:: Is there a port of XEmacs to NextStep?
* Q1.2.12:: Is there a port of XEmacs to VMS?
1.3: Getting Started
* Q1.3.1:: What is an @file{init.el} or @file{.emacs} and is there a sample one?
* Q1.3.2:: Where do I put my @file{init.el} file?
* Q1.3.3:: Can I use the same @file{init.el} with the other Emacs?
* Q1.3.4:: Any good XEmacs tutorials around?
* Q1.3.5:: May I see an example of a useful XEmacs Lisp function?
* Q1.3.6:: And how do I bind it to a key?
* Q1.3.7:: What's the difference between a macro and a function?
* Q1.3.8:: What is @code{Custom}?
1.4: Getting Help
* Q1.4.1:: Where can I get help?
* Q1.4.2:: Which mailing lists are there?
* Q1.4.3:: Where are the mailing lists archived?
* Q1.4.4:: How can I get two instances of info?
* Q1.4.5:: How do I add new Info directories?
1.5: Contributing to XEmacs
* Q1.5.1:: How do I submit changes to the FAQ?
* Q1.5.2:: How do I become a beta tester?
* Q1.5.3:: How do I contribute to XEmacs itself?
* Q1.5.4:: How do I get started developing XEmacs?
* Q1.5.5:: What's the basic layout of the code?
1.6: Politics (XEmacs vs. GNU Emacs)
* Q1.6.1:: What is GNU Emacs?
* Q1.6.2:: How does XEmacs differ from GNU Emacs?
* Q1.6.3:: How much does XEmacs differ?
* Q1.6.4:: Is XEmacs "GNU"?
* Q1.6.5:: What is the correct way to refer to XEmacs and GNU Emacs?
* Q1.6.6:: Why haven't XEmacs and GNU Emacs merged?
1.7: External Packages
* Q1.7.1:: What is the package system?
* Q1.7.2:: Which external packages are there?
* Q1.7.3:: Do I need to have the packages to run XEmacs?
* Q1.7.4:: Is there a way to find which package has particular functionality?
1.8: Internationalization
* Q1.8.1:: What is the status of internationalization support aka MULE (including Asian language support)?
* Q1.8.2:: How can I help with internationalization?
* Q1.8.3:: How do I type non-ASCII characters?
* Q1.8.4:: Can XEmacs messages come out in a different language?
* Q1.8.5:: Please explain the various input methods in MULE/XEmacs
* Q1.8.6:: How do I portably code for MULE/XEmacs?
* Q1.8.7:: How about Cyrillic modes?
* Q1.8.8:: Does XEmacs support Unicode?
* Q1.8.9:: How does XEmacs display Unicode?
2 Installation and Troubleshooting
2.0: Installation (General)
* Q2.0.1:: How do I build and install XEmacs?
* Q2.0.2:: Where do I find external libraries?
* Q2.0.3:: How do I specify the paths that XEmacs uses for finding files?
* Q2.0.4:: Running XEmacs without installing
* Q2.0.5:: XEmacs is too big
2.1: Package Installation
* Q2.1.1:: How do I install the packages?
* Q2.1.2:: Can I install the packages individually?
* Q2.1.3:: Can I install the packages automatically?
* Q2.1.4:: Can I upgrade or remove packages?
* Q2.1.5:: Which packages to install?
* Q2.1.6:: Can you describe the package location process in more detail?
* Q2.1.7:: EFS fails with "500 AUTH not understood"
2.2: Unix/Mac OS X Installation (Also Relevant to Cygwin, MinGW)
* Q2.2.1:: Libraries in non-standard locations
* Q2.2.2:: Why can't I strip XEmacs?
* Q2.2.3:: X11/bitmaps/gray (or other X11-related file) not found.
2.3: Windows Installation (Windows, Cygwin, MinGW)
* Q2.3.1:: What exactly are all the different ways to build XEmacs under Windows?
* Q2.3.2:: What compiler/libraries do I need to compile XEmacs?
* Q2.3.3:: How do I compile the native port?
* Q2.3.4:: What do I need for Cygwin?
* Q2.3.5:: How do I compile under Cygwin?
* Q2.3.6:: How do I compile using MinGW (aka @samp{the -mno-cygwin flag to gcc})?
* Q2.3.7:: How do I compile with X support?
* Q2.3.8:: Cygwin XEmacs won't start -- cygXpm-noX4.dll was not found (NEW)
2.4: General Troubleshooting
* Q2.4.1:: How do I deal with bugs or with problems building, installing, or running?
* Q2.4.2:: Help! XEmacs just crashed on me!
* Q2.4.3:: XEmacs crashes and I compiled it myself.
* Q2.4.4:: How to debug an XEmacs problem with a debugger
* Q2.4.5:: I get a cryptic error message when trying to do something.
* Q2.4.6:: XEmacs hangs when I try to do something.
* Q2.4.7:: I get an error message when XEmacs is running in batch mode.
* Q2.4.8:: The keyboard or mouse is not working properly, or I have some other event-related problem.
* Q2.4.9:: @kbd{C-g} doesn't work for me. Is it broken?
* Q2.4.10:: How do I debug process-related problems?
* Q2.4.11:: XEmacs is outputting lots of X errors.
* Q2.4.12:: After upgrading, XEmacs won't do `foo' any more!
2.5: Startup-Related Problems
* Q2.5.1:: XEmacs cannot connect to my X Terminal!
* Q2.5.2:: Startup problems related to paths or package locations.
* Q2.5.3:: XEmacs won't start without network.
* Q2.5.4:: Startup warnings about deducing proper fonts?
* Q2.5.5:: Warnings from incorrect key modifiers.
* Q2.5.6:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed?
* Q2.5.7:: XEmacs issues messages about ``auto-autoloads already loaded.''
3 Editing Functions
3.0: The Keyboard
* Q3.0.1:: How can I customize the keyboard?
* Q3.0.2:: How can I bind complex functions (or macros) to keys?
* Q3.0.3:: How do I bind C-. and C-; to scroll one line up and down?
* Q3.0.4:: Globally binding @kbd{Delete}?
* Q3.0.5:: How to map @kbd{Help} key alone on Sun type4 keyboard?
* Q3.0.6:: How can you type in special characters in XEmacs?
* Q3.0.7:: Can I turn on @dfn{sticky} modifier keys?
* Q3.0.8:: How do I map the arrow keys?
* Q3.0.9:: HP Alt key as Meta.
* Q3.0.10:: Why does edt emulation not work?
* Q3.0.11:: How can I emulate VI and use it as my default mode?
3.1: The Mouse
* Q3.1.1:: How can I turn off Mouse pasting?
* Q3.1.2:: How do I set control/meta/etc modifiers on mouse buttons?
* Q3.1.3:: Clicking the left button does not do anything in buffer list.
* Q3.1.4:: How can I get a list of buffers when I hit mouse button 3?
* Q3.1.5:: How can I set XEmacs up so that it pastes where the text cursor is?
3.2: Buffers, Text Editing
* Q3.2.1:: Can I have the end of the buffer delimited in some way?
* Q3.2.2:: How do I insert today's date into a buffer?
* Q3.2.3:: How do I get a single minibuffer frame?
* Q3.2.4:: How can I enable auto-indent and/or Filladapt?
* Q3.2.5:: How can I get XEmacs to come up in text/auto-fill mode by default?
3.3: Text Selections
* Q3.3.1:: How do I select a rectangular region?
* Q3.3.2:: How can I turn off or change highlighted selections?
* Q3.3.3:: How do I cause typing on an active region to remove it?
* Q3.3.4:: Can I turn off the highlight during isearch?
* Q3.3.5:: Why is killing so slow?
* Q3.3.6:: Why does @kbd{M-w} take so long?
3.4: Editing Source Code
* Q3.4.1:: I do not like cc-mode. How do I use the old c-mode?
* Q3.4.2:: How do you make XEmacs indent CL if-clauses correctly?
4 Display Functions
4.0: Textual Fonts and Colors
* Q4.0.1:: How do I specify a font?
* Q4.0.2:: How do I set the text, menu and modeline fonts?
* Q4.0.3:: How can I set color options from @file{init.el}?
* Q4.0.4:: How can I set the colors when highlighting a region?
* Q4.0.5:: How can I limit color map usage?
* Q4.0.6:: My tty supports color, but XEmacs doesn't use them.
* Q4.0.7:: Can I have pixmap backgrounds in XEmacs?
* Q4.0.8:: How do I display non-ASCII characters?
* Q4.0.9:: Font selections in don't get saved after @code{Save Options}.
4.1: Syntax Highlighting (Font Lock)
* Q4.1.1:: How can I do source code highlighting using font-lock?
* Q4.1.2:: How do I get @samp{More} Syntax Highlighting on by default?
4.2: The Modeline
* Q4.2.1:: How can I make the modeline go away?
* Q4.2.2:: How do you have XEmacs display the line number in the modeline?
* Q4.2.3:: How do I get XEmacs to put the time of day on the modeline?
* Q4.2.4:: How can I change the modeline color based on the mode used?
4.3: The Cursor
* Q4.3.1:: Is there a way to make the bar cursor thicker?
* Q4.3.2:: Is there a way to get back the block cursor?
* Q4.3.3:: Can I make the cursor blink?
4.4: The Menubar
* Q4.4.1:: How do I get rid of the menubar?
* Q4.4.2:: How can I customize the menubar?
* Q4.4.3:: How do I enable use of the keyboard (@kbd{Alt}) to access menu items?
* Q4.4.4:: How do I control how many buffers are listed in the menu @code{Buffers List}?
* Q4.4.5:: Resources like @code{Emacs*menubar*font} are not working?
4.5: The Toolbar
* Q4.5.1:: How do I get rid of the toolbar?
* Q4.5.2:: How can I customize the toolbar?
* Q4.5.3:: How can I bind a key to a function to toggle the toolbar?
* Q4.5.4:: @samp{Can't instantiate image error...} in toolbar
4.6: Scrollbars and Scrolling
* Q4.6.1:: How can I disable the scrollbar?
* Q4.6.2:: How can I change the scrollbar width?
* Q4.6.3:: How can I use resources to change scrollbar colors?
* Q4.6.4:: Moving the scrollbar can move the point; can I disable this?
* Q4.6.5:: Scrolling one line at a time.
* Q4.6.6:: How can I turn off automatic horizontal scrolling in specific modes?
* Q4.6.7:: I find auto-show-mode disconcerting. How do I turn it off?
4.7: The Gutter Tabs, The Progress Bar, Widgets
* Q4.7.1:: How can I disable the gutter tabs?
* Q4.7.2:: How can I disable the progress bar?
* Q4.7.3:: There are bugs in the gutter or widgets.
* Q4.7.4:: How can I customize the gutter or gutter tabs?
5 Interfacing with the Operating System and External Devices
5.0: X Window System and Resources
* Q5.0.1:: Where is a list of X resources?
* Q5.0.2:: How can I detect a color display?
* Q5.0.3:: How can I get the icon to just say @samp{XEmacs}?
* Q5.0.4:: How can I have the window title area display the full path?
* Q5.0.5:: @samp{xemacs -name junk} doesn't work?
* Q5.0.6:: @samp{-iconic} doesn't work.
5.1: Microsoft Windows
* Q5.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}?
* Q5.1.2:: How do I get Windows Explorer to associate a file type with XEmacs?
5.2: Printing
* Q5.2.1:: What do I need to change to make printing work?
* Q5.2.2:: How can I print WYSIWYG a font-locked buffer?
* Q5.2.3:: Getting @kbd{M-x lpr} to work with postscript printer.
* Q5.2.4:: Can you print under MS Windows?
5.3: Sound
* Q5.3.1:: How do I turn off the sound?
* Q5.3.2:: How do I get funky sounds instead of a boring beep?
* Q5.3.3:: What are NAS and ESD (EsounD)?
* Q5.3.4:: Sunsite sounds don't play.
5.4: Running an Interior Shell, Invoking Subprocesses
* Q5.4.1:: What is an interior shell?
* Q5.4.2:: How do I start up a second shell buffer?
* Q5.4.3:: Telnet from shell filters too much
* Q5.4.4:: Strange things are happening in Shell Mode.
* Q5.4.5:: XEmacs complains "No such file or directory, diff"
* Q5.4.6:: Cygwin error "fork_copy: linked dll/bss pass 0 failed"
5.5: Multiple Device Support
* Q5.5.1:: How do I open a frame on another screen of my multi-headed display?
* Q5.5.2:: Can I really connect to a running XEmacs after calling up over a modem? How?
* Q5.5.3:: How do I disable gnuserv from opening a new frame?
* Q5.5.4:: How do I start gnuserv so that each subsequent XEmacs is a client?
* Q5.5.5:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
6 Connecting to the Internet
6.0: General Mail and News
* Q6.0.1:: What are the various packages for reading mail?
* Q6.0.2:: How can I send mail?
* Q6.0.3:: How do I get my outgoing mail archived?
* Q6.0.4:: How can I read and/or compose MIME messages?
* Q6.0.5:: How do I customize the From line?
* Q6.0.6:: How do I get my MUA to filter mail for me?
* Q6.0.7:: Remote mail reading with an MUA.
* Q6.0.8:: An MUA gets an error incorporating new mail.
* Q6.0.9:: Why isn't @file{movemail} working?
* Q6.0.10:: How do I make my MUA display graphical smilies?
* Q6.0.11:: How can I get those oh-so-neat X-Face lines?
6.1: Reading Mail with VM
* Q6.1.1:: How do I set up VM to retrieve mail from a remote site using POP?
* Q6.1.2:: How can I get VM to automatically check for new mail?
* Q6.1.3:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
* Q6.1.4:: Is there a mailing list or FAQ for VM?
* Q6.1.5:: How do I make VM stay in a single frame?
* Q6.1.6:: Customization of VM not covered in the manual, or here.
6.2: Reading Netnews and Mail with Gnus
* Q6.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!
* Q6.2.2:: How do I make Gnus stay within a single frame?
6.3: FTP Access
* Q6.3.1:: Can I edit files on other hosts?
* Q6.3.2:: What is EFS?
6.4: Web Browsing with W3
* Q6.4.1:: What is W3?
* Q6.4.2:: How do I run W3 from behind a firewall?
* Q6.4.3:: Is it true that W3 supports style sheets and tables?
7 Advanced Customization Using XEmacs Lisp
7.0: Emacs Lisp and @file{init.el}
* Q7.0.1:: What version of Emacs am I running?
* Q7.0.2:: How can I evaluate Emacs-Lisp expressions?
* Q7.0.3:: @code{(setq tab-width 6)} behaves oddly.
* Q7.0.4:: How can I add directories to the @code{load-path}?
* Q7.0.5:: How to check if a lisp function is defined?
* Q7.0.6:: Can I force the output of @code{(face-list)} to a buffer?
7.1: Emacs Lisp Programming Techniques
* Q7.1.1:: What is the difference in key sequences between XEmacs and GNU Emacs?
* Q7.1.2:: Can I generate "fake" keyboard events?
* Q7.1.3:: Could you explain @code{read-kbd-macro} in more detail?
* Q7.1.4:: What is the performance hit of @code{let}?
* Q7.1.5:: What is the recommended use of @code{setq}?
* Q7.1.6:: What is the typical misuse of @code{setq}?
* Q7.1.7:: I like the @code{do} form of cl, does it slow things down?
* Q7.1.8:: I like recursion, does it slow things down?
* Q7.1.9:: How do I put a glyph as annotation in a buffer?
* Q7.1.10:: @code{map-extents} won't traverse all of my extents!
* Q7.1.11:: My elisp program is horribly slow. Is there an easy way to find out where it spends time?
7.2: Mathematics
* Q7.2.1:: What are bignums, ratios, and bigfloats in Lisp?
* Q7.2.2:: XEmacs segfaults when I use very big numbers!
* Q7.2.3:: Bignums are really slow!
* Q7.2.4:: Equal bignums don't compare as equal! What gives?
8 Other External Packages
8.0: TeX
* Q8.0.1:: Is there something better than LaTeX mode?
* Q8.0.2:: What is AUCTeX? Where do you get it?
* Q8.0.3:: Problems installing AUCTeX.
* Q8.0.4:: How do I turn off current chapter from AUCTeX modeline?
8.1: Other Unbundled Packages
* Q8.1.1:: Is there a reason for an Emacs package not to be included in XEmacs?
* Q8.1.2:: Are there any Emacs Lisp Spreadsheets?
* Q8.1.3:: Is there a MatLab mode?
8.2: Environments Built Around XEmacs
* Q8.2.1:: What are SPARCworks, EOS, and WorkShop?
* Q8.2.2:: How do I start the Sun Workshop support in XEmacs 21?
* Q8.2.3:: What is/was Energize?
* Q8.2.4:: What is Infodock?
9 What the Future Holds
9.0: Changes
* Q9.0.1:: What new features will be in XEmacs soon?
* Q9.0.2:: What's new in XEmacs 21.4?
* Q9.0.3:: What's new in XEmacs 21.1?
* Q9.0.4:: What's new in XEmacs 20.4?
* Q9.0.5:: What's new in XEmacs 20.3?
* Q9.0.6:: What's new in XEmacs 20.2?
10 New information about old XEmacsen
10.0: XEmacs 21.1
* Q10.0.1:: Gnus 5.10 won't display smileys in XEmacs 21.1.
* Q10.0.2:: XEmacs won't start on Windows in XEmacs 21.1.
@end detailmenu
@end menu
@node Introduction, Installation, Top, Top
@unnumbered 1 Introduction, Policy, Credits
Learning XEmacs is a lifelong activity. Even people who have used Emacs
for years keep discovering new features. Therefore this document cannot
be complete. Instead it is aimed at the person who is either
considering XEmacs for their own use, or has just obtained it and is
wondering what to do next. It is also useful as a reference to
available resources.
The previous maintainer of the FAQ was
@email{rossini@@biostat.washington.edu, Anthony Rossini}, who started
it, after getting tired of hearing JWZ complain about repeatedly
having to answer questions. @email{ben@@xemacs.org, Ben Wing} then
took over and did a massive update reorganizing the whole thing. At
this point Anthony took back over, but then had to give it up again.
Some of the other contributors to this FAQ are listed later in this
document.
The previous version was converted to hypertext format, and edited by
@email{steve@@xemacs.org, Steven L. Baur}. It was converted back to
texinfo by @email{hniksic@@xemacs.org, Hrvoje Niksic}. The FAQ was then
maintained by @email{andreas@@sccon.com, Andreas Kaempf}, who passed it
on to ChristianNyb@o{}, and then to @email{wambold@@xemacs.org,Sandra Wambold}.
The current version of the FAQ has been heavily redone by
@email{ben@@xemacs.org, Ben Wing}.
If you notice any errors or items which should be added or amended to
this FAQ please send email to @email{xemacs-beta@@xemacs.org}.
Include @samp{XEmacs FAQ} on the Subject: line.
@menu
1.0: What is XEmacs?
* Q1.0.1:: What is XEmacs?
* Q1.0.2:: What is the current version of XEmacs?
* Q1.0.3:: How do you pronounce XEmacs?
* Q1.0.4:: What does XEmacs look like?
* Q1.0.5:: Who wrote XEmacs?
* Q1.0.6:: Who wrote the FAQ?
1.1: Getting XEmacs
* Q1.1.1:: Where can I find XEmacs?
* Q1.1.2:: Are binaries available?
* Q1.1.3:: How do I get the bleeding-edge sources?
* Q1.1.4:: Where can I obtain a printed copy of the XEmacs User's Manual?
1.2: Versions for Different Operating Systems
* Q1.2.1:: Do I need X11 to run XEmacs?
* Q1.2.2:: What versions of Unix does XEmacs run on?
* Q1.2.3:: Is there a port of XEmacs to Microsoft Windows?
* Q1.2.4:: Can I build XEmacs on MS Windows with X support? Do I need to?
* Q1.2.5:: What are Cygwin and MinGW, and do I need them to run XEmacs?
* Q1.2.6:: What are the differences between the various MS Windows emacsen?
* Q1.2.7:: How does the port cope with differences in the Windows user interface?
* Q1.2.8:: Is there a port of XEmacs to the Macintosh?
* Q1.2.9:: Is there a port of XEmacs to MS-DOS?
* Q1.2.10:: Is there a port of XEmacs to OS/2?
* Q1.2.11:: Is there a port of XEmacs to NextStep?
* Q1.2.12:: Is there a port of XEmacs to VMS?
1.3: Getting Started
* Q1.3.1:: What is an @file{init.el} or @file{.emacs} and is there a sample one?
* Q1.3.2:: Where do I put my @file{init.el} file?
* Q1.3.3:: Can I use the same @file{init.el} with the other Emacs?
* Q1.3.4:: Any good XEmacs tutorials around?
* Q1.3.5:: May I see an example of a useful XEmacs Lisp function?
* Q1.3.6:: And how do I bind it to a key?
* Q1.3.7:: What's the difference between a macro and a function?
* Q1.3.8:: What is @code{Custom}?
1.4: Getting Help
* Q1.4.1:: Where can I get help?
* Q1.4.2:: Which mailing lists are there?
* Q1.4.3:: Where are the mailing lists archived?
* Q1.4.4:: How can I get two instances of info?
* Q1.4.5:: How do I add new Info directories?
1.5: Contributing to XEmacs
* Q1.5.1:: How do I submit changes to the FAQ?
* Q1.5.2:: How do I become a beta tester?
* Q1.5.3:: How do I contribute to XEmacs itself?
* Q1.5.4:: How do I get started developing XEmacs?
* Q1.5.5:: What's the basic layout of the code?
1.6: Politics (XEmacs vs. GNU Emacs)
* Q1.6.1:: What is GNU Emacs?
* Q1.6.2:: How does XEmacs differ from GNU Emacs?
* Q1.6.3:: How much does XEmacs differ?
* Q1.6.4:: Is XEmacs "GNU"?
* Q1.6.5:: What is the correct way to refer to XEmacs and GNU Emacs?
* Q1.6.6:: Why haven't XEmacs and GNU Emacs merged?
1.7: External Packages
* Q1.7.1:: What is the package system?
* Q1.7.2:: Which external packages are there?
* Q1.7.3:: Do I need to have the packages to run XEmacs?
* Q1.7.4:: Is there a way to find which package has particular functionality?
1.8: Internationalization
* Q1.8.1:: What is the status of internationalization support aka MULE (including Asian language support)?
* Q1.8.2:: How can I help with internationalization?
* Q1.8.3:: How do I type non-ASCII characters?
* Q1.8.4:: Can XEmacs messages come out in a different language?
* Q1.8.5:: Please explain the various input methods in MULE/XEmacs
* Q1.8.6:: How do I portably code for MULE/XEmacs?
* Q1.8.7:: How about Cyrillic modes?
* Q1.8.8:: Does XEmacs support Unicode?
* Q1.8.9:: How does XEmacs display Unicode?
@end menu
@unnumberedsec 1.0: What is XEmacs?
@node Q1.0.1, Q1.0.2, Introduction, Introduction
@unnumberedsubsec Q1.0.1: What is XEmacs?
XEmacs is a powerful, highly customizable open source text editor and
application development system, with full GUI support. It is
protected under the GNU Public License and related to other versions
of Emacs, in particular GNU Emacs. Its emphasis is on modern
graphical user interface support and an open software development
model, similar to Linux. XEmacs has an active development community
numbering in the hundreds (and thousands of active beta testers on top
of this), and runs on all versions of MS Windows, on Mac OS X, on
Linux, and on nearly every other version of Unix in existence.
Support for XEmacs has been supplied by Sun Microsystems, University
of Illinois, Lucid, ETL/Electrotechnical Laboratory, Amdahl
Corporation, BeOpen, and others, as well as the unpaid time of a great
number of individual developers.
@node Q1.0.2, Q1.0.3, Q1.0.1, Introduction
@unnumberedsubsec Q1.0.2: What is the current version of XEmacs?
XEmacs versions 21.4.* are releases made from the current stable
sources. XEmacs versions 21.5.* (which will be released as 22.0) are
releases made from the development sources. Check at
@uref{http://www.xemacs.org} for the current minor version. XEmacs
versions 21.1.* were the previous stable releases, now retired.
XEmacs 20.4, released in February 1998, was the last release of v20.
XEmacs 19.16, released in November, 1997. was the last release of v19,
and was also the last version without international language support.
@node Q1.0.3, Q1.0.4, Q1.0.2, Introduction
@unnumberedsubsec Q1.0.3: How do you pronounce XEmacs?
The most common pronounciation is @samp{Eks eemax}.
@node Q1.0.4, Q1.0.5, Q1.0.3, Introduction
@unnumberedsubsec Q1.0.4: What does XEmacs look like?
Screen snapshots are available at
@uref{http://www.xemacs.org/About/Screenshots/index.html}
as part of the XEmacs website.
@node Q1.0.5, Q1.0.6, Q1.0.4, Introduction
@unnumberedsubsec Q1.0.5: Who wrote XEmacs?
XEmacs is the result of the time and effort of many people, and the
active developers have changed over time. There are two major
components of the XEmacs effort -- writing the code itself and providing
all the support work (testing the code, releasing beta and final
versions, handling patches, reading bug reports, maintaining the web
site, managing the mailing lists, etc. etc.). Neither component would
work without the other.
@subheading CODING
The primary code contributor over the years has been Ben Wing (active
since late 1992). Between 1991 and 1995, large amounts of coding was
contributed by Jamie Zawinski and Chuck Thompson. Many other people
have authored major subsystems or otherwise contributed large amounts of
code, including Andy Piper, Hrvoje Niksic, Jerry James, Jonathan Harris,
Kyle Jones, Martin Buchholz, Michael Sperber, Olivier Galibert, Richard
Mlynarik, Stig, William Perry and plenty of others.
Primary XEmacs-specific subsystems and their authors:
@table @asis
@item Objects
@itemize @minus
@item
Conversion from 26-bit to 28-bit pointers and integers, lrecords, lcrecords: Richard Mlynarik, 1994
@item
Conversion to 32-bit pointers and 31-bit integers: Kyle Jones, Martin Buchholz
@item
Portable dumper, object descriptions: Olivier Galibert
@item
KKCC (new garbage collector), ephemerons, weak boxes: Michael Sperber and students
@item
Random object work (object equal and hash methods, weak lists, lcrecord lists, bit vectors, dynarr, blocktype, opaque, string resizing): Ben Wing
@item
Profiling: Ben Wing
@item
Some byte-compilation and hash-table improvements: Martin Buchholz
@item
Bignum: Jerry James
@end itemize
@item Internationalization/Mule
@itemize @minus
@item
mostly Ben Wing; many ideas for future work, Stephen Turnbull
@end itemize
@item I/O
@itemize @minus
@item
Basic event/event-stream implementation: Jamie Zawinski
@item
Most event work since 1994: Ben Wing
@item
Asynchronous stuff (async timeouts, signals, quit-checking): Ben Wing
@item
Process method abstraction, Windows process work: Kirill Katsnelson
@item
Misc-user events, async timeouts, most quit-checking and signal code, most other work since 1994: Ben Wing
@item
Lstreams: Ben Wing
@end itemize
@item Display
@itemize @minus
@item
Redisplay mechanism: implementation, Chuck Thompson; additional work, lots of people
@item
Glyphs: mostly Ben Wing
@item
Specifiers: Ben Wing
@item
Extents: initial implementation, someone at Lucid; rewrite, 1994, Ben Wing
@item
Widgets: Andy Piper
@item
JPEG/PNG/TIFF image converters: Ben Wing, William Perry, Jareth Hein, others (see comment in @file{glyphs-eimage.c})
@item
Menus: Jamie Zawinski, someone at Lucid (Lucid menus)
@item
Scrollbars: Chuck Thompson, ??? (Lucid scrollbar)
@item
Multi-device/device-independence work (console/device/etc methods): Ben Wing, prototype by chuck thompson
@item
Faces: first implementation, Jamie Zawinski; second, chuck; third, Ben Wing
@item
Fonts/colors: first implementation, Jamie Zawinski; further work, Ben Wing
@item
Toolbars: implementation, chuck, much interface work, Ben Wing
@item
Gutters, tabs: andy piper
@end itemize
@item Device subsystems
@itemize @minus
@item
X Windows: Jamie Zawinksi, Ben Wing, others
@item
GTK: William Perry, Malcolm Purvis
@item
MS Windows: initial implementation, Jonathan Harris; some more work, Andy Piper, Ben Wing
@item
TTY: Chuck Thompson, Ben Wing
@item
Cygwin: Andy Piper
@end itemize
@item Misc
@itemize @minus
@item
Configure: initial porting from fsf, Chuck Thompson; conversion to autoconf 2, much rewriting, Martin Buchholz
@item
Most initialization-related code: Ben Wing
@item
Internals manual, much of Lisp manual: Ben Wing
@item
FSF synching: initial sync with FSF 19, Richard Mlynarik, further work, Ben Wing
@end itemize
@end table
@subheading SUPPORT
Currently, support duties are handled by many different people.
Release managers have been
@itemize @minus
@item
Stephen Turnbull (April 2001 - January 2003, March 2004 - present, 21.2.47 - 21.4.12, 21.5.2 - 21.5.7, 21.5.17 - present)
@item
Vin Shelton (Mar 1997 - Jan 2001, May 2003 - present, 19.16, 21.1.3 -
21.1.14, 21.4.13 - present)
@item
Steve Youngs (July 2002 - September 2003, 21.5.8 - 21.5.16)
@item
Martin Buchholz (December 1998, November 1999 - May 2001, 21.2.7 - 21.2.8, 21.2.21 - 21.2.46, 21.5.0 - 21.5.1)
@item
Steve Baur (early 1997 - December 1998, February 1999 - November 1999, 19.15 - 21.2.5, 21.2.9 - 21.2.20)
@item
Andy Piper (December 1998, 21.2.6)
@item
Chuck Thompson (June 1994 - September 1996, 19.11 - 19.14)
@item
Jamie Zawinski (April 1991 - June 1994, 19.0 - 19.10)
@end itemize
The recent overlapping dates are intentional, since two or three trees
are maintained simultaneously at any point.
Other major support work:
@itemize @minus
@item
Adrian Aichner wrote and maintains the web site.
@item
Stephen Turnbull has produced many of the beta and semi-stable releases
and has attempted to be the "face" of XEmacs on the newsgroups and
mailing lists.
@item
Steve Youngs currently produces the beta releases (???).
@item
Steve Youngs, Ville Skytta, and now Norbert Koch have taken turns
maintaining the packages.
@item
Vin Shelton maintains the stable releases.
@item
Testing - #### Norbert, Adrian, ???
@end itemize
Portraits and email of some of the major developers:
@itemize @bullet
@item @email{andy@@xemacs.org, Andy Piper}
@html
<br><img src="piper.png" alt="Portrait of Andy Piper"><br>
@end html
@item @email{ben@@xemacs.org, Ben Wing}
@html
<br><img src="ben.png" alt="Portrait of Ben Wing"><br>
@end html
@item @email{cthomp@@xemacs.org, Chuck Thompson}
@html
<br><img src="cthomp.png" alt="Portrait of Chuck Thompson"><br>
@end html
@item @email{hniksic@@xemacs.org, Hrvoje Niksic}
@html
<br><img src="hniksic.png" alt="Portrait of Hrvoje Niksic"><br>
@end html
@item @email{jwz@@jwz.org, Jamie Zawinski}
@html
<br><img src="jwz.png" alt="Portrait of Jamie Zawinski"><br>
@end html
@item @email{martin@@xemacs.org, Martin Buchholz}
@html
<br><img src="martin.png" alt="Portrait of Martin Buchholz"><br>
@end html
@item @email{mly@@adoc.xerox.com, Richard Mlynarik}
@html
<br><img src="mly.png" alt="Portrait of Richard Mlynarik"><br>
@end html
@item @email{stephen@@xemacs.org, Stephen Turnbull}
@item @email{steve@@xemacs.org, Steve Baur}
@html
<br><img src="slb.png" alt="Portrait of Steve Baur"><br>
@end html
@end itemize
Many other people have contributed to XEmacs; this is partially
enumerated in the @samp{About XEmacs} option in the Help menu.
@node Q1.0.6, Q1.1.1, Q1.0.5, Introduction
@unnumberedsubsec Q1.0.6: Who wrote the FAQ?
The current version of this FAQ was created by @email{ben@@xemacs.org,
Ben Wing}.
Previous contributors to the FAQ include
@itemize @bullet
@item @email{steve@@xemacs.org, SL Baur}
@item @email{hniksic@@xemacs.org, Hrvoje Niksic}
@item @email{binge@@aloft.att.com, Curtis.N.Bingham}
@item @email{bruncott@@dormeur.inria.fr, Georges Brun-Cottan}
@item @email{rjc@@cogsci.ed.ac.uk, Richard Caley}
@item @email{cognot@@ensg.u-nancy.fr, Richard Cognot}
@item @email{daku@@nortel.ca, Mark Daku}
@item @email{wgd@@martigny.ai.mit.edu, William G. Dubuque}
@item @email{eeide@@cs.utah.edu, Eric Eide}
@item @email{af@@biomath.jussieu.fr, Alain Fauconnet}
@item @email{cflatter@@nrao.edu, Chris Flatters}
@item @email{ginsparg@@adra.com, Evelyn Ginsparg}
@item @email{hall@@aplcenmp.apl.jhu.edu, Marty Hall}
@item @email{dkindred@@cmu.edu, Darrell Kindred}
@item @email{dmoore@@ucsd.edu, David Moore}
@item @email{arup+@@cmu.edu, Arup Mukherjee}
@item @email{nickel@@prz.tu-berlin.de, Juergen Nickelsen}
@item @email{powell@@csl.ncsa.uiuc.edu, Kevin R. Powell}
@item @email{dworkin@@ccs.neu.edu, Justin Sheehy}
@item @email{stig@@hackvan.com, Stig}
@item @email{Aki.Vehtari@@hut.fi, Aki Vehtari}
@end itemize
@unnumberedsec 1.1: Getting XEmacs
@node Q1.1.1, Q1.1.2, Q1.0.6, Introduction
@unnumberedsubsec Q1.1.1: Where can I find XEmacs?
To download XEmacs, visit the XEmacs WWW page at
@uref{http://www.xemacs.org/Download/}. The most up-to-date list of
distribution sites can always be found there. Try to pick a site that
is networkologically close to you. If you know of other mirrors of
the XEmacs archives, please send e-mail to
@uref{mailto:webmaster@@xemacs.org} and we will list them here as well.
The canonical distribution point is ftp.xemacs.org, available either
through HTTP (@uref{http://ftp.xemacs.org/}) or anonymous FTP
(@uref{ftp://ftp.xemacs.org/pub/xemacs/}).
@node Q1.1.2, Q1.1.3, Q1.1.1, Introduction
@unnumberedsubsec Q1.1.2: Are binaries available?
MS Windows binaries are available at
@uref{http://www.xemacs.org/Download/win32/} for the native versions
of 21.4 and 21.1. Cygwin binaries are now available as part of the
standard Cygwin installation process. XEmacs also comes pre-built as
part of many Linux distributions, such as Red Hat and SuSE.
Otherwise, you will need to build XEmacs yourself or get your system
administrator to do it. Generally, this is not a difficult process
under Unix and Mac OS X, as XEmacs has been tested under all of the
common Unix versions and under Mac OS X and comes with an extensive
configure script that is able to automatically detect most aspects of
the configuration of your particular system.
@node Q1.1.3, Q1.1.4, Q1.1.2, Introduction
@unnumberedsubsec Q1.1.3: How do I get the bleeding-edge sources?
If you are interested in developing XEmacs, or getting the absolutely most
recent, up-to-the-moment, bleeding-edge source code, you can directly
access the master CVS source tree (read-only, of course, until you ask for
and are granted permission to directly modify portions of the source tree)
at cvs.xemacs.org. Directions on how to access the source tree are located
at @uref{http://www.xemacs.org/Develop/cvsaccess.html}.
Nightly CVS snapshots are available at
@uref{http://www.dk.xemacs.org/Download/CVS-snapshots/}.
@node Q1.1.4, Q1.2.1, Q1.1.3, Introduction
@unnumberedsubsec Q1.1.4: Where can I obtain a printed copy of the XEmacs User's Manual?
Pre-printed manuals are not available. If you are familiar with
TeX, you can generate your own manual from the XEmacs sources.
HTML and Postscript versions of XEmacs manuals are available from the
XEmacs web site at
@uref{http://www.xemacs.org/Documentation/index.html}.
@unnumberedsec 1.2: Versions for Different Operating Systems
@node Q1.2.1, Q1.2.2, Q1.1.4, Introduction
@unnumberedsubsec Q1.2.1: Do I need X11 to run XEmacs?
No. The name @dfn{XEmacs} is unfortunate in the sense that it is
@strong{not} an X Window System-only version of Emacs. XEmacs has
full color support on a color-capable character terminal.
@node Q1.2.2, Q1.2.3, Q1.2.1, Introduction
@unnumberedsubsec Q1.2.2: What versions of Unix does XEmacs run on?
XEmacs is regularly tested on Linux, Solaris, SunOS, HP/UX, FreeBSD,
OpenBSD, BSD/OS aka BSDI, Tru64 aka DEC/OSF, SCO5, and probably
others. It should work on all versions of Unix created in the last 10
years or so, perhaps with a bit of work on more obscure platforms to
correct bit-rot. It uses a sophisticated configuration system to
auto-detect zillions of features that are implemented differently in
different versions of Unix, so it will probably work on your vendor's
version, possibly with a bit of tweaking, even if we've never heard of
it.
For problems with particular machines and versions of Unix, see the
@file{PROBLEMS} file.
Much effort has gone into making XEmacs work on as many different
machines, configurations, and compilers as possible.
Much effort has gone into making XEmacs 64-bit clean.
Much effort has gone into removing system-specific code, and replacing
such code with autodetection at configure time.
The XEmacs core should build "out of the box" on most Unix-like systems.
XEmacs 21.2 was tested and @samp{make check} succeeded on these Unix
configurations as of 2001-02-10:
@example
alphaev56-dec-osf4.0e (both Compaq C and gcc)
i386-unknown-freebsd4.2
i386-unknown-netbsdelf1.5
i586-sco-sysv5uw7.0.1 (both SCO's cc and gcc)
i686-pc-linux-gnu
hppa2.0-hp-hpux10.20 (both HP's ANSI cc and gcc)
mips-sgi-irix6.5 (both MIPSpro cc and gcc)
rs6000-ibm-aix4.3.0.0 (both IBM's xlc and gcc)
sparc-sun-solaris2.6 (both Sun's Forte C and gcc)
sparc-sun-solaris2.7 (both Sun's Forte C and gcc)
sparc-sun-sunos4.1.4 (gcc)
@end example
Some systems have a dual mode 32-bit/64-bit compiler. On most of these,
XEmacs requires the @samp{--pdump} (in XEmacs 21.5,
@samp{--enable-pdump}) configure option to build correctly with the
64-bit version of the compiler.
@example
mips-sgi-irix6.5, CC="gcc -mabi=64"
mips-sgi-irix6.5, CC="cc -64"
rs6000-ibm-aix4.3.0.0, CC="cc -q64"
@end example
On most of these systems, XEmacs also builds with a C++ compiler,
but not "out of the box". This feature is only for use by the
maintainers.
XEmacs 21.2 is known @emph{not} to work on any machines with m680x0
processors. Sorry, all you sun3 and Unix PC nostalgia buffs out there.
VMS has never been supported by XEmacs. In fact, all the old VMS code
inherited from Emacs has been removed. Sorry, all you VMS fans out there.
@node Q1.2.3, Q1.2.4, Q1.2.2, Introduction
@unnumberedsubsec Q1.2.3: Is there a port of XEmacs to Microsoft Windows?
Yes. Beginning with release 21.0, XEmacs has worked under MS Windows
and is fully-featured and actively developed. A group of dedicated
developers actively maintains and improves the Windows-specific
portions of the code. Some of the core developers, in fact, use
Windows as their only development environment, and some features, such
as printing, actually work better on Windows than native Unix and Mac
OS X. The mailing list at @email{xemacs-winnt@@xemacs.org} is dedicated
to that effort (please use the -request address to
subscribe). (Despite its name, XEmacs actually works on all versions
of Windows.)
The list name is misleading, as XEmacs supports and has been compiled on
Windows 95, Windows 98, Windows NT, Windows 2000, Windows ME, Windows
XP, and all newer versions of Windows. The MS Windows-specific code is
based on Microsoft Win32 API, and will not work on MS Windows 3.x or on
MS-DOS.
XEmacs also supports the Cygwin and MinGW development and runtime
environments, where it also uses native Windows code for graphical
features. In addition, under Cygwin it is possible to compile XEmacs
to use an X server (and XFree86 is available as part of the standard
Cygwin installation).
@node Q1.2.4, Q1.2.5, Q1.2.3, Introduction
@unnumberedsubsec Q1.2.4: Can I build XEmacs on MS Windows with X support? Do I need to?
Yes, you can, but no you do not need to. In fact, we recommend that you
use a native-GUI version unless you have a specific need for an X
version.
@node Q1.2.5, Q1.2.6, Q1.2.4, Introduction
@unnumberedsubsec Q1.2.5: What are Cygwin and MinGW, and do I need them to run XEmacs?
To answer the second part of the question: No, you, you don't need
Cygwin or MinGW to build or to run XEmacs. But if you have them and
want to use them, XEmacs supports these environments.
(One important reason to support Cygwin is that it lets the MS Windows
developers test out their code in a Unix environment without actually
having to have a Unix machine around. For this reason alone, Cygwin
support is likely to remain supported for a long time in XEmacs. Same
goes for the X support under Cygwin, for the same reasons. MinGW
support, on the other hand, depends on volunteers to keep it up to date;
but this is generally not hard.)
Cygwin is a set of tools providing Unix-like API on top of Win32.
It makes it easy to port large Unix programs without significant
changes to their source code. It is a development environment as well
as a runtime environment.
When built with Cygwin, XEmacs supports all display types -- TTY, X &
Win32 GUI, and can be built with support for all three simultaneously.
If you build with Win32 GUI support then the Cygwin version uses the
majority of the Windows-specific code, which is mostly related to
display. If you want to build with X support you need X libraries (and
an X server to display XEmacs on); see @ref{Q2.3.7}. TTY and Win32 GUI
require no additional libraries beyond what comes standard with Cygwin.
The advantages of the Cygwin version are that it integrates well with
the Cygwin environment for existing Cygwin users; uses configure so
building with different features is very easy; and actively supports X &
TTY. Furthermore, the entire Cygwin environment and compiler are free,
whereas Visual C++ costs money.
The disadvantage is that it requires the whole Cygwin environment,
whereas the native port requires only a suitable MS Windows compiler.
Also, it follows the Unix filesystem and process model very closely
(some will undoubtedly view this as an advantage).
See @uref{http://www.cygwin.com/} for more information on
Cygwin.
MinGW is a collection of header files and import libraries that allow
one to use GCC under the Cygwin environment to compile and produce
exactly the same native Win32 programs that you can using Visual C++.
Programs compiled with MinGW make use of the standard Microsoft runtime
library @file{MSVCRT.DLL}, present on all Windows systems, and look,
feel, and act like a standard Visual-C-produced application. (The only
difference is the compiler.) This means that, unlike a
standardly-compiled Cygwin application, no extra runtime support
(e.g. Cygwin's @file{cygwin1.dll}) is required. This, along with the
fact that GCC is free (and works in a nice Unix-y way in a nice Unix-y
environment, for those die-hard Unix hackers out there), is the main
advantage of MinGW. It is also potentially faster than Cygwin because
it has less overhead when calling Windows, but you lose the POSIX
emulation layer, which makes Unix programs harder to port. (But this is
irrelevant for XEmacs since it's already ported to Win32.)
See @uref{http://www.mingw.org/} for more information on MinGW.
@node Q1.2.6, Q1.2.7, Q1.2.5, Introduction
@unnumberedsubsec Q1.2.6: What are the differences between the various MS Windows emacsen?
XEmacs, Win-Emacs, DOS Emacs, NT Emacs, this is all very confusing.
Could you briefly explain the differences between them?
Here is a recount of various Emacs versions running on MS Windows:
@itemize @bullet
@item
XEmacs
@itemize @minus
@item
Beginning with XEmacs 19.12, XEmacs' architecture was redesigned
in such a way to allow clean support of multiple window systems. At
this time the TTY support was added, making X and TTY the first two
"window systems" supported by XEmacs. The 19.12 design is the basis for
the current native MS Windows code.
@item
Some time during 1997, David Hobley (soon joined by Marc Paquette)
imported some of the NT-specific portions of GNU Emacs, making XEmacs
with X support compile under Windows NT, and creating the "X" port.
@item
Several months later, Jonathan Harris sent out initial patches to use
the Win32 API, thus creating the native port. Since then, various
people have contributed, including Kirill M. Katsnelson (contributed
support for menubars, subprocesses and network, as well as loads of
other code), Andy Piper (ported XEmacs to Cygwin environment,
contributed Windows unexec, Windows-specific glyphs and toolbars code,
and more), Ben Wing (loads of improvements; primary MS Windows developer
since 2000), Jeff Sparkes (contributed scrollbars support) and many
others.
@end itemize
@item
NT Emacs
@itemize @minus
@item
NT Emacs was an early version of GNU Emacs 19 modified to compile and
run under MS Windows 95 and NT using the native Win32 API. It was
written by Geoff Voelker, and has long since been incorporated into
the mainline GNU Emacs distribution.
@end itemize
@item
Win-Emacs
@itemize @minus
@item
Win-Emacs was a port of Lucid Emacs 19.6 to MS Windows using X
compatibility libraries. Win-Emacs was written by Ben Wing. The MS
Windows code never made it back to Lucid Emacs, and its creator (Pearl
Software) has long since gone out of business.
@end itemize
@item
GNU Emacs for DOS
@itemize @minus
@item
GNU Emacs features support for MS-DOS and DJGPP (D.J. Delorie's DOS
port of GCC). Such an Emacs is heavily underfeatured, because it does
not support long file names, lacks proper subprocesses support, and
is far too big compared with typical DOS editors.
@end itemize
@item
GNU Emacs compiled with Win32
@itemize @minus
@item
Starting with GNU Emacs 19.30, it has been possible to compile GNU Emacs
under MS Windows using the DJGPP compiler and X libraries. The result
is very similar to GNU Emacs compiled under MS DOS, only it works
somewhat better because it runs in 32-bit mode, makes use of all the
system memory, supports long file names, etc.
@end itemize
@end itemize
@node Q1.2.7, Q1.2.8, Q1.2.6, Introduction
@unnumberedsubsec Q1.2.7: How does the port cope with differences in the Windows user interface?
The XEmacs (and Emacs in general) user interface is pretty different
from what is expected of a typical MS Windows program. How does the MS
Windows port cope with it?
As a general rule, we follow native MS Windows conventions as much as
possible. 21.4 is a fairly complete Windows application, supporting
native printing, system file dialog boxes, tool tips, etc. In cases
where there's a clear UI conflict, we currently use normal Unix XEmacs
behavior by default, but make sure the MS Windows "look and feel" (mark
via shift-arrow, self-inserting deletes region, Alt selects menu items,
etc.) is easily configurable (respectively: using the variable
@code{shifted-motion-keys-select-region} in 21.4 and above [it's in fact
the default in these versions], or the @file{pc-select} package; using
the @file{pending-del} package; and setting the variable
@code{menu-accelerator-enabled} to @code{menu-force} in 21.4 and above).
In fact, if you use the sample @file{init.el} file as your init file,
you will get all these behaviors automatically turned on.
In future versions, some of these features might be turned on by
default in the MS Windows environment.
@node Q1.2.8, Q1.2.9, Q1.2.7, Introduction
@unnumberedsubsec Q1.2.8: Is there a port of XEmacs to the Macintosh?
Yes.
XEmacs 21.5 (perhaps 21.4 also?) works on MacOS X, although it certainly
will not feel very much like a Mac application as it has no Mac-specific
code in it.
There is also a port of XEmacs 19.14 that works on all recent versions
of MacOS, from 8.1 through MacOS X, by @email{pjarvis@@ispchannel.com,
Pitts Jarvis} (recently deceased). It runs in an equivalent of TTY
mode only (one single Macintosh window, 25 colors), but has a large
number of Mac-specific additions. It's available at
@uref{http://homepage.mac.com/pjarvis/xemacs.html}.
@node Q1.2.9, Q1.2.10, Q1.2.8, Introduction
@unnumberedsubsec Q1.2.9: Is there a port of XEmacs to MS-DOS?
No. We have never supported running on MS-DOS or Windows 3.1, and in
fact have long since deleted all MS-DOS-related code. We're not
particularly interested in patches for these platforms, as they would
introduce huge amounts of code clutter due to the woefully
underfeatured nature of these systems. (See GNU Emacs for a port to
MS-DOS.)
@node Q1.2.10, Q1.2.11, Q1.2.9, Introduction
@unnumberedsubsec Q1.2.10: Is there a port of XEmacs to OS/2?
No, but Alexander Nikolaev <avn_1251@@mail.ru> was at one point
working on it.
@node Q1.2.11, Q1.2.12, Q1.2.10, Introduction
@unnumberedsubsec Q1.2.11: Is there a port of XEmacs to NextStep?
Carl Edman, apparently no longer at @email{cedman@@princeton.edu}, did
the port of GNU Emacs to NeXTstep and expressed interest in doing the
XEmacs port, but never went any farther.
@node Q1.2.12, Q1.3.1, Q1.2.11, Introduction
@unnumberedsubsec Q1.2.12: Is there a port of XEmacs to VMS?
VMS has never been supported by XEmacs. In fact, all the old VMS code
inherited from GNU Emacs has been removed. Sorry, all you VMS fans
out there.
@unnumberedsec 1.3: Getting Started
@node Q1.3.1, Q1.3.2, Q1.2.12, Introduction
@unnumberedsubsec Q1.3.1: What is an @file{init.el} or @file{.emacs} and is there a sample one?
The @file{init.el} or @file{.emacs} file is used to customize XEmacs to
your tastes. Starting in 21.4, the preferred location for the init file
is @file{~/.xemacs/init.el}; in previous versions, it was
@file{~/.emacs}. 21.4 still accepts the old location, but the first
time you run it, it will ask to migrate your file to the new location.
If you answer yes, the file will be moved, and a "compatibility"
@file{.emacs} file will be placed in the old location so that you can
still run older versions of XEmacs, and versions of GNU Emacs, which
expect the old location. The @file{.emacs} file present is just a stub
that loads the real file in @file{~/.xemacs/init.el}.
No two init files are alike, nor are they expected to be alike, but
that's the point. The XEmacs distribution contains an excellent starter
example in the @file{etc/} directory called @file{sample.init.el}
(starting in 21.4) or @file{sample.emacs} in older versions. Copy this
file from there to @file{~/.xemacs/init.el} (starting in 21.4) or
@file{~/.emacs} in older versions, where @samp{~} means your home
directory, of course. Then edit it to suit.
You may bring the @file{sample.init.el} or @file{sample.emacs} file into
an XEmacs buffer from the menubar. (The menu entry for it is always
under the @samp{Help} menu, but its location under that has changed in
various versions. Recently, look under the @samp{Samples} submenu.) To
determine the location of the @file{etc/} directory type the command
@kbd{C-h v data-directory @key{RET}}.
@node Q1.3.2, Q1.3.3, Q1.3.1, Introduction
@unnumberedsubsec Q1.3.2: Where do I put my @file{init.el} file?
@file{init.el} is the name of the init file starting with 21.4, and is
located in the subdirectory @file{.xemacs/} of your home directory. In
prior versions, the init file is called @file{.emacs} and is located in
your home directory.
Your home directory under Windows is determined by the @samp{HOME}
environment variable. If this is not set, it defaults to @samp{C:\}.
To set this variable, modify @file{AUTOEXEC.BAT} under Windows 95/98, or
select @samp{Control Panel->System->Advanced->Environment Variables...}
under Windows NT/2000.
@node Q1.3.3, Q1.3.4, Q1.3.2, Introduction
@unnumberedsubsec Q1.3.3: Can I use the same @file{init.el} with the other Emacs?
Yes. The sample @file{init.el} included in the XEmacs
distribution will show you how to handle different versions and flavors
of Emacs.
@node Q1.3.4, Q1.3.5, Q1.3.3, Introduction
@unnumberedsubsec Q1.3.4: Any good XEmacs tutorials around?
There's the XEmacs tutorial available from the Help Menu under
@samp{Help->Tutorials}, or by typing @kbd{C-h t}. To check whether
it's available in a non-english language, type @kbd{C-u C-h t TAB}, type
the first letters of your preferred language, then type @key{RET}.
@comment There's an Emacs Lisp tutorial at
@comment
@comment @example
@comment @uref{ftp://prep.ai.mit.edu/pub/gnu/emacs-lisp-intro-1.04.tar.gz}.
@comment @end example
@comment
@comment @email{erik@@petaxp.rug.ac.be, Erik Sundermann} has made a tutorial web
@comment page at
@comment @iftex
@comment @*
@comment @end iftex
@comment @uref{http://petaxp.rug.ac.be/~erik/xemacs/}.
@node Q1.3.5, Q1.3.6, Q1.3.4, Introduction
@unnumberedsubsec Q1.3.5: May I see an example of a useful XEmacs Lisp function?
The following function does a little bit of everything useful. It does
something with the prefix argument, it examines the text around the
cursor, and it's interactive so it may be bound to a key. It inserts
copies of the current word the cursor is sitting on at the cursor. If
you give it a prefix argument: @kbd{C-u 3 M-x double-word} then it will
insert 3 copies.
@lisp
(defun double-word (count)
"Insert a copy of the current word underneath the cursor"
(interactive "*p")
(let (here there string)
(save-excursion
(forward-word -1)
(setq here (point))
(forward-word 1)
(setq there (point))
(setq string (buffer-substring here there)))
(while (>= count 1)
(insert string)
(decf count))))
@end lisp
The best way to see what is going on here is to let XEmacs tell you.
Put the code into an XEmacs buffer, and do a @kbd{C-h f} with the cursor
sitting just to the right of the function you want explained. Eg. move
the cursor to the SPACE between @code{interactive} and @samp{"*p"} and
hit @kbd{C-h f} to see what the function @code{interactive} does. Doing
this will tell you that the @code{*} requires a writable buffer, and
@code{p} converts the prefix argument to a number, and
@code{interactive} allows you to execute the command with @kbd{M-x}.
@node Q1.3.6, Q1.3.7, Q1.3.5, Introduction
@unnumberedsubsec Q1.3.6: And how do I bind it to a key?
To bind to a key do:
@lisp
(global-set-key "\C-cd" 'double-word)
@end lisp
Or interactively, @kbd{M-x global-set-key} and follow the prompts.
@node Q1.3.7, Q1.3.8, Q1.3.6, Introduction
@unnumberedsubsec Q1.3.7: What's the difference between a macro and a function?
Quoting from the Lisp Reference (a.k.a @dfn{Lispref}) Manual:
@dfn{Macros} enable you to define new control constructs and other
language features. A macro is defined much like a function, but instead
of telling how to compute a value, it tells how to compute another Lisp
expression which will in turn compute the value. We call this
expression the @dfn{expansion} of the macro.
Macros can do this because they operate on the unevaluated expressions
for the arguments, not on the argument values as functions do. They can
therefore construct an expansion containing these argument expressions
or parts of them.
Do not confuse the two terms with @dfn{keyboard macros}, which are
another matter, entirely. A keyboard macro is a key bound to several
other keys. Refer to manual for details.
@node Q1.3.8, Q1.4.1, Q1.3.7, Introduction
@unnumberedsubsec Q1.3.8: What is @code{Custom}?
@code{Custom} is a system for customizing XEmacs options.
You can access @code{Advanced (Customize)} from the @code{Options} menu
or invoking one of customize commands by typing eg.
@kbd{M-x customize}, @kbd{M-x customize-face},
@kbd{M-x customize-variable} or @kbd{M-x customize-apropos}.
There is also new @samp{browser} mode for Customize.
Try it out with @kbd{M-x customize-browse}
@unnumberedsec 1.4: Getting Help
@node Q1.4.1, Q1.4.2, Q1.3.8, Introduction
@unnumberedsubsec Q1.4.1: Where can I get help?
Probably the easiest way, if everything is installed, is to use Info, by
pressing @kbd{C-h i}, or looking for an Info item on the
Help Menu. @kbd{M-x apropos} can be used to look for particular commands.
For items not found in the manual, try reading this FAQ
and reading the Usenet group comp.emacs.xemacs.
If you choose to post to a newsgroup, @strong{please use
comp.emacs.xemacs}. Please do not post XEmacs related questions to
gnu.emacs.help.
If you cannot post or read Usenet news, there is a corresponding mailing
list @email{xemacs-news@@xemacs.org} which is available. It can be
subscribed to via the Mailman Web interface or by sending mail to to
@email{xemacs-news-request@@xemacs.org} with @samp{subscribe} in the
body of the message. See also
@uref{http://www.xemacs.org/Lists/#xemacs-news}. To cancel a
subscription, you may use the @email{xemacs-news-request@@xemacs.org}
address or the Web interface. Send a message with a subject of
@samp{unsubscribe} to be removed.
@node Q1.4.2, Q1.4.3, Q1.4.1, Introduction
@unnumberedsubsec Q1.4.2: Which mailing lists are there?
For complete, up-to-date info on the lists and how to subscribe, see
@uref{http://www.xemacs.org/Lists/}.
@table @samp
@item comp.emacs.xemacs
is a Usenet newsgroup
for XEmacs users to discuss problems and issues that arise
for them. It's not generally an appropriate place to ask
about apparent bugs (use @samp{xemacs-beta}), or future plans
(use @samp{xemacs-design}).
@item xemacs-announce
is a read-only, low
volume list for announcements concerning the XEmacs project
and new releases of the XEmacs software.
@item xemacs-beta
is an open list for bug reports about beta versions of XEmacs. This
includes the bug reports themselves, by both users and developers, as
well as queries, follow-ups, and discussions further determining their
nature and status. This is the primary channel for this kind of
discussion; related code changes will usually not be applied until
they have been discussed here. When such discussions touch on
significant changes to the code (in particular, structural changes),
or on changes to API's or external functionality, they should be moved
to @samp{xemacs-design}. Requests and proposals for non-bug-related
changes do not belong on @samp{xemacs-beta}, and should be sent to
@samp{xemacs-design} instead.
@item xemacs-beta-ja
is an open list for bug
reports and design discussion related to Mule features,
including Japanese handling, in beta versions of XEmacs.
Japanese is the preferred language of discussion. For most
timely presentation to reviewers, please consider sending
appropriate discussion to @samp{xemacs-mule} or
@samp{xemacs-design} in English when convenient for
the participants in discussion. When possible, bug reports
not related to Mule (including Japanese) should be reported on
@samp{xemacs-beta} in English.
@item xemacs-buildreports
is an open list for
submission of build-reports on beta versions of XEmacs. For
information on what the build-reports should contain, please
see the `etc/BETA' file which is included in each beta
distribution.
@item xemacs-cvs
is a read-only list for notices
and information on what has been committed to the XEmacs CVS
trees, by whom, and for what.
@item xemacs-design
is an open list for
discussing the design of XEmacs. This includes discussion
about planned and ongoing changes to functionality and API
changes and additions as well as requests for them. This is
the primary channel for this kind of discussion; related code
changes will usually not be applied until they have been
discussed here. This does not include bug reports, which go
to @samp{xemacs-beta}.
@item xemacs-mule
is an open mailing list for
discussion of International extensions to XEmacs including
Mule, XIM, I18n issues, etc, and is not confined to
developmental issues. This list is not restricted to
English, postings in all languages are welcome.
@item xemacs-news
is an open list for discussion
and bug reporting for XEmacs. This mailing list is
bi-directionally gatewayed with the USENET newsgroup
comp.emacs.xemacs.
@item xemacs-nt
is a developers-only mailing
list and is intended for people who wish to work actively on
the porting of XEmacs to Microsoft Windows NT and Microsoft
Windows '95.
@item xemacs-patches
is an open, moderated
list for submission of patches to the XEmacs distribution
and its packages. Anyone may subscribe or submit to
xemacs-patches, but all submissions are reviewed by the list
moderator before they are distributed to the
list. Discussion is not appropriate on xemacs-patches.
@item xemacs-users-ja
is an open list for
discussion and bug reporting for XEmacs. Japanese is the
preferred language of discussion. It is not gated to
comp.emacs.xemacs or the @samp{xemacs} list. For
fastest response, bugs not specifically related to Japanese
or Mule features should be reported on
@samp{xemacs-beta} (in English).
@item xemacs-users-ru
is an open list for
discussion and bug reporting for XEmacs. Russian is the
preferred language of discussion. It is not gated to
comp.emacs.xemacs or the @samp{xemacs} list. For
fastest response, bugs not specifically related to Russian
or Mule features should be reported on
@samp{xemacs-beta} (in English).
@end table
@node Q1.4.3, Q1.4.4, Q1.4.2, Introduction
@unnumberedsubsec Q1.4.3: Where are the mailing lists archived?
The archives can be found at @uref{http://list-archive.xemacs.org}
@node Q1.4.4, Q1.4.5, Q1.4.3, Introduction
@unnumberedsubsec Q1.4.4: How can I get two instances of info?
Before 21.4, you can't. The @code{info} package does not provide for
multiple info buffers. In 21.4, this should be fixed. #### how?
@node Q1.4.5, Q1.5.1, Q1.4.4, Introduction
@unnumberedsubsec Q1.4.5: How do I add new Info directories?
You use something like:
@lisp
(setq Info-directory-list (cons
(expand-file-name "~/info")
Info-default-directory-list))
@end lisp
@email{davidm@@prism.kla.com, David Masterson} writes:
@quotation
Emacs Info and XEmacs Info do many things differently. If you're trying to
support a number of versions of Emacs, here are some notes to remember:
@enumerate
@item
Emacs Info scans @code{Info-directory-list} from right-to-left while
XEmacs Info reads it from left-to-right, so append to the @emph{correct}
end of the list.
@item
Use @code{Info-default-directory-list} to initialize
@code{Info-directory-list} @emph{if} it is available at startup, but not
all Emacsen define it.
@item
Emacs Info looks for a standard @file{dir} file in each of the
directories scanned from #1 and magically concatenates them together.
@item
XEmacs Info looks for a @file{localdir} file (which consists of just the
menu entries from a @file{dir} file) in each of the directories scanned
from #1 (except the first), does a simple concatenation of them, and
magically attaches the resulting list to the end of the menu in the
@file{dir} file in the first directory.
@end enumerate
Another alternative is to convert the documentation to HTML with
texi2html and read it from a web browser like Lynx or W3.
@end quotation
@unnumberedsec 1.5: Contributing to XEmacs
@node Q1.5.1, Q1.5.2, Q1.4.5, Introduction
@unnumberedsubsec Q1.5.1: How do I submit changes to the FAQ?
The FAQ is actively maintained and modified regularly. All links should
be up to date. Unfortunately, some of the information is out of date --
a situation which the FAQ maintainer is working on. All submissions are
welcome, please e-mail submissions to @email{faq@@xemacs.org, XEmacs FAQ
maintainers}.
Please make sure that @samp{XEmacs FAQ} appears on the Subject: line.
If you think you have a better way of answering a question, or think a
question should be included, we'd like to hear about it. Questions and
answers included into the FAQ will be edited for spelling and grammar
and will be attributed. Answers appearing without attribution are
either from versions of the FAQ dated before May 1996 or are from
previous FAQ maintainers. Answers quoted from Usenet news articles will
always be attributed, regardless of the author.
@node Q1.5.2, Q1.5.3, Q1.5.1, Introduction
@unnumberedsubsec Q1.5.2: How do I become a beta tester?
Send an email message to @email{xemacs-beta-request@@xemacs.org} with
the line @samp{subscribe} in the body of the message.
Be prepared to get your hands dirty, as beta testers are expected to
identify problems as best they can.
@node Q1.5.3, Q1.5.4, Q1.5.2, Introduction
@unnumberedsubsec Q1.5.3: How do I contribute to XEmacs itself?
It depends on the knowledge and time you possess. If you are able, by
all means become a beta tester (@pxref{Q1.5.2}). If you are a
programmer, try to build XEmacs and see if you can improve it.
Otherwise, you can still help by using XEmacs as your everyday editor
(for pre-built binary versions, @pxref{Q1.1.2}) and reporting bugs you
find to the mailing list.
Another area where we need help is the documentation: We need good
documentation for building XEmacs and for using it. This FAQ is a
small step in that direction.
Ben Wing @email{ben@@xemacs.org} writes:
@quotation
BTW if you have a wish list of things that you want added, you have to
speak up about it! More specifically, you can do the following if you
want a feature added (in increasing order of usefulness):
@itemize @bullet
@item
Make a posting about a feature you want added.
@item
Become a beta tester and make more postings about those same features.
@item
Convince us that you're going to use the features in some cool and
useful way.
@item
Come up with a clear and well-thought-out API concerning the features.
@item
Write the code to implement a feature and send us a patch.
@end itemize
(not that we're necessarily requiring you to write the code, but we can
always hope :)
@end quotation
@node Q1.5.4, Q1.5.5, Q1.5.3, Introduction
@unnumberedsubsec Q1.5.4: How do I get started developing XEmacs?
First, get yourself set up under CVS so that you can access the CVS
repositories containing the XEmacs sources and the XEmacs packages.
Next, set up your layout. This is important, as a good layout will
facilitate getting things done efficiently, while a bad layout will could
lead to disaster, as you can't figure out which code is the most recent,
which can be thrown away, etc. We suggest the following layout: (feel free
to make changes)
@itemize @bullet
@item
Everything goes under @file{/src/xemacs} (use a different directory if
you want). From now, instead of saying @file{/src/xemacs}, we use
@file{<xsrc-top>}, to make it easier in case someone picked a
different directory.
@item
Package source is in @file{<xsrc-top>/package-src}.
@item
Installed packages go under @file{<xsrc-top>/xemacs-packages}, and
@file{<xsrc-top>/mule-packages}.
@item
A "workspace" is a complete copy of the sources, in which you do work of
a particular kind. Workspaces can be differentiated by which branch of
the source tree they extend off of -- usually either the stable or
experimental, unless other branches have been created (for example, Ben
created a branch for his Mule work because (1) the project was long-term
and involved an enormous number of changes, (2) people wanted to be able
to look at what his work in progress, and (3) he wanted to be able to
check things in and in general use source-code control, since it was a
long-term project). Workspaces are also differentiated in what their
purpose is -- general working workspace, workspace for particular
projects, workspace keeping the latest copy of the code in one of the
branches without mods, etc.
@item
Various workspaces are subdirectories under @file{<xsrc-top>}, e.g.:
@itemize @bullet
@item
@file{<xsrc-top>/working} (the workspace you're actively working on,
periodically synched up with the latest trunk)
@item
@file{<xsrc-top>/stable} (for making changes to the stable version of
XEmacs, which sits on a branch)
@item
@file{<xsrc-top>/unsigned-removal} (a workspace for a specific, difficult
task that's going to affect lots of source and take a long time, and
so best done in its own workspace without the interference of other
work you're doing. Also, you can commit just this one large change,
separate from all the other changes).
@item
@file{<xsrc-top>/latest} (a copy of the latest sources on the trunk,
i.e. the experimental version of XEmacs, with no patches in it;
either update it periodically, by hand, or set up a cron job to do it
automatically). Set it up so it can be built, and build it so you
have a working XEmacs. (Building it might also go into the cron job.)
This workspace serves a number of purposes:
@enumerate
@item
You always have a recent version of XEmacs you can compare
against when something you're working on breaks. It's true
that you can do this with cvs diff, but when you need to do
some serious investigation, this method just fails.
@item
You (almost) always have a working, up-to-date executable that
can be used when your executable is crashing and you need to
keep developing it, or when you need an `xemacs' to build
packages, etc.
@item
When creating new workspaces, you can just copy the `latest'
workspace using GNU @code{cp -a}. You have all the .elc's built,
everything else probably configured, any spare files in place
(e.g. some annoying xpm.dll under Windows, etc.).
@end enumerate
@item
@file{<xsrc-top>/latest-stable/} (equivalent to @file{<xsrc-top>/latest/}, but
for the Stable branch of XEmacs, rather than the Experimental branch
of XEmacs). This may or may not be necessary depending on how much
development you do of the stable branch.
@end itemize
@item
@file{<xsrc-top>/xemacsweb} is a workspace for working on the XEmacs
web site.
@item
@file{<xsrc-top>/in-patches} for patches received from email and saved
to files.
@item
@file{<xsrc-top>/out-patches} for locally-generated patches to be sent
to @email{xemacs-patches@@xemacs.org}. Less useful now that the
patcher util has been developed.
@item
@file{<xsrc-top>/build}, for build trees when compiling and testing XEmacs with
various configuration options turned off and on. The scripts in
xemacs-builds/ben (see below) can be used to automate building XEmacs
workspaces with many different configuration options and automatically
filtering out the normal output so that you see only the abnormal
output.
@item
@file{<xsrc-top>/xemacs-builds}, for the xemacs-builds module, which you need
to check out separately in CVS. This contains scripts used for building
XEmacs, automating and simplifying using CVS, etc. Under various
people's directories are their own build and other scripts. The
currently most-maintained scripts are under ben/, where there are easily
configurable scripts that can be used to easily build any workspace
(esp. if you've more or less followed the layout presented above)
unattended, with one or more configuration states (there's a
pre-determined list of the most useful, but it's easy to change). The
output is filtered and split up in various ways so that you can identify
which output came from where, and you can see the output either full or
with all "normal" output except occasional status messages filtered so
that you only see the abnormal ones.
@end itemize
@node Q1.5.5, Q1.6.1, Q1.5.4, Introduction
@unnumberedsubsec Q1.5.5: What's the basic layout of the code?
The file @file{configure} is a shell script to acclimate XEmacs to the
oddities of your processor and operating system. It will create a
file named @file{Makefile} (a script for the @file{make} program), which helps
automate the process of building and installing emacs. See INSTALL
for more detailed information.
The file @file{configure.in} is the input used by the autoconf program to
construct the @file{configure} script. Since XEmacs has configuration
requirements that autoconf can't meet, @file{configure.in} uses an unholy
marriage of custom-baked configuration code and autoconf macros; it
may be wise to avoid rebuilding @file{configure} from @file{configure.in} when
possible.
The file @file{Makefile.in} is a template used by @file{configure} to create
@file{Makefile}.
There are several subdirectories:
@enumerate
@item
@file{src} holds the C code for XEmacs (the XEmacs Lisp interpreter and its
primitives, the redisplay code, and some basic editing functions).
@item
@file{lisp} holds the XEmacs Lisp code for XEmacs (most everything else).
@item
@file{lib-src} holds the source code for some utility programs for use by
or with XEmacs, like movemail and etags.
@item
@file{etc} holds miscellaneous architecture-independent data files
XEmacs uses, like the tutorial text. The contents of the @file{lisp},
@file{info} and @file{man} subdirectories are architecture-independent too.
@item
@file{lwlib} holds the C code for the X toolkit objects used by XEmacs.
@item
@file{info} holds the Info documentation tree for XEmacs.
@item
@file{man} holds the source code for the XEmacs online documentation.
@item
@file{nt} holds files used compiling XEmacs under Microsoft Windows.
@end enumerate
@unnumberedsec 1.6: Politics (XEmacs vs. GNU Emacs)
@node Q1.6.1, Q1.6.2, Q1.5.5, Introduction
@unnumberedsubsec Q1.6.1: What is GNU Emacs?
GNU Emacs and XEmacs are related open-source text editors. Both
derive from GNU Emacs version 18; the split between the two happened
in 1991 (for comparison, the oldest versions of GNU Emacs date from
1984). For information on GNU Emacs, see
@uref{http://www.gnu.org/software/emacs/emacs.html}.
@node Q1.6.2, Q1.6.3, Q1.6.1, Introduction
@unnumberedsubsec Q1.6.2: How does XEmacs differ from GNU Emacs?
For a detailed description of the differences between GNU Emacs and
XEmacs and a detailed history of XEmacs, check out the
@example
@uref{http://www.xemacs.org/About/XEmacsVsGNUemacs.html, NEWS file}
@end example
@table @strong
@item User-Visible Editing Features
XEmacs in general tries hard to conform to exist user-interface
standards, and to work "out-of-the-box" without the need for obscure
customization changes. GNU Emacs, particularly version 21, has gotten
better about this (in many cases by copying the XEmacs behavior!), but
still has some weirdnesses. For example, the standard method of
selecting text using the Shift key works out-of-the-box in XEmacs.
XEmacs has a built-in toolbar. Four toolbars can actually be configured
simultaneously: top, bottom, left, and right toolbars.
XEmacs has vertical and horizontal scrollbars. Unlike in GNU Emacs 19
(which provides a primitive form of vertical scrollbar), these are true
toolkit scrollbars. A look-alike Motif scrollbar is provided for those
who don't have Motif. (Even for those who do, the look-alike may be
preferable as it is faster.)
XEmacs has buffer tabs along the top of the frame (although the
position can be changed) that make it very easy to switch buffers.
The menubar under XEmacs is better-designed, with more thought put into
it.
XEmacs can ask questions using popup dialog boxes. Any command executed
from a menu will ask yes/no questions with dialog boxes, while commands
executed via the keyboard will use the minibuffer.
XEmacs under MS Windows provides uses the standard file-dialog box for
opening and saving files. Standard menu-accelerator behavior can easily
be enabled using the Options menu, and integrates well into the existing
keymap.
XEmacs has (still experimental) support for widgets of various sorts --
buttons, text boxes, sliders, progress bars, etc. A progress bar is
used in font lock to show the progress.
Experimental support for drag-and-drop protocols is provided from
XEmacs 21.
@item General Platform Support
If you're running on a machine with audio hardware, you can specify
sound files for XEmacs to play instead of the default X beep. See the
documentation of the function load-sound-file and the variable
sound-alist. XEmacs also supports the network sound protocols NAS and
EsounD.
XEmacs 21 supports database protocols with LISP bindings, currently
including Berkeley DB, LDAP, and PostgreSQL (21.2 only).
XEmacs 20 and 21 support the Canna, Wnn, and SJ3 Japanese input method
servers directly, as well as through the X Input Method (XIM)
protocol. GNU Emacs 20 supports only the XIM protocol. Both Emacsen
support the Quail family of input methods (implemented in LISP) for many
languages.
XEmacs provides support for ToolTalk on systems that have
it.
@item Packaged LISP Libraries
Many more packages are provided standard with XEmacs than with GNU Emacs
19 or 20.
XEmacs 21 supports an integrated package management system which uses
EFS to download, then automatically install prebuilt LISP
libraries. This allows XEmacs users much more straightforward access to
the "latest and greatest" version of any given library.
We are working on a standard method for enabling, disabling and
otherwise controlling packages, which should make them very easy to use.
@item LISP Programming
From XEmacs 20 on, characters are a separate type. Characters can be
converted to integers (and many integers can be converted to
characters), but characters are not integers. GNU Emacs 19, XEmacs 19,
Mule 2.3 (an extensive patch to GNU Emacs 18.55 and 19.x), and GNU Emacs
20 (incorporating Mule 3 and later Mule 4) represent them as integers.
From XEmacs 20 on, the buffer is treated as an array of characters, and
the representation of buffer text is not exposed to LISP. The GNU Emacs
20 functions like buffer-as-multibyte are not supported.
In XEmacs, events are first-class objects. GNU Emacs 19 represents them
as integers, which obscures the differences between a key gesture and
the ancient ASCII code used to represent a particular overlapping subset
of them.
In XEmacs, keymaps are first-class opaque objects. GNU Emacs 19
represents them as complicated combinations of association lists and
vectors. If you use the advertised functional interface to manipulation
of keymaps, the same code will work in XEmacs, GNU Emacs 18, and GNU
Emacs 19; if your code depends on the underlying implementation of
keymaps, it will not.
XEmacs uses "extents" to represent all non-textual aspects of buffers;
GNU Emacs 19 uses two distinct objects, "text properties" and
"overlays", which divide up the functionality between them. Extents are
a superset of the union of the functionality of the two GNU Emacs data
types. The full GNU Emacs 19 interface to text properties and overlays
is supported in XEmacs (with extents being the underlying
representation).
Extents can be made to be copied into strings, and then restored, by
kill and yank. Thus, one can specify this behavior on either "extents"
or "text properties", whereas in GNU Emacs 19 text properties always
have this behavior and overlays never do.
@item Window System Programming Interface
XEmacs uses the MIT "Xt" toolkit instead of raw Xlib calls, which makes
it be a more well-behaved X citizen (and also improves portability). A
result of this is that it is possible to include other Xt "Widgets" in
the XEmacs window. Also, XEmacs understands the standard Xt command-line
arguments.
XEmacs supports Motif applications, generic Xt (e.g. Athena)
applications, and raw Xlib applications. An XEmacs variant which
supports GTK+ is available (integration as an option in the XEmacs
mainline is planned for XEmacs 22), although code to take advantage of
the support is as yet scarce.
An XEmacs frame can be placed within an "external client widget" managed
by another application. This allows an application to use an XEmacs
frame as its text pane rather than the standard Text widget that is
provided with Motif or Athena.
@item Community Participation
Joining the XEmacs development team is simple. Mail to
@email{xemacs-beta@@xemacs.org, XEmacs Developers}, and you're in! (If
you want to be, of course. You're also welcome to just post
development-related questions and bug reports.) The GNU Emacs
development team and internal mailing lists are still by invitation
only.
The "bleeding edge" of mainline XEmacs development is available by
anonymous CVS as are some subsidiary branches (check out the xemacs-gtk
module for the latest in GUI features!)
Development and maintenance of Lisp libraries is separated from the core
editor development at a fairly low level. This provides better
modularization and a better division of responsibility between external
library maintainers and the XEmacs core development team. Even for
packages the size of Gnus, XEmacs users normally have access to a
pre-built version within a few weeks of a major release, and minor
updates often within days.
CVS commit authority is broadly dispersed. Recognized maintainers of
LISP libraries who are willing to maintain XEmacs packaged versions
automatically qualify for CVS accounts for their packages.
@end table
@node Q1.6.3, Q1.6.4, Q1.6.2, Introduction
@unnumberedsubsec Q1.6.3: How much does XEmacs differ?
RMS has asserted at times that XEmacs is merely a "patch" on top of
GNU Emacs (@pxref{Q1.6.4}). In fact, probably not more than 5% of the
code, if that, remains unchanged, and nearly 14 years of work has gone
into XEmacs at this point. (GNU Emacs itself is only than 20 years
old, and thus XEmacs has existed as a separate product for over 2/3 of
the lifespan of GNU Emacs.) As a point of comparison, XEmacs 21.5 has
perhaps 65,000 more lines of C code than GNU Emacs 21.2.
However, the XEmacs developers strive to keep their code compatible with
GNU Emacs, especially on the Lisp level. Much effort goes into
"synching" the XEmacs Elisp code with recent GNU Emacs releases so as to
benefit from GNU Emacs development work. (In contrast, almost no code
from XEmacs has made it into GNU Emacs, and in fact the GNU Emacs
developers are instructed by RMS not to even look at XEmacs source code!
This stems from self-imposed licensing restrictions on the part of GNU
Emacs -- and almost certainly out of hostility, as well.)
@node Q1.6.4, Q1.6.5, Q1.6.3, Introduction
@unnumberedsubsec Q1.6.4: Is XEmacs "GNU"?
RMS insists on the term "GNU XEmacs" and maintains that
@quotation
XEmacs is GNU software because it's a modified version of a
GNU program. And it is GNU software because the FSF is the copyright
holder for most of it, and therefore the legal responsibility for
protecting its free status falls on us whether we want it or not. This
is why the term "GNU XEmacs" is legitimate.
@end quotation
In fact, FSF is @emph{not} the copyright holder for most of the code,
as very little unmodified FSF code remains (@pxref{Q1.6.3}).
Furthermore, RMS's assertion that XEmacs is "GNU" seems rather bizarre
to the XEmacs developers given RMS's hostility and general lack of
interest in cooperation. "GNU" software in general is part of the GNU
Project, is distributed by it on their FTP site, and receives support
(or at least cooperation), as well as implicit endorsement, from it.
The GNU Project, however, has never supported XEmacs and never
distributed XEmacs, and RMS's hostility is the farthest thing possible
from an endorsement. In fact, the GNU Project distributes a number of
non-GNU software projects on the FSF web site, but again XEmacs is not
one of them.
@node Q1.6.5, Q1.6.6, Q1.6.4, Introduction
@unnumberedsubsec Q1.6.5: What is the correct way to refer to XEmacs and GNU Emacs?
Unfortunately even the naming of these two applications has become
politicized. Much of this stems from RMS, who has a history of
politicizing similar issues. (Compare the controversy over "Lignux"
and "GNU/Linux".) We would prefer that the terms "XEmacs" and "GNU
Emacs" be used, which are neutral and acceptable to most people. RMS,
however, is not willing to accept these terms. He insists that, if
his product is called "GNU Emacs", then ours must be called "GNU
XEmacs". (For our opinion of this term, @xref{Q1.6.4}.) On the other
hand, if our product is to be called "XEmacs", as we prefer, then his
product must simply be called "Emacs". The intent of this seems
clear: RMS wants to make sure the names reflect his view that his
version is the "real" Emacs and ours is merely a derivative,
second-class product (@pxref{Q1.6.3}).
The XEmacs developers hope that you will use the neutral terms
"XEmacs" and "GNU Emacs" for these two specific products. "Emacs", on
the other hand, is a generic term for a class of programmable text
editors with a similar look-and-feel, and usually a Lisp-based
extension language. These trace themselves back to early editors such
as EINE, ZWEI, ZMACS and Multics Emacs. @xref{A History of Emacs,,,
internals, XEmacs Internals Manual}.
We also call upon RMS, in the spirit of furthering cooperation, to
stop politicizing this issue and use the neutral terms "XEmacs" and
"GNU Emacs". We have already acceded to RMS' wishes in this respect,
and we expect him to do the same. (In the past, the XEmacs developers
often used the terms "FSF Emacs" or "FSFmacs" or "RMSmacs" in
reference to GNU Emacs; these terms were apparently modeled after RMS'
own usage of "Gosmacs" and "Gosling Emacs" in reference to Unipress
Emacs, produced by James Gosling. RMS, however, considers such terms
to be insulting, so we refrain from using them as much as possible in
preference to GNU Emacs.)
@node Q1.6.6, Q1.7.1, Q1.6.5, Introduction
@unnumberedsubsec Q1.6.6: Why haven't XEmacs and GNU Emacs merged?
There are currently irreconcilable differences in the views about
technical, programming, design, organizational and legal matters
between Richard Stallman (RMS), the author and leader of the GNU Emacs
project, and the XEmacs development team which provide little hope for
a merge to take place in the short-term future. There have been
repeated attempts at merging by all of the major XEmacs developers,
starting from the early days of Lucid Emacs (in 1991), but they have
all failed. RMS has very strong views about how GNU Emacs should be
structured and how his project should be run, and during the repeated
merge efforts has never demonstrated any realistic interest in
sufficiently compromising or ceding control to allow a middle ground
to be found. The basic problem seems to be the very different goals
of RMS and the XEmacs project. The primary goals of the XEmacs
project are technical and organizational -- we want to create the best
editor possible, and to make it as easy as possible for people around
the world to contribute. The primary goals of RMS, on the other hand,
are political, and GNU Emacs, and any potential merge efforts with
XEmacs, are strictly subservient to these goals. In fact, in many
ways RMS sees GNU Emacs as the "poster child" of his aims, the one
program in the GNU project that above all others must set an example
to the world. (This has to do with the fact that GNU Emacs was the
first program in the GNU project, and the only one that he is still
personally involved with on a day-to-day basis.) Given his goals, his
position is completely reasonable -- but unfortunately, makes any
merge impossible.
From the XEmacs perspective, the most intractable issues appear to be
legal and organizational, specifically:
@itemize @bullet
@item
RMS requires "legal papers" to be signed for all contributions of code
to GNU Emacs over 10 lines or so, transferring the copyright and all
legal rights to the code to the Free Software Foundation. XEmacs does
not and has never required this, since it has the practical effect of
discouraging individual and in particular corporate contributions --
corporations will almost never sign away their legal rights to code
since it makes it impossible to reuse the code in any product that
whose license is not compatible with the GNU General Public License.
Since RMS has shown no inclination to compromise on this issue, a
merge would require that most of the existing XEmacs code would need
to be thrown away and rewritten -- something the XEmacs developers are
understandably reluctant to do.
@item
A repeated stumbling block in the merge talks has been the issue of
organizational control over the resulting product. RMS has made it
clear that he intends to have final say over design issues in a merged
Emacs. Unfortunately, RMS and the XEmacs developers have repeatedly
clashed over design decisions, and RMS' insistence on getting his way
in such disagreements was the very reason for the split in the first
place. This same issue has come up again and again in merge talks and
we have never been able to come to a satisfactory resolution. To the
extent that RMS is willing to compromise at all, it appears to be of a
purely political rather than technical nature -- "If we support this
feature of yours, we also get to support this other feature of mine."
The XEmacs developers cannot see how such a process would lead to
anything but a mess of incompatible things hodgepodged together.
@item
Because of the years of separate development, distinct and
incompatible interfaces have developed and merging would be extremely
difficult even with the above non-technical issues resolved. The
problem has been exacerbated by the issue of legal papers -- because
XEmacs code is not "kosher" from RMS' perspective, he discourages
developers from even looking at it out of legal concerns. Although it
is still possible to read the XEmacs documentation and run the
program, the practical effect of this prohibition has been to strongly
discourage code-sharing and cooperative development -- although a
great deal of GNU Emacs code has been incorporated into XEmacs,
practically none has gone the other direction.
@end itemize
If you have a comment to add regarding the merge, it is a good idea to
avoid posting to the newsgroups, because of the very heated flamewars
that often result. Mail your questions to
@email{xemacs-beta@@xemacs.org} and @email{emacs-devel@@gnu.org}.
@unnumberedsec 1.7: External Packages
@node Q1.7.1, Q1.7.2, Q1.6.6, Introduction
@unnumberedsubsec Q1.7.1: What is the package system?
In order to reduce the size and increase the maintainability of
XEmacs, the majority of the Elisp packages that came with previous
releases have been unbundled. They have been replaced by the package
system. Each elisp add-on (or groups of them when they are small) now
comes in its own tarball that contains a small search hierarchy.
You select just the ones you need. Install them by untarring them into
the right place. On startup XEmacs will find them, set up the load
path correctly, install autoloads, etc, etc.
@xref{Q2.1.1}, for more info on how to download and install the packages.
@node Q1.7.2, Q1.7.3, Q1.7.1, Introduction
@unnumberedsubsec Q1.7.2: Which external packages are there?
@subheading Normal Packages
A very broad collection of elisp packages.
@table @asis
@item Sun
Support for Sparcworks.
@item ada
Ada language support.
@item apel
A Portable Emacs Library. Used by XEmacs MIME support.
@item auctex
Basic TeX/LaTeX support.
@item bbdb
The Big Brother Data Base: a rolodex-like database program.
@item build
Build XEmacs from within (UNIX, Windows).
@item c-support
Basic single-file add-ons for editing C code.
@item calc
Emacs calculator.
@item calendar
Calendar and diary support.
@item cc-mode
C, C++, Objective-C, Java, CORBA IDL, Pike and AWK language support.
@item clearcase
New Clearcase Version Control for XEmacs (UNIX, Windows).
@item clearcase
Support for the Clearcase version control system.
@item cookie
"Fortune cookie"-style messages. Includes Spook (suspicious phrases)
and Yow (Zippy quotes).
@item crisp
Crisp/Brief emulation.
@item debug
GUD, gdb, dbx debugging support.
@item dictionary
Interface to RFC2229 dictionary servers.
@item dired
The DIRectory EDitor is for manipulating, and running commands on
files in a directory.
@item docbookide
DocBook editing support.
@item ecb
Emacs source code browser.
@item ecrypto
Crypto functionality in Emacs Lisp.
@item edebug
An Emacs Lisp debugger.
@item ediff
Interface over GNU patch.
@item edit-utils
Miscellaneous editor extensions, you probably need this.
@item edt
DEC EDIT/EDT emulation.
@item efs
Treat files on remote systems the same as local files.
@item eieio
Enhanced Implementation of Emacs Interpreted Objects.
@item elib
Portable Emacs Lisp utilities library.
@item emerge
Another interface over GNU patch.
@item erc
ERC is an Emacs InternetRelayChat client.
@item escreen
Multiple editing sessions withing a single frame (like screen).
@item eshell
Command shell implemented entirely in Emacs Lisp.
@item ess
ESS: Emacs Speaks Statistics.
@item eterm
Terminal emulation.
@item eudc
Emacs Unified Directory Client (LDAP, PH).
@item footnote
Footnoting in mail message editing modes.
@item forms
Forms editing support (obsolete, use Widget instead).
@item fortran-modes
Fortran support.
@item fortran-modes
Fortran language support.
@item frame-icon
Set up mode-specific icons for each frame under XEmacs.
@item fsf-compat
GNU Emacs compatibility files.
@item games
Tetris, Sokoban, and Snake.
@item general-docs
General documentation. Presently, empty.
@item gnats
XEmacs bug reports.
@item gnus
The Gnus Newsreader and Mailreader.
@item haskell-mode
Haskell editing support.
@item hm--html-menus
HTML editing.
@item hyperbole
Hyperbole: The Everyday Info Manager.
@item ibuffer
Advanced replacement for buffer-menu.
@item idlwave
Editing and Shell mode for the Interactive Data Language.
@item igrep
Enhanced front-end for Grep.
@item ilisp
Front-end for interacting with Inferior Lisp (external lisps).
@item ispell
Spell-checking with GNU ispell.
@item jde
Integrated Development Environment for Java.
@item liece
IRC (Internet Relay Chat) client for Emacs. Note, this package is
deprecated and will be removed, use riece instead.
@item mail-lib
Fundamental lisp files for providing email support.
@item mailcrypt
Support for messaging encryption with PGP.
@item mew
Messaging in an Emacs World; a MIME-based email program.
@item mh-e
The XEmacs Interface to the MH Mail System.
@item mine
Elisp implementation of the game 'Minehunt'.
@item misc-games
Other amusements and diversions.
@item mmm-mode
Support for Multiple Major Modes within a single buffer.
@item net-utils
Miscellaneous Networking Utilities.
@item ocaml
Objective Caml editing support.
@item oo-browser
OO-Browser: The Multi-Language Object-Oriented Code Browser.
@item ocaml
Objective Caml editing support.
@item os-utils
Miscellaneous single-file O/S utilities, for printing, archiving,
compression, remote shells, etc.
@item pc
PC style interface emulation.
@item pcl-cvs
CVS frontend.
@item pcomplete
Provides programmatic completion.
@item perl-modes
Perl support.
@item pgg
Emacs interface to various PGP implementations.
@item prog-modes
Support for various programming languages.
@item ps-print
Printing functions and utilities.
@item psgml
Validated HTML/SGML editing.
@item psgml-dtds
A collection of DTDs for psgml. Note that this package is deprecated
and will be removed in the future, most likely Q2/2003. Instead of using
this, you should install needed DTDs yourself.
@item python-modes
Python language support.
@item reftex
Emacs support for LaTeX cross-references, citations.
@item riece
IRC (Internet Relay Chat) client for Emacs.
@item rmail
An obsolete Emacs mailer. If you do not already use it don't start.
@item ruby-modes
Ruby support.
@item sasl
Simple Authentication and Security Layer (SASL) library.
@item scheme
Front-end support for Inferior Scheme.
@item semantic
Semantic bovinator (Yacc/Lex for XEmacs). Includes Senator.
@item sgml
SGML/Linuxdoc-SGML editing.
@item sh-script
Support for editing shell scripts.
@item sieve
Manage Sieve email filtering scripts.
@item slider
User interface tool.
@item sml-mode
SML editing support.
@item sounds-au
XEmacs Sun sound files.
@item sounds-wav
XEmacs Microsoft sound files.
@item speedbar
Provides a separate frame with convenient references.
@item strokes
Mouse enhancement utility.
@item supercite
An Emacs citation tool for News & Mail messages.
@item texinfo
XEmacs TeXinfo support.
@item text-modes
Miscellaneous support for editing text files.
@item textools
Miscellaneous TeX support.
@item time
Display time & date on the modeline.
@item tm
Emacs MIME support. Not needed for gnus >= 5.8.0.
@item tooltalk
Support for building with Tooltalk.
@item tpu
DEC EDIT/TPU support.
@item tramp
Remote shell-based file editing. This is similar to EFS or Ange-FTP,
but works with rsh/ssh and rcp/scp.
@item vc
Version Control for Free systems.
@item vc-cc
Version Control for ClearCase (UnFree) systems.
@item vhdl
Support for VHDL.
@item view-process
A Unix process browsing tool.
@item viper
VI emulation support.
@item vm
An Emacs mailer.
@item w3
A Web browser.
@item x-symbol
Semi WYSIWYG for LaTeX, HTML, etc, using additional fonts.
@item xemacs-base
Fundamental XEmacs support, you almost certainly need this.
@item xemacs-devel
XEmacs Lisp developer support. This package contains utilities for
supporting Lisp development. It is a single-file package so it may be
tailored.
@item xlib
Emacs interface to X server.
@item xslide
XSL editing support.
@item xslt-process
A minor mode for (X)Emacs which allows running an XSLT processor on a
buffer.
@item xwem
X Emacs Window Manager.
@item zenirc
ZENIRC IRC Client.
@end table
@subheading Mule Support (mule)
MULti-lingual Enhancement. Support for world scripts such as
Latin, Arabic, Cyrillic, Chinese, Japanese, Greek, Hebrew etc.
To use these packages your XEmacs must be compiled with Mule
support.
@table @asis
@item edict
MULE: Lisp Interface to EDICT, Kanji Dictionary.
@item egg-its
MULE: Wnn (4.2 and 6) support. SJ3 support.
@item latin-unity
MULE: find single ISO 8859 character set to encode a buffer.
@item latin-unity
Unify character sets in a buffer. When characters belong to disjoint
character sets, this attempts to translate the characters so
that they belong to one character set. If the buffer coding system is
not sufficient, this suggests different coding systems.
@item leim
MULE: Quail. All non-English and non-Japanese language support.
@item locale
MULE: Localized menubars and localized splash screens.
@item lookup
Dictionary support. (This isn't an English dictionary program)
@item mule-base
MULE: Basic Mule support, required for building with Mule.
@item mule-ucs
MULE: Extended coding systems (including Unicode) for XEmacs.
@item mule-ucs
Extended coding systems (including Unicode) for XEmacs.
@item skk
Another Japanese Language Input Method. Can be used without a
separate process running as a dictionary server.
@end table
@node Q1.7.3, Q1.7.4, Q1.7.2, Introduction
@unnumberedsubsec Q1.7.3: Do I need to have the packages to run XEmacs?
Strictly speaking, no. XEmacs will build and install just fine without
any packages installed. However, only the most basic editing functions
will be available with no packages installed, so installing packages is
an essential part of making your installed XEmacs _useful_.
@node Q1.7.4, Q1.8.1, Q1.7.3, Introduction
@unnumberedsubsec Q1.7.4: Is there a way to find which package has particular functionality?
If you want to find out which package contains the functionality you
are looking for, use @kbd{M-x package-get-package-provider}, and give it a
symbol that is likely to be in that package.
For example, if some code you want to use has a @code{(require 'thingatpt)}
in it:
@example
M-x package-get-package-provider RET thingatpt RET
@end example
which will return something like: @samp{(fsf-compat "1.08").}
@unnumberedsec 1.8: Internationalization
@node Q1.8.1, Q1.8.2, Q1.7.4, Introduction
@unnumberedsubsec Q1.8.1: What is the status of internationalization support aka MULE (including Asian language support)?
Both the stable and development versions of XEmacs include
internationalization support (aka MULE). MULE currently (21.4) works on
UNIX and Linux systems. It is possible to build with MULE on Windows
systems, but if you really need MULE on Windows, it is recommended that
you build and use the development (21.5) version, and deal with the
instability of the development tree. Binaries compiled without MULE
support run faster than MULE capable XEmacsen.
@node Q1.8.2, Q1.8.3, Q1.8.1, Introduction
@unnumberedsubsec Q1.8.2: How can I help with internationalization?
If you would like to help, you may want to join the
@email{xemacs-mule@@xemacs.org} mailing list. Especially needed are
people who speak/write languages other than English, who are willing to
use XEmacs/MULE regularly, and have some experience with Elisp.
Translations of the TUTORIAL and man page are welcome, and XEmacs does
support multilingual menus, but we have few current translations.
@xref{Q1.5.2, How do I become a Beta Tester?}.
@node Q1.8.3, Q1.8.4, Q1.8.2, Introduction
@unnumberedsubsec Q1.8.3: How do I type non-ASCII characters?
@xref{Q3.0.6, How can you type in special characters in XEmacs?}, in
part 3 of this FAQ, for some simple methods that also work in non-MULE
builds of XEmacs (but only for one-octet coded character sets, and
mostly for ISO 8859/1). Many of the methods available for Cyrillic
(@pxref{Q1.8.7, How about Cyrillic modes?}) work without MULE. MULE
has more general capabilities. @xref{Q1.8.5, Please explain the
various input methods in MULE/XEmacs}.
@xref{Q4.0.8, How do I display non-ASCII characters?}, which covers
display of non-ASCII characters.
@node Q1.8.4, Q1.8.5, Q1.8.3, Introduction
@unnumberedsubsec Q1.8.4: Can XEmacs messages come out in a different language?
The message-catalog support was written but is badly bit-rotted. XEmacs
20 and 21 did @emph{not} support it, and early releases of XEmacs 22
will not either.
However, menubar localization @emph{does} work. To enable it, add to
your @file{Emacs} file entries like this:
@example
Emacs*XlwMenu.resourceLabels: True
Emacs*XlwMenu.file.labelString: Fichier
Emacs*XlwMenu.openInOtherWindow.labelString: In anderem Fenster oeffnen
@end example
The name of the resource is derived from the non-localized entry by
removing punctuation and capitalizing as above.
@node Q1.8.5, Q1.8.6, Q1.8.4, Introduction
@unnumberedsubsec Q1.8.5: Please explain the various input methods in MULE/XEmacs
Mule supports a wide variety of input methods. There are three basic
classes: Lisp implementations, generic platform support, and library
interfaces.
@emph{Lisp implementations} include Quail, which provides table-driven input
methods for almost all the character sets that Mule supports (including
all of the ISO 8859 family, the Indic languages, Thai, and so on), and
SKK, for Japanese. (SKK also supports an interface to an external
"dictionary server" process.) Quail supports both typical "dead-key"
methods (eg, in the "latin-1-prefix" method, @kbd{" a} produces , LATIN
SMALL LETTER A WITH DIAERESIS), and the complex dictionary-based phonetic
methods used for Asian ideographic languages like Chinese.
Lisp implementations can be less powerful (but they are not perceptibly
inefficient), and of course are not portable to non-Emacs applications.
The incompatibility can be very annoying. On the other hand, they
require no special platform support or external libraries, so if you can
display the characters, Mule can input them for you and you can edit,
anywhere.
@emph{Generic platform support} is currently limited to the X Input
Method (XIM) framework, although support for MSIME (for MS Windows) is
planned, and IIIMF (Sun's Internet-Intranet Input Method Framework)
support is extremely desirable. XIM is enabled at build time by use of
the @samp{--with-xim} flag to @code{configure}. For use of XIM, see
your platform documentation. However, normally the input method you use
is specified via the @samp{LANG} and @samp{XMODIFIERS} environment
variables.
Of course, input skills are portable across most applications. However,
especially in modern GUI systems the habit of using bucky bits has
fallen into sad disuse, and many XIM systems are poorly configured for
use with Emacs. For example, the kinput2 input manager (a separate
process providing an interface between Japanese dictionary servers such
as Canna and Wnn, and the application) tends to gobble up keystrokes
generating Meta characters. This means that to edit while using an XIM
input method, you must toggle the input method off every time you want
to use @kbd{M-f}. Your mileage may vary.
@emph{Library interfaces} are most common for Japanese, although Wnn
supports Chinese (traditional and simplified) and Korean. There are
Chinese and Korean input servers available, but we do not know of any
patches for XEmacs to use them directly. You can use them via
IM-enabled terminals, by manipulating the terminal coding systems. We
describe only the Japanese-oriented systems here. The advantage of
these systems is that they are very powerful, and on platforms where
they are available there is typically a wide range of applications that
support them. Thus your input skills are portable across applications.
Mule provides built-in interfaces to the following input methods: Wnn4,
Wnn6, Canna, and SJ3. These can be configured at build time. There are
patches available (no URL, sorry) to support the SKK server, as well.
Wnn and SJ3 use the @code{egg} user interface. The interface for Canna
is specialized to Canna.
Wnn supports Japanese, Chinese and Korean. It is made by OMRON and Kyto
University. It is a powerful and complex system. Wnn4 is free and Wnn6
is not. Wnn uses grammatical hints and probability of word association,
so in principle Wnn can be cleverer than other methods.
Canna, made by NEC, supports only Japanese. It is a simple and powerful
system. Canna uses only grammar, but its grammar and dictionary are
quite sophisticated. So for standard modern Japanese, Canna seems
cleverer than Wnn4. In addition, the UNIX version of Canna is free (now
there is a Microsoft Windows version).
SJ3, by Sony, supports only Japanese.
Egg consists of following parts:
@enumerate
@item
Input character Translation System (ITS) layer.
It translates ASCII inputs to Kana/PinYin/Hangul characters.
@item
Kana/PinYin/Hangul to Kanji transfer layer.
The interface layer to network Kana-Kanji server (Wnn and Sj3).
@end enumerate
These input methods are modal. They have a raw (alphabet) mode, a
phonetic input mode, and Kana-Kanji transfer mode. However there are
mode-less input methods for Egg and Canna. @samp{boiled-egg} is a
mode-less input method running on Egg. For Canna, @samp{canna.el} has a
tiny boiled-egg-like command, @code{(canna-boil)}, and there are some
boiled-egg-like utilities.
Much of this information was provided by @email{morioka@@jaist.ac.jp,
MORIOKA Tomohiko}.
@node Q1.8.6, Q1.8.7, Q1.8.5, Introduction
@unnumberedsubsec Q1.8.6: How do I portably code for MULE/XEmacs?
MULE has evolved rapidly over the last few years, and the original third
party patch (for GNU Emacs 19), GNU Emacs 20+, and XEmacs 20+ have quite
different implementations. The APIs also vary although recent versions
of XEmacs have tended to converge to the GNU Emacs standard.
MULE implementations are going to continue to evolve. Both GNU Emacs
and XEmacs are working hard on Unicode support, which will involve new
APIs and probably variations on old ones. For XEmacs 22, the old ISO
2022-based system for recognizing encodings will be replaced by a much
more flexible system, which should improve accuracy of automatic coding
detections, but will also involve new APIs.
@email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} writes:
@quotation
The application implementor must write separate code for these mule
variants. [Please don't hesitate to report these variants to us; they
are not, strictly speaking, bugs, but they give third-party developers
the same kind of creepy-crawly feeling. We'll do what we can. -- Ed.]
MULE and the next version of Emacs are similar but the symbols are very
different---requiring separate code as well.
Namely we must support 3 kinds of mule variants and 4 or 5 or 6 kinds of
emacs variants... (;_;) I'm shocked, so I wrote a wrapper package called
@code{emu} to provide a common interface. [There is an XEmacs package
of APEL which provides much more comprehensive coverage. Be careful,
however; APEL has problems of its own. -- Ed.]
I have the following suggestions about dealing with mule variants:
@itemize @bullet
@item
@code{(featurep 'mule)} @code{t} on all mule variants
@item
@code{(boundp 'MULE)} is @code{t} on only MULE. Maybe the next version
of Emacs will not have this symbol.
@item
MULE has a variable @code{mule-version}. Perhaps the next version of
Emacs will have this variable as well.
@end itemize
Following is a sample to distinguish mule variants:
@lisp
(if (featurep 'mule)
(cond ((boundp 'MULE)
;; for original Mule
)
((string-match "XEmacs" emacs-version)
;; for XEmacs with Mule
)
(t
;; for next version of Emacs
))
;; for old emacs variants
)
@end lisp
@end quotation
@node Q1.8.7, Q1.8.8, Q1.8.6, Introduction
@unnumberedsubsec Q1.8.7: How about Cyrillic modes?
@email{ilya@@math.ohio-state.edu, Ilya Zakharevich} writes:
@quotation
There is a cyrillic mode in the file @file{mysetup.zip} in
@iftex
@*
@end iftex
@uref{ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs/}. This is a
modification to @email{ava@@math.jhu.ed, Valery Alexeev's} @file{russian.el}
which can be obtained from
@end quotation
@uref{http://www.math.uga.edu/~valery/russian.el}.
@email{d.barsky@@ee.surrey.ac.uk, Dima Barsky} writes:
@quotation
There is another cyrillic mode for both GNU Emacs and XEmacs by
@email{manin@@camelot.mssm.edu, Dmitrii
(Mitya) Manin} at
@iftex
@end iftex
@uref{http://kulichki-lat.rambler.ru/centrolit/manin/cyr.el}.
@c Link above, <URL:http://camelot.mssm.edu/~manin/cyr.el> was dead.
@c Changed to russian host instead
@end quotation
@email{rebecca.ore@@op.net, Rebecca Ore} writes:
@quotation
The fullest resource I found on Russian language use (in and out of
XEmacs) is @uref{http://www.ibiblio.org/sergei/Software/Software.html}
@end quotation
@node Q1.8.8, Q1.8.9, Q1.8.7, Introduction
@unnumberedsubsec Q1.8.8: Does XEmacs support Unicode?
To get Unicode support, you need a Mule-enabled XEmacs.
21.5 has internal support for Unicode and supports it fully, although we
don't yet use it as the internal encoding.
21.4 supports Unicode partially -- as an external encoding for files,
processes, and terminals, but without font support. @xref{Q1.8.9, How
does XEmacs display Unicode?}. To get Unicode support in 21.4,
install Mule-UCS from packages in the usual way, and put
@example
(require 'un-define)
(set-coding-priority-list '(utf-8))
(set-coding-category-system 'utf-8 'utf-8)
@end example
in your init file to enable the UTF-8 coding system. You may wish to
view the documentation of @code{set-coding-priority-list} if you find
that files that are not UTF-8 are being mis-recognized as UTF-8.
Install standard national fonts (not Unicode fonts) for all character
sets you use. @xref{Q1.8.9, How does XEmacs display Unicode??}.
Mule-UCS also supports 16-bit forms of Unicode (UTF-16). It does not
support 31-bit forms of Unicode (UTF-32 or UCS-4).
@node Q1.8.9, , Q1.8.8, Introduction
@unnumberedsubsec Q1.8.9: How does XEmacs display Unicode?
Mule doesn't have a Unicode charset internally, so there's nothing to
bind a Unicode registry to. It would not be straightforward to create,
either, because Unicode is not ISO 2022-compatible. You'd have to
translate it to multiple 96x96 pages.
This means that Mule-UCS uses ordinary national fonts for display. This
is not really a problem, except for those languages that use the Unified
Han characters. The problem here is that Mule-UCS maps from Unicode
code points to national character sets in a deterministic way. By
default, this means that Japanese fonts are tried first, then Chinese,
then Korean. To change the priority ordering, use the command
`un-define-change-charset-order'.
It also means you can't use Unicode fonts directly, at least not without
extreme hackery. You can run -nw with (set-terminal-coding-system
'utf-8) if you really want a Unicode font for some reason.
Real Unicode support will be introduced in XEmacs 22.0.
@node Installation, Editing, Introduction, Top
@unnumbered 2 Installation and Troubleshooting
This is part 2 of the XEmacs Frequently Asked Questions list. This
section is devoted to Installation, Maintenance and Troubleshooting.
@menu
2.0: Installation (General)
* Q2.0.1:: How do I build and install XEmacs?
* Q2.0.2:: Where do I find external libraries?
* Q2.0.3:: How do I specify the paths that XEmacs uses for finding files?
* Q2.0.4:: Running XEmacs without installing
* Q2.0.5:: XEmacs is too big
2.1: Package Installation
* Q2.1.1:: How do I install the packages?
* Q2.1.2:: Can I install the packages individually?
* Q2.1.3:: Can I install the packages automatically?
* Q2.1.4:: Can I upgrade or remove packages?
* Q2.1.5:: Which packages to install?
* Q2.1.6:: Can you describe the package location process in more detail?
* Q2.1.7:: EFS fails with "500 AUTH not understood"
2.2: Unix/Mac OS X Installation (Also Relevant to Cygwin, MinGW)
* Q2.2.1:: Libraries in non-standard locations
* Q2.2.2:: Why can't I strip XEmacs?
* Q2.2.3:: X11/bitmaps/gray (or other X11-related file) not found.
2.3: Windows Installation (Windows, Cygwin, MinGW)
* Q2.3.1:: What exactly are all the different ways to build XEmacs under Windows?
* Q2.3.2:: What compiler/libraries do I need to compile XEmacs?
* Q2.3.3:: How do I compile the native port?
* Q2.3.4:: What do I need for Cygwin?
* Q2.3.5:: How do I compile under Cygwin?
* Q2.3.6:: How do I compile using MinGW (aka @samp{the -mno-cygwin flag to gcc})?
* Q2.3.7:: How do I compile with X support?
* Q2.3.8:: Cygwin XEmacs won't start -- cygXpm-noX4.dll was not found (NEW)
2.4: General Troubleshooting
* Q2.4.1:: How do I deal with bugs or with problems building, installing, or running?
* Q2.4.2:: Help! XEmacs just crashed on me!
* Q2.4.3:: XEmacs crashes and I compiled it myself.
* Q2.4.4:: How to debug an XEmacs problem with a debugger
* Q2.4.5:: I get a cryptic error message when trying to do something.
* Q2.4.6:: XEmacs hangs when I try to do something.
* Q2.4.7:: I get an error message when XEmacs is running in batch mode.
* Q2.4.8:: The keyboard or mouse is not working properly, or I have some other event-related problem.
* Q2.4.9:: @kbd{C-g} doesn't work for me. Is it broken?
* Q2.4.10:: How do I debug process-related problems?
* Q2.4.11:: XEmacs is outputting lots of X errors.
* Q2.4.12:: After upgrading, XEmacs won't do `foo' any more!
2.5: Startup-Related Problems
* Q2.5.1:: XEmacs cannot connect to my X Terminal!
* Q2.5.2:: Startup problems related to paths or package locations.
* Q2.5.3:: XEmacs won't start without network.
* Q2.5.4:: Startup warnings about deducing proper fonts?
* Q2.5.5:: Warnings from incorrect key modifiers.
* Q2.5.6:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed?
* Q2.5.7:: XEmacs issues messages about ``auto-autoloads already loaded.''
@end menu
@unnumberedsec 2.0: Installation (General)
@node Q2.0.1, Q2.0.2, Installation, Installation
@unnumberedsubsec Q2.0.1: How do I build and install XEmacs?
See the file @file{etc/NEWS} for information on new features and other
user-visible changes since the last version of XEmacs.
The file @file{INSTALL} in the top-level directory says how to bring
up XEmacs on Unix and Cygwin, once you have loaded the entire subtree
of this directory.
See the file @file{nt/README} for instructions on building XEmacs for
Microsoft Windows.
@xref{Q2.1.1}, for the installation of (essential) add on packages.
@node Q2.0.2, Q2.0.3, Q2.0.1, Installation
@unnumberedsubsec Q2.0.2: Where do I find external libraries?
All external libraries used by XEmacs can be found on the XEmacs web
site
@iftex
@*
@end iftex
@uref{http://www.xemacs.org/Download/optLibs.html}.
The library versions available here are known to work with XEmacs.
(Newer versions will probably work as well but we can't guarantee it.)
We try to keep the libraries up-to-date but may not always succeed.
Check the above page for the canonical locations of the external libraries,
allowing you to download the latest, bleeding-edge versions.
@node Q2.0.3, Q2.0.4, Q2.0.2, Installation
@unnumberedsubsec Q2.0.3: How do I specify the paths that XEmacs uses for finding files?
You can specify what paths to use by using a number of different flags
when running configure. See the section MAKE VARIABLES in the top-level
file INSTALL in the XEmacs distribution for a listing of those flags.
Most of the time, however, the simplest fix is: @strong{do not} specify
paths as you might for GNU Emacs. XEmacs can generally determine the
necessary paths dynamically at run time. The only path that generally
needs to be specified is the root directory to install into. That can
be specified by passing the @code{--prefix} flag to configure. For a
description of the XEmacs install tree, please consult the @file{NEWS}
file.
@node Q2.0.4, Q2.0.5, Q2.0.3, Installation
@unnumberedsubsec Q2.0.4: Running XEmacs without installing
How can I just try XEmacs without installing it?
XEmacs will run in place without requiring installation and copying of
the Lisp directories, and without having to specify a special build-time
flag. It's the copying of the Lisp directories that requires so much
space. XEmacs is largely written in Lisp.
A good method is to make a shell alias for xemacs:
@example
alias xemacs=/src/xemacs-21.5/src/xemacs
@end example
(You will obviously use whatever directory you downloaded the source
tree to instead of @file{/src/xemacs-21.5}).
This will let you run XEmacs without massive copying.
@node Q2.0.5, Q2.1.1, Q2.0.4, Installation
@unnumberedsubsec Q2.0.5: XEmacs is too big
The space required by the installation directories can be
reduced dramatically if desired. Gzip all the .el files. Remove all
the packages you'll never want to use. Remove the TexInfo manuals.
Remove the Info (and use just hardcopy versions of the manual). Remove
most of the stuff in etc. Remove or gzip all the source code. Gzip or
remove the C source code. Configure it so that copies are not made of
the support lisp.
These are all Emacs Lisp source code and bytecompiled object code. You
may safely gzip everything named *.el here. You may remove any package
you don't use. @emph{Nothing bad will happen if you delete a package
that you do not use}. You must be sure you do not use it though, so be
conservative at first.
Any package with the possible exceptions of xemacs-base, and EFS are
candidates for removal. Ask yourself, @emph{Do I ever want to use this
package?} If the answer is no, then it is a candidate for removal.
First, gzip all the .el files. Then go about package by package and
start gzipping the .elc files. Then run XEmacs and do whatever it is
you normally do. If nothing bad happens, then remove the package. You
can remove a package via the PUI interface
(@code{M-x pui-list-packages}, then press @kbd{d} to mark the packages
you wish to delete, and then @kbd{x} to delete them.
Another method is to do @code{M-x package-get-delete-package}.
@unnumberedsec 2.1: Package Installation
@node Q2.1.1, Q2.1.2, Q2.0.5, Installation
@unnumberedsubsec Q2.1.1: How do I install the packages?
There are three ways to install the packages.
@enumerate
@item
Manually, all at once, using the 'Sumo Tarball'.
@item
Manually, using individual package tarballs.
@item
Automatically, using the package tools from XEmacs.
@end enumerate
If you don't want to mess with the packages, it is easiest to just
grab them manually, all at once. (For the other two ways,
@xref{Q2.1.2}, and @xref{Q2.1.3}.) Download the file
@file{xemacs-sumo.tar.gz}
For an XEmacs compiled with Mule you also need
@file{xemacs-mule-sumo.tar.gz}
These are in the @file{packages} directory on your XEmacs mirror
archive: @uref{ftp://ftp.xemacs.org/pub/xemacs/packages} or its
mirrors. N.B. They are called 'Sumo Tarballs' for good reason. They
are currently about 19MB and 4.5MB (gzipped) respectively.
Install them on Unix and Mac OS X using the shell/Terminal command
@code{cd $prefix/lib/xemacs ; gunzip -c <tarballname> | tar xf -}
Where @samp{$prefix} is what you gave to the @samp{--prefix} flag to
@file{configure}, and defaults to @file{/usr/local}.
If you have GNU tar you can use:
@code{cd $prefix/lib/xemacs ; tar zxvf <tarballname>}
If you have the packages somewhere nonstandard and don't want to bother
with @samp{$prefix} (for example, you're a developer and are compiling
the packages yourself, and want your own private copy of everything),
you can also directly specify this using @file{configure}. To do this
with 21.5 and above use the @samp{--with-package-prefix} parameter to
specify the directory under which you untarred the above tarballs.
Under 21.4 and previous you need to use @samp{--package-path}. Using
these options looks something like this:
@example
configure --package-path="~/.xemacs::/src/xemacs/site-packages:/src/xemacs/xemacs-packages:/src/xemacs/mule-packages" ...
@end example
Under Windows, you need to place the above @samp{tar.gz} files in the
directory specified using the @samp{PACKAGE_PREFIX} value in
@file{nt/config.inc} and by default is @file{\Program Files\XEmacs}.
(To untar a @samp{tar.gz} file you will need to use a utility such as
WinZip, unless you have Cygwin or a similar environment installed, in
which case the above Unix shell command should work fine.) If you want
the packages somewhere else, just change @samp{PACKAGE_PREFIX}.
Note that XEmacs finds the packages automatically anywhere underneath
the directory tree where it expects to find the packages. All you
need to do is put stuff there; you don't need to run any program to
tell XEmacs to find the packges, or do anything of that sort.
However, XEmacs will only notice newly installed packages when it
starts up, so you will have to restart if you are already running
XEmacs.
For more details, @xref{Startup Paths,,,xemacs, the XEmacs User's
Manual}, and @xref{Packages,,,xemacs, the XEmacs User's Manual}.
As the Sumo tarballs are not regenerated as often as the individual
packages, it is recommended that you use the automatic package tools
afterwards to pick up any recent updates.
@emph{NOTE}: For detailed information about how the package
hierarchies work, @xref{Package Overview,,,lispref, the XEmacs Lisp
Reference Manual}.
@node Q2.1.2, Q2.1.3, Q2.1.1, Installation
@unnumberedsubsec Q2.1.2: Can I install the packages individually?
Yes, you can download individual packages from the FTP site (@pxref{Q2.1.1}). Since packages are automatically noticed at startup, you just have to put them in the right place.
Note: If you are upgrading packages already installed, it's best to
remove the old package first (@pxref{Q2.1.4}).
For example if we are installing the @samp{xemacs-base}
package (version 1.48):
@example
mkdir $prefix/lib/xemacs/xemacs-packages RET # if it does not exist yet
cd $prefix/lib/xemacs/xemacs-packages RET
gunzip -c /path/to/xemacs-base-1.48-pkg.tar.gz | tar xvf - RET
@end example
Or if you have GNU tar, the last step can be:
@example
tar zxvf /path/to/xemacs-base-1.48-pkg.tar.gz RET
@end example
For MULE related packages, it is best to untar into the @samp{mule-packages}
hierarchy, i.e. for the @samp{mule-base} package, version 1.37:
@example
mkdir $prefix/lib/xemacs/mule-packages RET # if it does not exist yet
cd $prefix/lib/xemacs/mule-packages RET
gunzip -c /path/to/mule-base-1.37-pkg.tar.gz | tar xvf - RET
@end example
Or if you have GNU tar, the last step can be:
@example
tar zxvf /path/to/mule-base-1.37-pkg.tar.gz RET
@end example
@node Q2.1.3, Q2.1.4, Q2.1.2, Installation
@unnumberedsubsec Q2.1.3: Can I install the packages automatically?
XEmacs comes with some tools to make the periodic updating and
installing easier. It will notice if new packages or versions are
available and will fetch them from the FTP site.
Unfortunately this requires that a few packages are already in place.
You will have to install them by hand as above or use a SUMO tarball.
This requirement will hopefully go away in the future. The packages
you need are:
@example
efs - To fetch the files from the FTP site or mirrors.
xemacs-base - Needed by efs.
@end example
and optionally:
@example
mailcrypt - For PGP verification of the package-index file.
@end example
After installing these by hand, fire up XEmacs and follow these
steps.
@enumerate
@item
Choose a download site.
@itemize @bullet
@item
via menu: Tools -> Packages -> Set Download Site
@item
via keyb: M-x customize-variable RET package-get-remote RET
(put in the details of remote host and directory)
@end itemize
If the package tarballs _AND_ the package-index file are in a
local directory, you can: M-x pui-set-local-package-get-directory RET
@item
Obtain a list of packages and display the list in a buffer named
"*Packages*".
@itemize @bullet
@item
menu: Tools -> Packages -> List & Install
@item
keyb: M-x pui-list-packages RET
@end itemize
XEmacs will now connect to the remote site and download the
latest package-index file.
The resulting buffer, "*Packages*" has brief instructions at the
end of the buffer.
@item
Choose the packages you wish to install.
@itemize @bullet
@item
mouse: Click button 2 on the package name.
@item
keyb: RET on the package name
@end itemize
@item
Make sure you have everything you need.
@itemize @bullet
@item
menu: Packages -> Add Required
@item
keyb: r
@end itemize
XEmacs will now search for packages that are required by the
ones that you have chosen to install and offer to select
those packages also.
For novices and gurus alike, this step can save your bacon.
It's easy to forget to install a critical package.
@item
Download and install the packages.
@itemize @bullet
@item
menu: Packages -> Install/Remove Selected
@item
keyb: x
@end itemize
@end enumerate
@node Q2.1.4, Q2.1.5, Q2.1.3, Installation
@unnumberedsubsec Q2.1.4: Can I upgrade or remove packages?
As the exact files and their locations contained in a package may
change it is recommended to remove a package first before installing a
new version. In order to facilitate removal each package contains an
pgkinfo/MANIFEST.pkgname file which list all the files belong to the
package. M-x package-admin-delete-binary-package RET can be used to
remove a package using this file.
Note that the interactive package tools included with XEmacs already do
this for you.
@node Q2.1.5, Q2.1.6, Q2.1.4, Installation
@unnumberedsubsec Q2.1.5: Which packages to install?
Unless you are an advanced user, just install everything.
If you really want to install only what's absolutely needed, a good
minimal set of packages for XEmacs-latin1 would be
@example
xemacs-base, xemacs-devel, c-support, cc-mode, debug, dired, efs,
edit-utils, fsf-compat, mail-lib, net-utils, os-utils, prog-modes,
text-modes, time, mailcrypt
@end example
If you are using the XEmacs package tools, don't forget to do:
@example
Packages -> Add Required
@end example
To make sure you have everything that the packages you have chosen to
install need.
@xref{Q1.7.2}, for a description of the various packages.
@node Q2.1.6, Q2.1.7, Q2.1.5, Installation
@unnumberedsubsec Q2.1.6: Can you describe the package location process in more detail?
On startup XEmacs looks for packages in so-called package hierarchies.
Normally, there are three system wide hierarchies, like this:
@example
$prefix/lib/xemacs/xemacs-packages/
Normal packages go here.
$prefix/lib/xemacs/mule-packages/
Mule packages go here and are only searched by MULE-enabled XEmacsen.
$prefix/lib/xemacs/site-packages/
Local and 3rd party packages go here.
@end example
This is what you get when you untar the SUMO tarballs under
@file{$prefix/lib/xemacs}.
@file{$prefix} is specified using the @samp{--prefix} parameter to
@file{configure}, and defaults to @file{usr/local}.
If the package path is not explicitly specified, XEmacs looks for the
package directory @file{xemacs-packages} (and @file{mule-packages} and
@file{site-packages}) first under @samp{~/.xemacs}, then for a sister
directory @file{lib/xemacs-VERSION} of the directory in which the
XEmacs executable is located, then for a sister directory
@file{lib/xemacs}. The XEmacs executable (under Unix at least) is
installed by default in @file{/usr/local/bin}; this explains why
XEmacs in its default installation will find packages that you put
under @file{/usr/local/lib/xemacs}.
You can specify where exactly XEmacs looks for packages by using the
@samp{--with-package-prefix} or @samp{--with-package-path} parameters to
@file{configure} (or the equivalent settings in @file{config.inc}, under
Windows), or setting the @samp{EMACSPACKAGEPATH} environment variable
(which has the same format as @samp{--with-package-path}). @xref{Q2.1.1}.
See @file{configure.usage} for more info about the format of these
@file{configure} parameters.
In addition to the system wide packages, each user can have his own
packages installed under @file{~/.xemacs/}. If you want to install
packages there using the interactive tools, you need to set
@code{package-get-install-to-user-init-directory} to @code{t}.
The site-packages hierarchy replaces the old @file{site-lisp}
directory. XEmacs no longer looks into a @file{site-lisp} directly by
default. A good place to put @file{site-start.el} would be in
@file{$prefix/lib/xemacs/site-packages/lisp/}.
@node Q2.1.7, Q2.2.1, Q2.1.6, Installation
@unnumberedsubsec Q2.1.7: EFS fails with "500 AUTH not understood" (NEW)
A typical error: FTP Error: USER request failed; 500 AUTH not understood.
Thanks to giacomo boffi @email{giacomo.boffi@@polimi.it} who recommends
on comp.emacs.xemacs:
tell your ftp client to not attempt AUTH authentication (or do not
use FTP servers that don't understand AUTH)
and notes that you need to add an element (often "-u") to
`efs-ftp-program-args'. Use M-x customize-variable, and verify the
needed flag with `man ftp' or other local documentation.
@unnumberedsec 2.2: Unix/Mac OS X Installation (Also Relevant to Cygwin, MinGW)
@node Q2.2.1, Q2.2.2, Q2.1.7, Installation
@unnumberedsubsec Q2.2.1: Libraries in non-standard locations
If your libraries are in a non-standard location, you can specify the location
using the following flags to @file{configure}. Under 21.4 or earlier:
@example
--site-libraries=WHATEVER
--site-includes=WHATEVER
@end example
Under 21.5 or later:
@example
--with-site-libraries=WHATEVER
--with-site-includes=WHATEVER
@end example
If you have multiple paths to specify, use the following syntax:
@example
--site-libraries='/path/one /path/two /path/etc'
@end example
If the libraries and headers reside in the directories @samp{lib} and
@samp{include} of a common root (say @samp{/sw}) then both can be
specified with a single option:
@example
--site-prefixes=WHATEVER
@end example
or for 21.5:
@example
--with-site-prefixes=WHATEVER
@end example
@node Q2.2.2, Q2.2.3, Q2.2.1, Installation
@unnumberedsubsec Q2.2.2: Why can't I strip XEmacs?
@email{cognot@@fronsac.ensg.u-nancy.fr, Richard Cognot} writes:
@quotation
Because of the way XEmacs (and every other Emacsen, AFAIK) is built. The
link gives you a bare-boned emacs (called temacs). temacs is then run,
preloading some of the lisp files. The result is then dumped into a new
executable, named xemacs, which will contain all of the preloaded lisp
functions and data.
Now, during the dump itself, the executable (code+data+symbols) is
written on disk using a special unexec() function. This function is
obviously heavily system dependent. And on some systems, it leads to an
executable which, although valid, cannot be stripped without damage. If
memory serves, this is especially the case for AIX binaries. On other
architectures it might work OK.
The Right Way to strip the emacs binary is to strip temacs prior to
dumping xemacs. This will always work, although you can do that only if
you install from sources (as temacs is @file{not} part of the binary
kits).
@end quotation
@email{nat@@nataa.fr.eu.org, Nat Makarevitch} writes:
@quotation
Here is the trick:
@enumerate
@item
[ ./configure; make ]
@item
rm src/xemacs
@item
strip src/temacs
@item
make
@item
cp src/xemacs /usr/local/bin/xemacs
@item
cp lib-src/DOC-19.16-XEmacs
@iftex
\ @*
@end iftex
/usr/local/lib/xemacs-19.16/i586-unknown-linuxaout
@end enumerate
@end quotation
@node Q2.2.3, Q2.3.1, Q2.2.2, Installation
@unnumberedsubsec Q2.2.3: X11/bitmaps/gray (or other X11-related file) not found.
The X11R6 distribution was monolithic, but the X11R7 distribution is
much more modular. Many OS distributions omit these bitmaps (assuming
nobody uses them, evidently). Your OS distribution should have a
developer's package containing these files, probably with a name
containing the string "bitmap". Known package names (you may need to
add an extension such as .deb or .rpm) include x11/xbitmaps (Ubuntu)
and xorg-x11-xbitmaps (Fedora Core 5).
@unnumberedsec 2.3: Windows Installation (Windows, Cygwin, MinGW)
@node Q2.3.1, Q2.3.2, Q2.2.3, Installation
@unnumberedsubsec Q2.3.1: What exactly are all the different ways to build XEmacs under Windows?
XEmacs can be built in several ways in the MS Windows environment.
The standard way is what we call the "native" port. It uses the Win32
API and has no connection with X whatsoever -- it does not require X
libraries to build, nor does it require an X server to run. The native
port is the most reliable version and provides the best graphical
support. Almost all development is geared towards this version, and
there is little reason not to use it.
The second way to build is the Cygwin port. It takes advantage of
Cygnus emulation library under Win32. @xref{Q1.2.5, What are Cygwin
and MinGW, and do I need them to run XEmacs?}, for more information.
A third way is the MinGW port. It uses the Cygwin environment to
build but does not require it at runtime. @xref{Q1.2.5, What are
Cygwin and MinGW, and do I need them to run XEmacs?}, for more
information.
Finally, you might also be able to build the non-Cygwin, non-MinGW "X"
port. This was actually the first version of XEmacs that ran under MS
Windows, and although the code is still in XEmacs, it's essentially
orphaned and it's unlikely it will compile without a lot of work. If
you want an MS Windows versin of XEmacs that supports X, use the Cygwin
version. (The X support there is actively maintained, so that Windows
developers can test the X support in XEmacs.)
@node Q2.3.2, Q2.3.3, Q2.3.1, Installation
@unnumberedsubsec Q2.3.2: What compiler/libraries do I need to compile XEmacs?
You need Visual C++ 4.2, 5.0, or 6.0 for the native version. (We have
some beta testers currently trying to compile with VC.NET, aka version
7.0, but we can't yet report complete success.) For the Cygwin and
MinGW versions, you need the Cygwin environment, which comes with GCC,
the compiler used for those versions. @xref{Q1.2.5, What are Cygwin
and MinGW, and do I need them to run XEmacs?}, for more information on
Cygwin and MinGW.
@node Q2.3.3, Q2.3.4, Q2.3.2, Installation
@unnumberedsubsec Q2.3.3: How do I compile the native port?
Please read the file @file{nt/README} in the XEmacs distribution, which
contains the full description.
@node Q2.3.4, Q2.3.5, Q2.3.3, Installation
@unnumberedsubsec Q2.3.4: What do I need for Cygwin?
You can find the Cygwin tools and compiler at:
@uref{http://www.cygwin.com/}
Click on the @samp{Install or update now!} link, which will download a
file @file{setup.exe}, which you can use to download everything
else. (You will need to pick a mirror site; @samp{mirrors.rcn.net} is
probably the best.) You should go ahead and install everything --
you'll get various ancillary libraries that XEmacs needs or likes,
e.g. XPM, PNG, JPEG, TIFF, etc. You can also get X Windows here, if you
want to compile under X.
If you want to compile without X, you will need the @file{xpm-nox}
library, which must be specifically selected in the Cygwin netinstaller;
it is not selected by default. The package has had various names.
Currently it is called @file{cygXpm-noX4.dll}.
@node Q2.3.5, Q2.3.6, Q2.3.4, Installation
@unnumberedsubsec Q2.3.5: How do I compile under Cygwin?
Similar as on Unix; use the usual `configure' and `make' process.
Some problems to watch out for:
@itemize @bullet
@item
make sure HOME is set. This controls where you
@file{init.el} file comes from;
@item
@samp{CYGWIN} needs to be set to @samp{tty} for process support to work;
@item
picking up some other grep or other UNIX-like tools can kill configure;
@item
static heap too small, adjust @file{src/sheap-adjust.h} to a more positive
number;
@item
(Unconfirmed) The Cygwin version doesn't understand
@file{//machine/path} type paths so you will need to manually mount a
directory of this form under a unix style directory for a build to work
on the directory;
@item
If you're building @strong{WITHOUT} X11, don't forget to change symlinks
@file{/usr/lib/libXpm.a} and @file{/usr/lib/libXpm.dll.a} to point to
the non-X versions of these libraries. By default they point to the X
versions. So:
@example
/usr/lib/libXpm.a -> /usr/lib/libXpm-noX.a
/usr/lib/libXpm.dll.a -> /usr/lib/libXpm-noX.dll.a
@end example
(This advice may now be obsolete because of the availability of the
cygXpm-noX4.dll package from Cygwin. Send confirmation to
@email{faq@@xemacs.org}.)
@item
Other problems are listed in the @file{PROBLEMS} file, in the top-level
directory of the XEmacs sources.
@end itemize
@node Q2.3.6, Q2.3.7, Q2.3.5, Installation
@unnumberedsubsec Q2.3.6: How do I compile using MinGW (aka @samp{the -mno-cygwin flag to gcc})?
Similar to the method for Unix. Things to remember:
@itemize @bullet
@item
Specify the target host on the command line for @file{./configure}, e.g.
@samp{./configure i586-pc-mingw32}.
@item
Be sure that your build directory is mounted such that it has the
same path either as a cygwin path (@file{/build/xemacs}) or as a Windows
path (@file{c:\build\xemacs}).
@item
Build @samp{gcc -mno-cygwin} versions of the extra libs, i.e. @file{libpng},
@file{compface}, etc.
@item
Specify the target location of the extra libs on the command line
to @file{configure}, e.g.for 21.4 or earlier
@samp{./configure --site-prefixes=/build/libs i586-pc-mingw32} and for
21.5 or later
@samp{./configure --with-site-prefixes=/build/libs i586-pc-mingw32}.
@end itemize
@node Q2.3.7, Q2.3.8, Q2.3.6, Installation
@unnumberedsubsec Q2.3.7: How do I compile with X support?
To compile under Cygwin, all you need to do is install XFree86, which
is available as part of the standard Cygwin installation.
@uref{http://www.cygwin.com/}. Once installed, @file{configure}
should automatically find the X libraries and compile with X support.
As noted above, the non-Cygwin X support is basically orphaned, and
probably won't work. But if it want to try, it's described in
@file{nt/README} in some detail. Basically, you need to get X11
libraries from @uref{http://ftp.x.org}, and compile them. If the
precompiled versions are available somewhere, we don't know of it.
@node Q2.3.8, Q2.4.1, Q2.3.7, Installation
@unnumberedsubsec Q2.3.8: Cygwin XEmacs won't start -- cygXpm-noX4.dll was not found (NEW)
The Cygwin binary distributed with the netinstaller uses an external DLL
to handle XPM images (such as toolbar buttons). You may get an error like
@example
This application has failed to start because cygXpm-noX4.dll was not found.
Re-installing the application may fix this problem.
@end example
Andy Piper <andy@@xemacs.org> sez:
@example
cygXpm-noX4 is part of the cygwin distribution under libraries or
graphics, but is not installed by default. You need to run the
cygwin setup again and select this package.
@end example
Ie, reinstalling XEmacs won't help because it is not part of the XEmacs
distribution.
@unnumberedsec 2.4: General Troubleshooting
@node Q2.4.1, Q2.4.2, Q2.3.8, Installation
@unnumberedsubsec Q2.4.1: How do I deal with bugs or with problems building, installing, or running?
The file @file{PROBLEMS} contains information on many common problems that
occur in building, installing and running XEmacs.
Reports of bugs in XEmacs should be sent to
@email{xemacs-beta@@xemacs.org}. You can also post to the newsgroup
comp.emacs.xemacs (or equivalentlt, send to the mailing list
@email{xemacs@@xemacs.org}), but it is less likely that the developers
will see it in a timely fashion. @xref{Bugs,,, xemacs, the XEmacs
User's Manual}, for more information on how to report bugs.
@xref{Q1.4.2}, for more information on mailing lists relating to
XEmacs.
There are three ways to read the Bugs section.
@enumerate
@item
In a printed copy of the XEmacs manual.
@item
With Info. First, start XEmacs. From the menu, select
@samp{Help->Info (Online Docs)->Info Contents} to enter Info, then
click on @samp{XEmacs}, then on @samp{Bugs}. Or, use the keyboard: do
@kbd{C-h i} to enter Info, then @kbd{m XEmacs RET} to get to the Emacs
manual, then @kbd{m Bugs RET} to get to the section on bugs. Or use
standalone Info in a like manner. (Standalone Info is part of the
Texinfo distribution, not part of the XEmacs distribution.)
@item
By hand. Do
@example
cat info/xemacs* | more "+/^File: xemacs.info, Node: Bugs,"
@end example
@end enumerate
@node Q2.4.2, Q2.4.3, Q2.4.1, Installation
@unnumberedsubsec Q2.4.2: Help! XEmacs just crashed on me!
First of all, don't panic. Whenever XEmacs crashes, it tries extremely
hard to auto-save all of your files before dying. (The main time that
this will not happen is if the machine physically lost power or if you
killed the XEmacs process using @code{kill -9}). The next time you try
to edit those files, you will be informed that a more recent auto-save
file exists. You can use @kbd{M-x recover-file} to retrieve the
auto-saved version of the file.
You can use the command @kbd{M-x recover-session} after a crash to pick
up where you left off.
Now, XEmacs is not perfect, and there may occasionally be times, or
particular sequences of actions, that cause it to crash. If you can
come up with a reproducible way of doing this (or even if you have a
pretty good memory of exactly what you were doing at the time), the
maintainers would be very interested in knowing about it. The best
way to report a bug is using @kbd{M-x report-emacs-bug} (or by
selecting @samp{Send Bug Report...} from the Help menu). If that
won't work (e.g. you can't get XEmacs working at all), send ordinary
mail to @email{xemacs-beta@@xemacs.org}. @emph{MAKE SURE} to include
the output from the crash, especially including the Lisp backtrace, as
well as the XEmacs configuration from @kbd{M-x describe-installation}
(or equivalently, the file @file{Installation} in the top of the build
tree). Note that the developers do @emph{not} usually follow
@samp{comp.emacs.xemacs} on a regular basis; thus, this is better for
general questions about XEmacs than bug reports.
If at all possible, include a C stack backtrace of the core dump that
was produced. This shows where exactly things went wrong, and makes
it much easier to diagnose problems. To do this under Unix and Mac OS
X, you need to locate the core file (it's called @file{core}, and is
usually sitting in the directory that you started XEmacs from, or your
home directory if that other directory was not writable). Then, go to
that directory and execute a command like:
@example
gdb `which xemacs` core
@end example
and then issue the command @samp{where} to get the stack backtrace. You
might have to use @code{dbx} or some similar debugger in place of
@code{gdb}. If you don't have any such debugger available, complain to
your system administrator.
It's possible that a core file didn't get produced or the stack trace
from gdb is garbage, in which case you're out of luck unless you can
reproduce the bug. A nonexistent core file can happen in some
circumstances on some operating systems, depending on what exactly
triggered the crash. It's also possible, however, that your limits
are set to turn them off. You may be able to reenable them using a
command like @samp{unlimit coredumpsize} or @samp{ulimit -c}. (To find
out how your limits are set, use the command @samp{limit}.) However, if
you didn't explicitly set your limits this way, go complain to your
system administrator and tell him not to disable core files by
default.
A garbaged stack trace can happen for various reasons. Some versions
of gdb are broken on certain operating systems and aren't able to read
the core file. It's also possible that the stack got overwritten
during the crash. A very simple reason, however, is that your version
of XEmacs was compiled without debugging information or had the
debugging information stripped. A compilation with optimization can
also result in partly or completely garbaged stack trace. In such
cases, you will need to recompile XEmacs with debugging information
and without optimization; @xref{Q2.4.4, How to debug an XEmacs problem
with a debugger}. Note also that core files currently don't work at
all under Cygwin, and the only way to get a backtrace is to run XEmacs
from gdb.
If you cannot get a backtrace from the core dump, but can reproduce
the problem, try running XEmacs under gdb. The goal is to get clean C
and Lisp backtraces and submit a bug report including full
configuration information as described above, as this will greatly
assist in the process of tracking down the bug. However, even partial
information is better than none. The process of getting backtraces
from gdb is described in detail in @ref{Q2.4.4, How to debug an XEmacs
problem with a debugger}.
If you're under Microsoft Windows, you're out of luck unless you happen
to have a debugging aid installed on your system, for example Visual
C++. In this case, the crash will result in a message giving you the
option to enter a debugger (for example, by pressing @samp{Cancel}). Do
this and locate the stack-trace window. (If your XEmacs was built
without debugging information, the stack trace may not be very useful.)
When making a problem report make sure that:
@enumerate
@item
Report @strong{all} of the information output by XEmacs during the
crash.
@item
You mention what O/S and Hardware you are running XEmacs on.
@item
What version of XEmacs you are running.
@item
What build options you are using.
@item
If the problem is related to graphics and you are running Unix or Mac
OS X, we will also need to know what version of the X Window System
you are running, and what window manager you are using.
@item
If the problem happened on a TTY, please include the terminal type.
@item
Try very hard to get both C and Lisp backtraces, as described above.
@end enumerate
Much of the information above is automatically generated by @kbd{M-x
report-emacs-bug}. Even more, and often useful, information can be
generated by redirecting the output of @code{make} and @code{make check}
to a file (@file{beta.err} is the default used by @code{build-report}),
and executing @kbd{M-x build-report}.
@node Q2.4.3, Q2.4.4, Q2.4.2, Installation
@unnumberedsubsec Q2.4.3: XEmacs crashes and I compiled it myself.
There have been a variety of reports of crashes due to compilers with
buggy optimizers. If you are compiling with optimization, consider
turning it off (@pxref{Q2.4.4, How to debug an XEmacs problem with a
debugger}) and recompiling.
Please see the @file{PROBLEMS} file that comes with XEmacs (it's in
the top-level source directory) to read what it says about your
platform.
If you compiled XEmacs 21.4 or ealier using @samp{--use-union-type}, or
21.5 or later using @samp{--enable-union-type} (or in either case used
the option @samp{USE_UNION_TYPE} in @file{config.inc} under Windows),
try recompiling again without it. The union type has been known to
trigger compiler errors in a number of cases.
@node Q2.4.4, Q2.4.5, Q2.4.3, Installation
@unnumberedsubsec Q2.4.4: How to debug an XEmacs problem with a debugger
If XEmacs does crash on you, one of the most productive things you can
do to help get the bug fixed is to poke around a bit with the debugger.
Here are some hints:
@itemize @bullet
@item
First of all, if the crash is at all reproducible, consider very
strongly recompiling your XEmacs with debugging symbols and with no
optimization (e.g. with GCC use the compiler flags @samp{-g -O0} --
that's an "oh" followed by a zero), and with the configure options
@samp{--debug=yes} and @samp{--error-checking=all}
(@samp{--enable-debug=yes} and @samp{--enable-error-checking=all} on
XEmacs 21.5 or later). This will make your XEmacs run somewhat slower,
but you are a lot more likely to catch the problem earlier (closer to
its source). It makes it a lot easier to determine what's going on with
a debugger. The way to control the compiler flags is with the
configuration option @samp{--cflags} (@samp{--with-cflags} in 21.5). If
you have a recent version of 21.5, you should use
@samp{--without-optimization} in preference to directly setting
@samp{--cflags}.
@item
If it's not a true crash (@emph{i.e.}, XEmacs is hung, or a zombie
process), or it's inconvenient to run XEmacs again because XEmacs is
already running or is running in batch mode as part of a bunch of
scripts, you may be able to attach to the existing process with your
debugger. Under Unix and Mac OS X, the typical way to do this is to
first use some variant of the @samp{ps} command to figure out the
process ID of XEmacs, for example @samp{ps -auxww | grep xemacs} under
a BSD variant, @samp{ps -elf | grep xemacs} under Linux or System V,
or @samp{ps -aW | grep xemacs} under Cygwin. Then run
@example
gdb /path/to/xemacs/xemacs ####
@end example
Where @code{####} is the process id of your XEmacs. (If you're not
sure, try using @samp{which xemacs}.) When gdb attaches, the xemacs
will stop and you can type @samp{where} in gdb to get a stack trace as
usual. To get things moving again, you can just type @samp{quit} in
gdb. It'll tell you the program is running and ask if you want to
quit anyways. Say @samp{y} and it'll quit and have your emacs
continue from where it was at.
If you're running another debugger, a similar method may work, or you
may have to run the debugger first and then use the @code{attach}
command or something similar.
Under Microsoft Windows, use the menu item @samp{Build->Start
Debug->Attach to Process...} and select the XEmacs process from the list
given.
@item
If you're able to run XEmacs under a debugger and reproduce the crash,
here are some things you can do:
@item
If XEmacs is hitting an assertion failure, put a breakpoint on
@code{assert_failed()}.
@item
If XEmacs is hitting some weird Lisp error that's causing it to crash
(e.g. during startup), put a breakpoint on @code{signal_1()}---this is
declared static in @file{eval.c}.
@item
If XEmacs is outputting lots of X errors, put a breakpoint on
@code{x_error_handler()}; that will tell you which call is causing
them. Note that the result may not be very useful by default because
X Windows normally operates asynchronously: A bunch of commands are
buffered up and then sent to the server all at once. This greatly
improves performance over a network but means that an error may not be
reported until the server receives the commands, which can be long
after XEmacs made the erroneous calls. For best results, you need to
make the X server synchronous before getting the backtrace. This can
be done by starting XEmacs with the @samp{-sync} option or executing
the Lisp code @code{(x-debug-mode t)}.
@item
Internally, you will probably see lots of variables that hold objects of
type @code{Lisp_Object}. These are references to Lisp objects.
Printing them out with the debugger probably won't be too
useful---you'll likely just see a number. To decode them, do this:
@example
call debug_print (OBJECT)
@end example
where @var{OBJECT} is whatever you want to decode (it can be a variable,
a function call, etc.). This uses the Lisp printing routines to out a
readable representation on the TTY from which the xemacs process was
invoked.
Under 21.5 and later, @code{dp} is defined as an easier-to-type equivalent
of @code{debug_print}. You can also try @code{dpa} if you can't see
the output from @code{debug_print} (this will return a string containing
the output), or use @code{debug_p3} if @code{debug_print} itself triggers
a crash (this is a less comprehensive but super-safe way to print out
a Lisp object).
@item
If you want to get a Lisp backtrace showing the Lisp call
stack, do this:
@example
call debug_backtrace ()
@end example
Under 21.5 and later, @code{db} is defined as an easier-to-type equivalent
of @code{debug_backtrace}.
@item
Using @code{debug_print} and @code{debug_backtrace} has two
disadvantages - they can only be used with a running (including hung
or zombie) xemacs process, and they do not display the internal C
structure of a Lisp Object. Even if all you've got is a core dump,
all is not lost.
If you're using GDB, there are some macros in the file
@file{src/.gdbinit} in the XEmacs source distribution that should make
it easier for you to decode Lisp objects. This file is automatically
read by gdb if gdb is run in the directory where xemacs was built, and
contains these useful macros to inspect the state of xemacs:
@table @code
@item pobj
Usage: pobj lisp_object @*
Print the internal C representation of a lisp object.
@item xtype
Usage: xtype lisp_object @*
Print the Lisp type of a lisp object.
@item lbt
Usage: lbt @*
Print the current Lisp stack trace.
Requires a running xemacs process. (It works by calling the db
routine described above.)
@item ldp
Usage: ldp lisp_object @*
Print a Lisp Object value using the Lisp printer.
Requires a running xemacs process. (It works by calling the dp
routine described above.)
@item run-temacs
Usage: run-temacs @*
Run temacs interactively, like xemacs.
Use this with debugging tools (like purify) that cannot deal with dumping,
or when temacs builds successfully, but xemacs does not.
@item dump-temacs
Usage: dump-temacs @*
Run the dumping part of the build procedure.
Use when debugging temacs, not xemacs!
Use this when temacs builds successfully, but xemacs does not.
@item check-xemacs
Usage: check-xemacs @*
Run the test suite. Equivalent to 'make check'.
@item check-temacs
Usage: check-temacs @*
Run the test suite on temacs. Equivalent to 'make check-temacs'.
Use this with debugging tools (like purify) that cannot deal with dumping,
or when temacs builds successfully, but xemacs does not.
@end table
If you are using Sun's @file{dbx} debugger, there is an equivalent file
@file{src/.dbxrc}, which defines the same commands for dbx.
@item
If you're using a debugger to get a C stack backtrace and you're seeing
stack traces with some of the innermost frames mangled, it may be due to
dynamic linking. (This happens especially under Linux.) Consider
reconfiguring with @samp{--dynamic=no} (@samp{--with-dynamic=no} in 21.5
or later). Also, sometimes (again under Linux), stack backtraces of
core dumps will have the frame where the fatal signal occurred mangled;
if you can obtain a stack trace while running the XEmacs process under a
debugger, the stack trace should be clean.
@email{1CMC3466@@ibm.mtsac.edu, Curtiss} suggests upgrading to ld.so
version 1.8 if dynamic linking and debugging is a problem on Linux.
@item
If you're using a debugger to get a C stack backtrace and you're
getting a completely mangled and bogus stack trace, it's probably due to
one of the following:
@enumerate a
@item
Your executable has been stripped. Bad news. Tell your sysadmin not to
do this---it doesn't accomplish anything except to save a bit of disk
space, and makes debugging much much harder.
@item
Your stack is getting trashed. Debugging this is hard; you have to do a
binary-search type of narrowing down where the crash occurs, until you
figure out exactly which line is causing the problem. Of course, this
only works if the bug is highly reproducible. Also, in many cases if
you run XEmacs from the debugger, the debugger can protect the stack
somewhat. However, if the stack is being smashed, it is typically the
case that there is a wild pointer somewhere in the program, often quite
far from where the crash occurs.
@item
If your stack trace has exactly one frame in it, with address 0x0, this
could simply mean that XEmacs attempted to execute code at that address,
e.g. through jumping to a null function pointer. Unfortunately, under
those circumstances, GDB under Linux doesn't know how to get a stack
trace. (Yes, this is the fourth Linux-related problem I've mentioned. I
have no idea why GDB under Linux is so bogus. Complain to the GDB
authors, or to comp.os.linux.development.system.) Again, you'll have to
use the narrowing-down process described above.
@item
You will get a Lisp backtrace output when XEmacs crashes, so you'll have
something useful.
@end enumerate
@item
If you compile with the newer gcc variants gcc-2.8 or egcs, you will
also need gdb 4.17 or above. Earlier releases of gdb can't handle the
debug information generated by the newer compilers.
@item
In versions of XEmacs before 21.2.27, @file{src/.gdbinit} was named
@file{src/gdbinit}. This had the disadvantage of not being sourced
automatically by gdb, so you had to set that up yourself.
@item
If you are running Microsoft Windows, the the file @file{nt/README} for
further information about debugging XEmacs.
@end itemize
@node Q2.4.5, Q2.4.6, Q2.4.4, Installation
@unnumberedsubsec Q2.4.5: I get a cryptic error message when trying to do something.
When I try to use some particular option of some particular package, I
get a cryptic error message in the minibuffer.
If the message went by too quickly, use @samp{Help->Recent Messages}
from the menubar (or type @kbd{C-h l}) to see recent messages.
If you can't figure out what's going on, select
@samp{Options->Troubleshooting->Debug on Error} from the menubar (or
type @kbd{M-:} then @kbd{(setq debug-on-error t)}) then try and make
the error happen again. This will put in the debugger (you can get
out of this and continue what you were doing before by typing @kbd{c})
and give you a backtrace that may be enlightening. If not, try
reading through this FAQ; if that fails, you could try posting to
@samp{comp.emacs.xemacs} (making sure to include the backtrace) and
someone may be able to help. If you can identify which XEmacs Lisp
source file the error is coming from you can get a more detailed stack
backtrace by doing the following:
@enumerate
@item
Visit the .el file in an XEmacs buffer.
@item
Issue the command @kbd{M-x eval-current-buffer}.
@item
Reproduce the error.
@end enumerate
For more information on debugging Lisp code, @xref{Debugging,,,
lispref, XEmacs Lisp Reference Manual}.
@node Q2.4.6, Q2.4.7, Q2.4.5, Installation
@unnumberedsubsec Q2.4.6: XEmacs hangs when I try to do something.
XEmacs might just be slow; some operations take a long time. XEmacs
may also be waiting on a response from the network, for example when
you are trying to send mail.
You can usually interrupt XEmacs by typing @kbd{C-g}. If not (for
example, Lisp code explicitly disabled this by setting
@code{inhibit-quit}), you can use the "critical quit" mechanism by
typing @kbd{Control-Shift-G}. This should also pop you into the
debugger and give you a backtrace, which can tell you where the
problem is (@pxref{Q2.4.4, How to debug an XEmacs problem with a
debugger}). (Note that setting @code{debug-on-quit} or selecting
@samp{Options->Troubleshooting->Debug on Quit} will also cause regular
@kbd{C-g} to enter the debugger and give you a backtrace.)
If you can't interrupt XEmacs this way, or for some reason XEmacs is
not talking to the keyboard, you can try sending the @samp{SIGINT}
signal using the @samp{kill} command.
If the Lisp backtrace isn't enlightening, or if XEmacs is so hung that
you can't interrupt it at all, you could try attaching to the process
and getting a C stack backtrace. @xref{Q2.4.4, How to debug an XEmacs
problem with a debugger}.
@node Q2.4.7, Q2.4.8, Q2.4.6, Installation
@unnumberedsubsec Q2.4.7: I get an error message when XEmacs is running in batch mode.
Typically this happens when you are trying to compile some Elisp code.
If you are doing this as part of XEmacs or the XEmacs packages, you
should automatically get a backtrace, which can help you determine the
source of the problem. In other cases, you can get equivalent results
by setting the environment variable @samp{XEMACSDEBUG} to @samp{(setq
stack-trace-on-error t load-always-display-messages t
load-ignore-out-of-date-elc-files t load-show-full-path-in-messages
t)} (this needs to be all on one line; to set an environment variable,
use @samp{export XEMACSDEBUG='FOO'} under @samp{bash}, @samp{zsh},
etc. or @samp{setenv XEMACSDEBUG 'FOO'} under @samp{csh} and
@samp{tcsh}). @samp{XEMACSDEBUG} specifies Lisp code that will be
executed at startup time.
If the backtrace is not sufficiently useful in helping you diagnose
the problem, you should consider using a debugger such as GDB.
@xref{Q2.4.4, How to debug an XEmacs problem with a debugger}. You
probably want to set a breakpoint on @code{signal_1}. Since such
errors often occur during compiling, which is often triggered by a
complex command run from a make suite, it may be easier to attach to
the process once it's running.
Under Microsoft Windows (and perhaps other operating systems), there is
another useful trick you can do if you have configured with debugging
support (configure option @samp{--debug} (@samp{--with-debug} in 21.5)
or setting @samp{DEBUG_XEMACS} in @file{nt/config.inc}). Set the
environment variable @samp{XEMACSDEBUG} (as described above) to
@samp{(setq debug-on-error t)}. Then, when an error occurs
noninteractively, instead of trying to invoke the Lisp debugger (which
obviously won't work), XEmacs will break out to a C debugger using
@code{(force-debugging-signal t)}. @emph{NOTE}: This runs
@code{abort()}!!! (As well as and after executing INT 3 under MS
Windows, which should invoke a debugger if it's active.) This is
guaranteed to kill XEmacs! (But in this situation, XEmacs is about to
die anyway, and if no debugger is present, this will usefully dump
core.)
@node Q2.4.8, Q2.4.9, Q2.4.7, Installation
@unnumberedsubsec Q2.4.8: The keyboard or mouse is not working properly, or I have some other event-related problem.
XEmacs has various facilities for debugging event handling.
First, try setting the variable @code{debug-emacs-events} to non-zero.
This will output various information showing which events are being
received and how they are being translated. This may show you, for
example, that a key command is getting intercepted using
@code{key-translation-map}; this problem can otherwise be very tricky
to debug.
Under X, you can see exactly which events are being received from the
window system by setting @code{x-debug-events} to non-zero. (The value
@samp{1} gives you regular output, and @samp{2} gives you verbose
output, including all parameters.)
A similar facility exists under MS Windows: Set
@code{debug-mswindows-events} to non-zero. (The value @samp{1} gives
you regular output. The value @samp{2} gives you verbose output,
including all parameters. The value @samp{3} gives you
super-gorily-detailed output.)
@node Q2.4.9, Q2.4.10, Q2.4.8, Installation
@unnumberedsubsec Q2.4.9: @kbd{C-g} doesn't work for me. Is it broken?
@kbd{C-g} does work for most people in most circumstances. If it
doesn't, there are two possible explanations:
@enumerate
@item
XEmacs is hung in a way that prevents @kbd{C-g} from working. This
can happen when code is wrapped with a binding of @code{inhibit-quit}
to @code{t}; you should still be able interrupt XEmacs using "critical
quit". On the other hand, XEmacs may be seriously wedged. (If you're
lucky, sending @samp{SIGINT} to the XEmacs process will interrupt it.)
@xref{Q2.4.6, XEmacs hangs when I try to do something.}.
@item
@kbd{C-g} is indeed broken on your system. To test, try executing
@code{(while t)} from the @samp{*scratch*} buffer. If @kbd{C-g}
doesn't interrupt, then it's broken. This used to happen with systems
where @samp{SIGIO} was broken, but @samp{BROKEN_SIGIO} wasn't defined.
However, there may not be very many such systems nowadays.
@end enumerate
@node Q2.4.10, Q2.4.11, Q2.4.9, Installation
@unnumberedsubsec Q2.4.10: How do I debug process-related problems?
Under MS Windows, you can set the variable
@code{debug-mswindows-process-command-lines} to non-@samp{nil} to get
information on exactly what is getting passed to a process. This can
be useful in determining problems with quoting. (Under Unix, a process
receives each argument separately, but under MS Windows a single
command line is received, and arguments with spaces or other special
characters in them must be quoted. Unfortunately this means that each
process, potentially at least, has its own quoting conventions, and
the code to process quoting conventions in @file{cmd.exe}, the Visual
C++ startup code and the like is baroque and poorly documented.
XEmacs uses the variable
@code{mswindows-construct-process-command-line-alist} to construct a
command line from a list of arguments based on the command to be run,
but it is (and cannot be) a perfect solution.)
@node Q2.4.11, Q2.4.12, Q2.4.10, Installation
@unnumberedsubsec Q2.4.11: XEmacs is outputting lots of X errors.
If this is happening, we would very much like to know what's causing
them. To find this out, see @ref{Q2.4.4, How to debug an XEmacs
problem with a debugger}. Try to get both a C and Lisp backtrace, and
send them along with the full error output to
@email{xemacs-beta@@xemacs.org}.
@node Q2.4.12, Q2.5.1, Q2.4.11, Installation
@unnumberedsubsec Q2.4.12: After upgrading, XEmacs won't do `foo' any more!
You have been used to doing `foo', but now when you invoke it (or
click the toolbar button or select the menu item), nothing (or an
error) happens. The simplest explanation is that you are missing a
package that is essential to you. You can either track it down and
install it (there is a list of packages and brief descriptions of
their contents in @file{etc/PACKAGES}), or install the `Sumo Tarball'
(@pxref{Q2.1.2, How do I figure out which packages to install?}).
@c #### should xref to XEmacs manual here
@unnumberedsec 2.5: Startup-Related Problems
@node Q2.5.1, Q2.5.2, Q2.4.12, Installation
@unnumberedsubsec Q2.5.1: XEmacs cannot connect to my X Terminal!
Help! I can not get XEmacs to display on my Envizex X-terminal!
Try setting the @code{DISPLAY} variable using the numeric IP address of
the host you are running XEmacs from.
@node Q2.5.2, Q2.5.3, Q2.5.1, Installation
@unnumberedsubsec Q2.5.2 Startup problems related to paths or package locations.
First of all, if XEmacs can't find the packages, check to make sure
that you put the packages in the right place, or that you told XEmacs
where to look for the packages when you compiled it. @xref{Q2.1.1}.
If something is still going wrong, or you get a startup warning about
not being able to deduce some paths, you can get detailed information
on the path-searching process at startup by setting the environment
variable @samp{EMACSDEBUGPATHS} to a non-null value. One thing to
look for if you're having package problems is the value of
@samp{configure-package-path}. This corresponds to what was compiled
into XEmacs using the @samp{--package-prefix} or @samp{--package-path}
parameter (@pxref{Q2.1.1}). If this has the value of @samp{nil},
this means that no value was compiled into XEmacs using these parameters.
@node Q2.5.3, Q2.5.4, Q2.5.2, Installation
@unnumberedsubsec Q2.5.3: XEmacs won't start without network.
If XEmacs starts when you're on the network, but fails when you're not
on the network, you may be missing a "localhost" entry in your
@file{/etc/hosts} file. The file should contain an entry like:
@example
127.0.0.1 localhost
@end example
Add that line, and XEmacs will be happy.
@node Q2.5.4, Q2.5.5, Q2.5.3, Installation
@unnumberedsubsec Q2.5.4: Startup warnings about deducing proper fonts?
How can I avoid the startup warnings about deducing proper fonts?
This is highly dependent on your installation, but try with the
following font as your base font for XEmacs and see what it does:
@format
-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
@end format
More precisely, do the following in your resource file:
@format
Emacs.default.attributeFont: \
-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
@end format
If you just don't want to see the @samp{*Warnings*} buffer at startup
time, you can set this:
@lisp
(setq display-warning-minimum-level 'error)
@end lisp
The buffer still exists; it just isn't in your face.
@node Q2.5.5, Q2.5.6, Q2.5.4, Installation
@unnumberedsubsec Q2.5.5: Warnings from incorrect key modifiers.
The following information comes from the @file{PROBLEMS} file that comes
with XEmacs.
If you're having troubles with HP/UX it is because HP/UX defines the
modifiers wrong in X. Here is a shell script to fix the problem; be
sure that it is run after VUE configures the X server.
@example
#! /bin/sh
xmodmap 2> /dev/null - << EOF
keysym Alt_L = Meta_L
keysym Alt_R = Meta_R
EOF
xmodmap - << EOF
clear mod1
keysym Mode_switch = NoSymbol
add mod1 = Meta_L
keysym Meta_R = Mode_switch
add mod2 = Mode_switch
EOF
@end example
@node Q2.5.6, Q2.5.7, Q2.5.5, Installation
@unnumberedsubsec Q2.5.6: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed?
Yes.
The console was there because @file{temacs} (and in turn, @file{xemacs})
was a console application, and Windows typically creates a new
console for a console process unless the creating process requests that
one isn't created. This used to be fixed with @file{runemacs}, a small
Windows application that existed merely to start @file{xemacs}, stating
that it didn't want a console.
XEmacs 21.4 fixes this cleanly by the virtue of being a true "GUI"
application. The explanation of what that means is included for
educational value.
When building an application to be run in a Win32 environment, you must
state which sub-system it is to run in. Valid subsystems include
"console" and "gui". The subsystem you use affects the run time
libraries linked into your application, the start up function that is
run before control is handed over to your application, the entry point
to your program, and how Windows normally invokes your program. (Console
programs automatically get a console created for them at startup if
their stdin/stdout don't point anywhere useful, which is the case when
run from the GUI. This is a stupid design, of course -- instead, the
console should get created only when the first I/O actually occurs!
GUI programs have an equally stupid design: When called from
@file{CMD.EXE}/@file{COMMAND.COM}, their stdin/stdout will be set to
point nowhere useful, even though the command shell has its own
stdin/stdout. It's as if someone who had learned a bit about stdio but
had no actual knowledge of interprocess communication designed the
scheme; unfortunately, the whole process-communication aspect of the
Win32 API is equally badly designed.) For example, the entry point for a
console app is "main" (which is what you'd expect for a C/C++ program),
but the entry point for a "gui" app is "WinMain". This confuses and
annoys a lot of programmers who've grown up on Unix systems, where the
kernel doesn't really care whether your application is a gui program or
not.
For reasons not altogether clear, and are lost in the mists of time and
tradition, XEmacs on Win32 started out as a console application, and
therefore a console was automatically created for it. (It may have been
made a console application partly because a console is needed in some
circumstances, especially under Win95, to interrupt, terminate, or send
signals to a child process, and because of the bogosity mentioned above
with GUI programs and the standard command shell. Currently, XEmacs
just creates and immediately hides a console when necessary, and
works around the "no useful stdio" problem by creating its own console
window as necessary to display messages in.)
@node Q2.5.7, , Q2.5.6, Installation
@unnumberedsubsec Q2.5.7: XEmacs issues messages about ``auto-autoloads already loaded.''
On Sat, 05 Mar 2011 11:54:47 -0500, in Message-ID:
<4D726AD7.7020303@@gmail.com> on xemacs-beta, Raymond Toy reported:
@quotation
[N]ow every time I start xemacs, I get 100+ error messages stating that
the auto-autoload for every package has already been loaded.
@end quotation
This occurs if you have duplicate packages installed on your load-path.
To detect exactly which paths are duplicated, use @kbd{M-x
list-load-path-shadows}. If you have a small number of duplicated
libraries, it is probably one or more packages available both in the
XEmacs distribution and in third-party distributions. If you prefer the
third-party version, use @kbd{M-x list-packages} to get the package
management UI, and uninstall the particular packages. Removal of third
party packages must be done manually, if you wish to keep the version
distributed by XEmacs.
When you have many duplicate packages, a common cause is that XEmacs
finds @emph{package root directories} that are duplicates of each other.
This can occur in some automounter configurations, or when the roots
share some subtrees via symlinks. In this case, you will get a warning
for @emph{all} of the packages you have installed. Although this is
basically a site configuration problem, please report these cases.
XEmacs is already aware of many automounter artifacts, and automatically
adjusts for them. Code is being added to try to detect symlinks. We
may not be able to handle every case, but we'd like to know about them,
and where possible incorporate workarounds.
Package root directories are specified at configuration time via the
@code{--prefix}, @code{--exec-prefix}, and the @samp{--with-*-packages}
options; at runtime relative to the XEmacs binary (@file{../share} and
@file{..} (for run-in-place)); and at runtime via the
@samp{EMACS*PACKAGES} environment variables. Unless you have special
needs, it is best to install XEmacs and the packages (configuring with
@code{--with-prefix=$prefix} for XEmacs and by untarring the SUMOs in
@file{@code{$prefix}/share/xemacs/}.
Note that older versions of XEmacs (21.1, 21.4, and early releases of
21.5) by default expect the packages to be installed under
@file{@code{$prefix}/lib} rather than @file{@code{$prefix}/share}. See
the documentation for @file{configure} for how to point XEmacs at
@file{@code{$prefix}/share/xemacs/} if that is preferred, or older
XEmacsen need to share packages with recent versions.
@node Editing, Display, Installation, Top
@unnumbered 3 Editing Functions
This is part 3 of the XEmacs Frequently Asked Questions list. This
section is devoted to the editing-related capabilities of XEmacs (the
keyboard, mouse, buffers, text selections, etc.) and how to customize
them.
@menu
3.0: The Keyboard
* Q3.0.1:: How can I customize the keyboard?
* Q3.0.2:: How can I bind complex functions (or macros) to keys?
* Q3.0.3:: How do I bind C-. and C-; to scroll one line up and down?
* Q3.0.4:: Globally binding @kbd{Delete}?
* Q3.0.5:: How to map @kbd{Help} key alone on Sun type4 keyboard?
* Q3.0.6:: How can you type in special characters in XEmacs?
* Q3.0.7:: Can I turn on @dfn{sticky} modifier keys?
* Q3.0.8:: How do I map the arrow keys?
* Q3.0.9:: HP Alt key as Meta.
* Q3.0.10:: Why does edt emulation not work?
* Q3.0.11:: How can I emulate VI and use it as my default mode?
3.1: The Mouse
* Q3.1.1:: How can I turn off Mouse pasting?
* Q3.1.2:: How do I set control/meta/etc modifiers on mouse buttons?
* Q3.1.3:: Clicking the left button does not do anything in buffer list.
* Q3.1.4:: How can I get a list of buffers when I hit mouse button 3?
* Q3.1.5:: How can I set XEmacs up so that it pastes where the text cursor is?
3.2: Buffers, Text Editing
* Q3.2.1:: Can I have the end of the buffer delimited in some way?
* Q3.2.2:: How do I insert today's date into a buffer?
* Q3.2.3:: How do I get a single minibuffer frame?
* Q3.2.4:: How can I enable auto-indent and/or Filladapt?
* Q3.2.5:: How can I get XEmacs to come up in text/auto-fill mode by default?
3.3: Text Selections
* Q3.3.1:: How do I select a rectangular region?
* Q3.3.2:: How can I turn off or change highlighted selections?
* Q3.3.3:: How do I cause typing on an active region to remove it?
* Q3.3.4:: Can I turn off the highlight during isearch?
* Q3.3.5:: Why is killing so slow?
* Q3.3.6:: Why does @kbd{M-w} take so long?
3.4: Editing Source Code
* Q3.4.1:: I do not like cc-mode. How do I use the old c-mode?
* Q3.4.2:: How do you make XEmacs indent CL if-clauses correctly?
@end menu
@unnumberedsec 3.0: The Keyboard
@node Q3.0.1, Q3.0.2, Editing, Editing
@unnumberedsubsec Q3.0.1: How can I customize the keyboard?
#### Write me.
@node Q3.0.2, Q3.0.3, Q3.0.1, Editing
@unnumberedsubsec Q3.0.2: How can I bind complex functions (or macros) to keys?
As an example, say you want the @kbd{paste} key on a Sun keyboard to
insert the current Primary X selection at point. You can accomplish this
with:
@lisp
(define-key global-map [f18] 'x-insert-selection)
@end lisp
However, this only works if there is a current X selection (the
selection will be highlighted). The functionality I like is for the
@kbd{paste} key to insert the current X selection if there is one,
otherwise insert the contents of the clipboard. To do this you need to
pass arguments to @code{x-insert-selection}. This is done by wrapping
the call in a 'lambda form:
@lisp
(global-set-key [f18]
(lambda () (interactive) (x-insert-selection t nil)))
@end lisp
This binds the f18 key to a @dfn{generic} functional object. The
interactive spec is required because only interactive functions can be
bound to keys.
For the FAQ example you could use:
@lisp
(global-set-key [(control ?.)]
(lambda () (interactive) (scroll-up 1)))
(global-set-key [(control ?;)]
(lambda () (interactive) (scroll-up -1)))
@end lisp
This is fine if you only need a few functions within the lambda body.
If you're doing more it's cleaner to define a separate function.
@xref{Q3.0.3, How do I bind C-. and C-; to scroll one line up and
down?}.
@node Q3.0.3, Q3.0.4, Q3.0.2, Editing
@unnumberedsubsec Q3.0.3: How do I bind C-. and C-; to scroll one line up and down?
Add the following (Thanks to @email{mly@@adoc.xerox.com, Richard Mlynarik} and
@email{wayne@@zen.cac.stratus.com, Wayne Newberry}) to @file{.emacs}:
@lisp
(defun scroll-up-one-line ()
(interactive)
(scroll-up 1))
(defun scroll-down-one-line ()
(interactive)
(scroll-down 1))
(global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
(global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
@end lisp
The key point is that you can only bind simple functions to keys; you
can not bind a key to a function that you're also passing arguments
to. (@pxref{Q3.0.2, How can I bind complex functions (or macros) to
keys?} for a better answer).
@node Q3.0.4, Q3.0.5, Q3.0.3, Editing
@unnumberedsubsec Q3.0.4: Globally binding @kbd{Delete}?
I cannot manage to globally bind my @kbd{Delete} key to something other
than the default. How does one do this?
Answer: The problem is that many modes explicitly bind @kbd{Delete}. To
get around this, try the following:
@lisp
(defun foo ()
(interactive)
(message "You hit DELETE"))
(define-key key-translation-map 'delete 'redirected-delete)
(global-set-key 'redirected-delete 'foo)
@end lisp
@node Q3.0.5, Q3.0.6, Q3.0.4, Editing
@unnumberedsubsec Q3.0.5: How to map @kbd{Help} key alone on Sun type4 keyboard?
The following works in GNU Emacs 19:
@lisp
(global-set-key [help] 'help-command);; Help
@end lisp
The following works in XEmacs with the addition of shift:
@lisp
(global-set-key [(shift help)] 'help-command);; Help
@end lisp
But it doesn't work alone. This is in the file @file{PROBLEMS} which
should have come with your XEmacs installation: @emph{Emacs ignores the
@kbd{help} key when running OLWM}.
OLWM grabs the @kbd{help} key, and retransmits it to the appropriate
client using
@iftex
@*
@end iftex
@code{XSendEvent}. Allowing Emacs to react to synthetic
events is a security hole, so this is turned off by default. You can
enable it by setting the variable @code{x-allow-sendevents} to t. You
can also cause fix this by telling OLWM to not grab the help key, with
the null binding @code{OpenWindows.KeyboardCommand.Help:}.
@node Q3.0.6, Q3.0.7, Q3.0.5, Editing
@unnumberedsubsec Q3.0.6: How can you type in special characters in XEmacs?
One way is to use the package @code{x-compose}. Then you can use
sequences like @kbd{Compose " a} to get , etc.
Another way is to use the @code{iso-insert} package. Then you can use
sequences like @kbd{C-x 8 " a} to get , etc.
@email{glynn@@sensei.co.uk, Glynn Clements} writes:
@quotation
It depends upon your X server.
Generally, the simplest way is to define a key as Multi_key with
xmodmap, e.g.
@c hey, show some respect, willya -- there's xkeycaps, isn't there? --
@c chr ;)
@example
xmodmap -e 'keycode 0xff20 = Multi_key'
@end example
You will need to pick an appropriate keycode. Use xev to find out the
keycodes for each key.
[NB: On a `Windows' keyboard, recent versions of XFree86 automatically
define the right `Windows' key as Multi_key'.]
Once you have Multi_key defined, you can use e.g.
@example
Multi a ' =>
Multi e " =>
Multi c , =>
@end example
etc.
Also, recent versions of XFree86 define various AltGr-<key>
combinations as dead keys, i.e.
@example
AltGr [ => dead_diaeresis
AltGr ] => dead_tilde
AltGr ; => dead_acute
@end example
etc.
Running @samp{xmodmap -pk} will list all of the defined keysyms.
@end quotation
For the related problem of @emph{displaying} non-ASCII characters in a
non-Mule XEmacs, @xref{Q4.0.8, How do I display non-ASCII characters?}.
@node Q3.0.7, Q3.0.8, Q3.0.6, Editing
@unnumberedsubsec Q3.0.7: Can I turn on @dfn{sticky} modifier keys?
Yes, with @code{(setq modifier-keys-are-sticky t)}. This will give the
effect of being able to press and release Shift and have the next
character typed come out in upper case. This will affect all the other
modifier keys like Control and Meta as well.
@email{ben@@xemacs.org, Ben Wing} writes:
@quotation
One thing about the sticky modifiers is that if you move the mouse out
of the frame and back in, it cancels all currently ``stuck'' modifiers.
@end quotation
@node Q3.0.8, Q3.0.9, Q3.0.7, Editing
@unnumberedsubsec Q3.0.8: How do I map the arrow keys?
@c New
Say you want to map @kbd{C-@key{right}} to forward-word:
@email{sds@@usa.net, Sam Steingold} writes:
@quotation
@lisp
; both XEmacs and Emacs
(define-key global-map [(control right)] 'forward-word)
@end lisp
or
@lisp
; Emacs only
(define-key global-map [C-right] 'forward-word)
@end lisp
or
@lisp
; ver > 20, both
(define-key global-map (kbd "C-<right>") 'forward-word)
@end lisp
@end quotation
@node Q3.0.9, Q3.0.10, Q3.0.8, Editing
@unnumberedsubsec Q3.0.9: HP Alt key as Meta.
How can I make XEmacs recognize the Alt key of my HP workstation as a
Meta key?
Put the following line into a file and load it with xmodmap(1) before
starting XEmacs:
@example
remove Mod1 = Mode_switch
@end example
@node Q3.0.10, Q3.0.11, Q3.0.9, Editing
@unnumberedsubsec Q3.0.10: Why does edt emulation not work?
We don't know, but you can use tpu-edt emulation instead, which works
fine and is a little fancier than the standard edt emulation. To do
this, add the following line to your @file{init.el}:
@lisp
(tpu-edt)
@end lisp
If you don't want it to replace @kbd{C-h} with an edt-style help menu
add this as well:
@lisp
(global-set-key [(control h)] 'help-for-help)
@end lisp
@node Q3.0.11, Q3.1.1, Q3.0.10, Editing
@unnumberedsubsec Q3.0.11: How can I emulate VI and use it as my default mode?
Our recommended VI emulator is viper. To make viper-mode the default,
add this to your @file{init.el}:
@lisp
(viper-mode)
@end lisp
@email{kifer@@CS.SunySB.EDU, Michael Kifer} writes:
@quotation
This should be added as close to the top of @file{init.el} as you can get
it, otherwise some minor modes may not get viper-ized.
@end quotation
@unnumberedsec 3.1: The Mouse
@node Q3.1.1, Q3.1.2, Q3.0.11, Editing
@unnumberedsubsec Q3.1.1: How can I turn off Mouse pasting?
I keep hitting the middle mouse button by accident and getting stuff
pasted into my buffer so how can I turn this off?
Here is an alternative binding, whereby the middle mouse button selects
(but does not cut) the expression under the mouse. Clicking middle on a
left or right paren will select to the matching one. Note that you can
use @code{define-key} or @code{global-set-key}.
@lisp
(defun mouse-set-point-and-select (event)
"Sets the point at the mouse location, then marks following form"
(interactive "@@e")
(mouse-set-point event)
(mark-sexp 1))
(define-key global-map [button2] 'mouse-set-point-and-select)
@end lisp
@node Q3.1.2, Q3.1.3, Q3.1.1, Editing
@unnumberedsubsec Q3.1.2: How do I set control/meta/etc modifiers on mouse buttons?
Use, for instance, @code{[(meta button1)]}. For example, here is a common
setting for Common Lisp programmers who use the bundled @code{ilisp}
package, whereby meta-button1 on a function name will find the file where
the function name was defined, and put you at that location in the source
file.
[Inside a function that gets called by the lisp-mode-hook and
ilisp-mode-hook]
@lisp
(local-set-key [(meta button1)] 'edit-definitions-lisp)
@end lisp
@node Q3.1.3, Q3.1.4, Q3.1.2, Editing
@unnumberedsubsec Q3.1.3: Clicking the left button does not do anything in buffer list.
I do @kbd{C-x C-b} to get a list of buffers and the entries get
highlighted when I move the mouse over them but clicking the left mouse
does not do anything.
Use the middle mouse button.
@node Q3.1.4, Q3.1.5, Q3.1.3, Editing
@unnumberedsubsec Q3.1.4: How can I get a list of buffers when I hit mouse button 3?
The following code will replace the default popup on button3:
@lisp
(global-set-key [button3] 'popup-buffer-menu)
@end lisp
@node Q3.1.5, Q3.2.1, Q3.1.4, Editing
@unnumberedsubsec Q3.1.5: How can I set XEmacs up so that it pastes where the text cursor is?
By default XEmacs pastes X selections where the mouse pointer is. How
do I disable this?
Examine the function @code{mouse-yank}, by typing @kbd{C-h f mouse-yank
@key{RET}}.
To get XEmacs to paste at the text cursor, add this your @file{init.el}:
@lisp
(setq mouse-yank-at-point t)
@end lisp
You can also change this with Customize. Select from the
@code{Options} menu @code{Advanced
(Customize)->Emacs->Editing->Mouse->Yank At Point...} or type @kbd{M-x
customize @key{RET} mouse @key{RET}}.
@unnumberedsec 3.2: Buffers, Text Editing
@node Q3.2.1, Q3.2.2, Q3.1.5, Editing
@unnumberedsubsec Q3.2.1: Can I have the end of the buffer delimited in some way?
Say, with: @samp{[END]}?
Try this:
@lisp
(let ((ext (make-extent (point-min) (point-max))))
(set-extent-property ext 'start-closed t)
(set-extent-property ext 'end-closed t)
(set-extent-property ext 'detachable nil)
(set-extent-end-glyph ext (make-glyph [string :data "[END]"])))
@end lisp
Since this is XEmacs, you can specify an icon to be shown on
window-system devices. To do so, change the @code{make-glyph} call to
something like this:
@lisp
(make-glyph '([xpm :file "~/something.xpm"]
[string :data "[END]"]))
@end lisp
You can inline the @sc{xpm} definition yourself by specifying
@code{:data} instead of @code{:file}. Here is such a full-featured
version that works on both X and TTY devices:
@lisp
(let ((ext (make-extent (point-min) (point-max))))
(set-extent-property ext 'start-closed t)
(set-extent-property ext 'end-closed t)
(set-extent-property ext 'detachable nil)
(set-extent-end-glyph ext (make-glyph '([xpm :data "\
/* XPM */
static char* eye = @{
\"20 11 7 2\",
\"__ c None\"
\"_` c #7f7f7f\",
\"_a c #fefefe\",
\"_b c #7f0000\",
\"_c c #fefe00\",
\"_d c #fe0000\",
\"_e c #bfbfbf\",
\"___________`_`_`___b_b_b_b_________`____\",
\"_________`_`_`___b_c_c_c_b_b____________\",
\"_____`_`_`_e___b_b_c_c_c___b___b_______`\",
\"___`_`_e_a___b_b_d___b___b___b___b______\",
\"_`_`_e_a_e___b_b_d_b___b___b___b___b____\",
\"_`_`_a_e_a___b_b_d___b___b___b___b___b__\",
\"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\",
\"___`_`_e_a___b_b_b_d_c___b___b___d_b____\",
\"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\",
\"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\",
\"___`_____`_`_`_`___b_b_b_b_b_b__________\",
@} ;"]
[string :data "[END]"]))))
@end lisp
Note that you might want to make this a function, and put it to a hook.
We leave that as an exercise for the reader.
@node Q3.2.2, Q3.2.3, Q3.2.1, Editing
@unnumberedsubsec Q3.2.2: How do I insert today's date into a buffer?
Like this:
@lisp
(insert (current-time-string))
@end lisp
@node Q3.2.3, Q3.2.4, Q3.2.2, Editing
@unnumberedsubsec Q3.2.3: How do I get a single minibuffer frame?
@email{acs@@acm.org, Vin Shelton} writes:
@lisp
(setq initial-frame-plist '(minibuffer nil))
(setq default-frame-plist '(minibuffer nil))
(setq default-minibuffer-frame
(make-frame
'(minibuffer only
width 86
height 1
menubar-visible-p nil
default-toolbar-visible-p nil
name "minibuffer"
top -2
left -2
has-modeline-p nil)))
(frame-notice-user-settings)
@end lisp
@strong{Please note:} The single minibuffer frame may not be to everyone's
taste, and there any number of other XEmacs options settings that may
make it difficult or inconvenient to use.
@node Q3.2.4, Q3.2.5, Q3.2.3, Editing
@unnumberedsubsec Q3.2.4: How can I enable auto-indent and/or Filladapt?
Put the following line in your @file{init.el}:
@lisp
(setq indent-line-function 'indent-relative-maybe)
@end lisp
If you want to get fancy, try the @code{filladapt} package available
standard with XEmacs. Put this into your @file{init.el}:
@lisp
(require 'filladapt)
(setq-default filladapt-mode t)
(add-hook 'c-mode-hook 'turn-off-filladapt-mode)
@end lisp
This will enable Filladapt for all modes except C mode, where it doesn't
work well. To turn Filladapt on only in particular major modes, remove
the @code{(setq-default ...)} line and use
@code{turn-on-filladapt-mode}, like this:
@lisp
(add-hook 'text-mode-hook 'turn-on-filladapt-mode)
@end lisp
You can customize filling and adaptive filling with Customize.
Select from the @code{Options} menu
@code{Advanced (Customize)->Emacs->Editing->Fill->Fill...}
or type @kbd{M-x customize @key{RET} fill @key{RET}}.
Note that well-behaving text-lookalike modes will run
@code{text-mode-hook} by default (e.g. that's what Message does). For
the nasty ones, you'll have to provide the @code{add-hook}s yourself.
Please note that the @code{fa-extras} package is no longer useful.
@node Q3.2.5, Q3.3.1, Q3.2.4, Editing
@unnumberedsubsec Q3.2.5: How can I get XEmacs to come up in text/auto-fill mode by default?
Try the following lisp in your @file{init.el}:
@lisp
(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
@end lisp
@strong{WARNING}: note that changing the value of
@code{default-major-mode} from @code{fundamental-mode} can break a large
amount of built-in code that expects newly created buffers to be in
@code{fundamental-mode}. (Changing from @code{fundamental-mode} to
@code{text-mode} might not wreak too much havoc, but changing to
something more exotic like a lisp-mode would break many Emacs packages).
Note that Emacs by default starts up in buffer @code{*scratch*} in
@code{initial-major-mode}, which defaults to
@code{lisp-interaction-mode}. Thus adding the following form to your
Emacs init file will cause the initial @code{*scratch*} buffer to be put
into auto-fill'ed @code{text-mode}:
@lisp
(setq initial-major-mode
(lambda ()
(text-mode)
(turn-on-auto-fill)))
@end lisp
Note that after your init file is loaded, if
@code{inhibit-startup-message} is @code{nil} (the default) and the
startup buffer is @code{*scratch*} then the startup message will be
inserted into @code{*scratch*}; it will be removed after a timeout by
erasing the entire @code{*scratch*} buffer. Keep in mind this default
usage of @code{*scratch*} if you desire any prior manipulation of
@code{*scratch*} from within your Emacs init file. In particular,
anything you insert into @code{*scratch*} from your init file will be
later erased. Also, if you change the mode of the @code{*scratch*}
buffer, be sure that this will not interfere with possible later
insertion of the startup message (e.g. if you put @code{*scratch*} into
a nonstandard mode that has automatic font lock rules, then the startup
message might get fontified in a strange foreign manner, e.g. as code in
some programming language).
@unnumberedsec 3.3: Text Selections
@node Q3.3.1, Q3.3.2, Q3.2.5, Editing
@unnumberedsubsec Q3.3.1: How do I select a rectangular region?
Just select the region normally, then use the rectangle commands (e.g.
@code{kill-rectangle} on it. The region does not highlight as a
rectangle, but the commands work just fine.
To actually sweep out rectangular regions with the mouse you can use
@code{mouse-track-do-rectangle} which is assigned to @kbd{M-button1}.
Then use rectangle commands.
You can also do the following to change default behavior to sweep out
rectangular regions:
@lisp
(setq mouse-track-rectangle-p t)
@end lisp
You can also change this with Customize.
Select from the @code{Options} menu
@code{Advanced (Customize)->Emacs->Editing->Mouse->Track Rectangle...} or type
@kbd{M-x customize @key{RET} mouse @key{RET}}.
@example
mouse-track-do-rectangle: (event)
-- an interactive compiled Lisp function.
Like `mouse-track' but selects rectangles instead of regions.
@end example
@node Q3.3.2, Q3.3.3, Q3.3.1, Editing
@unnumberedsubsec Q3.3.2: How can I turn off or change highlighted selections?
The @code{zmacs} mode allows for what some might call gratuitous
highlighting for selected regions (either by setting mark or by using
the mouse). This is the default behavior. To turn off, add the
following line to your @file{init.el} file:
@lisp
(setq zmacs-regions nil)
@end lisp
You can also change this with Customize. Select from the
@code{Options} menu
@code{Advanced (Customize)->Emacs->Editing->Basics->Zmacs Regions}
or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}.
To change the face for selection, look at @code{Options->Advanced (Customize)}
on the menubar.
@node Q3.3.3, Q3.3.4, Q3.3.2, Editing
@unnumberedsubsec Q3.3.3: How do I cause typing on an active region to remove it?
I want to change things so that if I select some text and start typing,
the typed text replaces the selected text, similar to Motif.
You want to use something called @dfn{pending delete}. Pending delete
is what happens when you select a region (with the mouse or keyboard)
and you press a key to replace the selected region by the key you typed.
Usually backspace kills the selected region.
To get this behavior, ensure that you have the @file{pc} package
installed, and add the following lines to your
@file{init.el}:
@lisp
(cond
((fboundp 'turn-on-pending-delete)
(turn-on-pending-delete))
((fboundp 'pending-delete-on)
(pending-delete-on t)))
@end lisp
Note that this will work with both Backspace and Delete. This code is a
tad more complicated than it has to be for XEmacs in order to make it
more portable.
@node Q3.3.4, Q3.3.5, Q3.3.3, Editing
@unnumberedsubsec Q3.3.4: Can I turn off the highlight during isearch?
I do not like my text highlighted while I am doing isearch as I am not
able to see what's underneath. How do I turn it off?
Put the following in your @file{init.el}:
@lisp
(setq isearch-highlight nil)
@end lisp
You can also change this with Customize. Type
@kbd{M-x customize-variable @key{RET} isearch-highlight @key{RET}}.
Note also that isearch-highlight affects query-replace and ispell.
Instead of disabling isearch-highlight you may find that a better
solution consists of customizing the @code{isearch} face.
@node Q3.3.5, Q3.3.6, Q3.3.4, Editing
@unnumberedsubsec Q3.3.5: Why is killing so slow?
This actually is an X Windows question, although you'll notice it with
keyboard operations as well as while using the GUI. Basically, there
are four ways to communicate interprogram via the X server:
@table @strong
@item Primary selection
a transient selection that gets replaced every time a new selection is made
@item Secondary selection
for "exchanging" with the primary selection
@item Cut buffers
a clipboard internal to the X server (deprecated)
@item Clipboard selection
a selection with a notification protocol that allows a separate app to
manage the clipboard
@end table
The cut buffers are deprecated because managing them is even more
inefficient than the clipboard notification protocol. The primary
selection works fine for many users and applications, but is not very
robust under intensive or sophisticated use.
In Motif and MS Windows, a clipboard has become the primary means for
managing cut and paste. These means that "modern" applications tend to
be oriented toward a true clipboard, rather than the primary selection.
(On Windows, there is nothing equivalent to the primary selection.)
It's not that XEmacs doesn't support the simple primary selection
method, it's that more and more other applications don't.
So the slowdown occurs because XEmacs now engages in the clipboard
notification protocol on @emph{every} kill. This is especially slow on
Motif.
With most people running most clients and server on the same host, and
many of the rest working over very fast communication, you may expect
that the situation is not going to improve.
There are a number of workarounds. The most effective is to use a
special command to do selection ownership only when you intend to paste
to another application. Useful commands are @code{kill-primary-selection}
and @code{copy-primary-selection}. These work only on text selected
with the mouse (probably; experiment), and are bound by default to the
@kbd{Cut} and @kbd{Copy}, respectively, buttons on the toolbar.
@code{copy-primary-selection} is also bound to @kbd{C-Insert}. You can
yank the clipboard contents with @code{yank-primary-selection}, bound to
the @kbd{Paste} toolbar button and @kbd{Sh-Insert}.
If you are communicating by cut and paste with applications that use the
primary selection, then you can customize
@code{interprogram-cut-function} to @code{nil}, restoring the XEmacs
version 20 behavior. How can you tell if a program will support this?
Motifly-correct programs require the clipboard; you lose. For others,
only by trying it. You also need to customize the complementary
@code{interprogram-paste-function} to @code{nil}. (Otherwise
XEmacs-to-XEmacs pastes will not work correctly.)
You may get some relief on Motif by setting
@code{x-selection-strict-motif-ownership} to nil, but this means you will
only intermittently be able to paste XEmacs kills to Motif applications.
Thanks to Jeff Mincy and Glynn Clements for corrections.
@node Q3.3.6, Q3.4.1, Q3.3.5, Editing
@unnumberedsubsec Q3.3.6: Why does @kbd{M-w} take so long?
It actually doesn't. It leaves the region visible for a second so that
you can see what area is being yanked. If you start working, though, it
will immediately complete its operation. In other words, it will only
delay for a second if you let it.
@unnumberedsec 3.4: Editing Source Code
@node Q3.4.1, Q3.4.2, Q3.3.6, Editing
@unnumberedsubsec Q3.4.1: I do not like cc-mode. How do I use the old c-mode?
Well, first off, consider if you really want to do this. cc-mode is
much more powerful than the old c-mode. If you're having trouble
getting your old offsets to work, try using @code{c-set-offset} instead.
You might also consider using the package @code{cc-compat}.
But, if you still insist, add the following lines to your @file{init.el}:
@lisp
(fmakunbound 'c-mode)
(makunbound 'c-mode-map)
(fmakunbound 'c++-mode)
(makunbound 'c++-mode-map)
(makunbound 'c-style-alist)
(load-library "old-c-mode")
(load-library "old-c++-mode")
@end lisp
This must be done before any other reference is made to either c-mode or
c++-mode.
@node Q3.4.2, , Q3.4.1, Editing
@unnumberedsubsec Q3.4.2: How do you make XEmacs indent CL if-clauses correctly?
I'd like XEmacs to indent all the clauses of a Common Lisp @code{if} the
same amount instead of indenting the 3rd clause differently from the
first two.
The package @code{cl-indent} that comes with XEmacs sets up this kind
of indentation by default. @code{cl-indent} also knows about many
other CL-specific forms. To use @code{cl-indent}, one can do this:
@lisp
(setq lisp-indent-function 'common-lisp-indent-function)
@end lisp
One can also customize @file{cl-indent.el} so it mimics the default
@code{if} indentation @code{then} indented more than the @code{else}.
Here's how:
@lisp
(put 'if 'common-lisp-indent-function '(nil nil &body))
@end lisp
@node Display, External Subsystems, Editing, Top
@unnumbered 4 Display Functions
This is part 4 of the XEmacs Frequently Asked Questions list. This
section is devoted to the display-related capabilities of XEmacs
(fonts, colors, modeline, menubar, toolbar, scrollbar, etc.) and how
to customize them.
@menu
4.0: Textual Fonts and Colors
* Q4.0.1:: How do I specify a font?
* Q4.0.2:: How do I set the text, menu and modeline fonts?
* Q4.0.3:: How can I set color options from @file{init.el}?
* Q4.0.4:: How can I set the colors when highlighting a region?
* Q4.0.5:: How can I limit color map usage?
* Q4.0.6:: My tty supports color, but XEmacs doesn't use them.
* Q4.0.7:: Can I have pixmap backgrounds in XEmacs?
* Q4.0.8:: How do I display non-ASCII characters?
* Q4.0.9:: Font selections in don't get saved after @code{Save Options}.
4.1: Syntax Highlighting (Font Lock)
* Q4.1.1:: How can I do source code highlighting using font-lock?
* Q4.1.2:: How do I get @samp{More} Syntax Highlighting on by default?
4.2: The Modeline
* Q4.2.1:: How can I make the modeline go away?
* Q4.2.2:: How do you have XEmacs display the line number in the modeline?
* Q4.2.3:: How do I get XEmacs to put the time of day on the modeline?
* Q4.2.4:: How can I change the modeline color based on the mode used?
4.3: The Cursor
* Q4.3.1:: Is there a way to make the bar cursor thicker?
* Q4.3.2:: Is there a way to get back the block cursor?
* Q4.3.3:: Can I make the cursor blink?
4.4: The Menubar
* Q4.4.1:: How do I get rid of the menubar?
* Q4.4.2:: How can I customize the menubar?
* Q4.4.3:: How do I enable use of the keyboard (@kbd{Alt}) to access menu items?
* Q4.4.4:: How do I control how many buffers are listed in the menu @code{Buffers List}?
* Q4.4.5:: Resources like @code{Emacs*menubar*font} are not working?
4.5: The Toolbar
* Q4.5.1:: How do I get rid of the toolbar?
* Q4.5.2:: How can I customize the toolbar?
* Q4.5.3:: How can I bind a key to a function to toggle the toolbar?
* Q4.5.4:: @samp{Can't instantiate image error...} in toolbar
4.6: Scrollbars and Scrolling
* Q4.6.1:: How can I disable the scrollbar?
* Q4.6.2:: How can I change the scrollbar width?
* Q4.6.3:: How can I use resources to change scrollbar colors?
* Q4.6.4:: Moving the scrollbar can move the point; can I disable this?
* Q4.6.5:: Scrolling one line at a time.
* Q4.6.6:: How can I turn off automatic horizontal scrolling in specific modes?
* Q4.6.7:: I find auto-show-mode disconcerting. How do I turn it off?
4.7: The Gutter Tabs, The Progress Bar, Widgets
* Q4.7.1:: How can I disable the gutter tabs?
* Q4.7.2:: How can I disable the progress bar?
* Q4.7.3:: There are bugs in the gutter or widgets.
* Q4.7.4:: How can I customize the gutter or gutter tabs?
@end menu
@unnumberedsec 4.0: Textual Fonts and Colors
@node Q4.0.1, Q4.0.2, Display, Display
@unnumberedsubsec Q4.0.1: How do I specify a font?
#### Update me.
In 21.4 and above, you can use the @samp{Options} menu to change the font.
You can also do it in your init file, e.g. like this (for MS Windows):
@display
(set-face-font 'default "Lucida Console:Regular:10")
(set-face-font 'modeline "MS Sans Serif:Regular:10")
@end display
@node Q4.0.2, Q4.0.3, Q4.0.1, Display
@unnumberedsubsec Q4.0.2: How do I set the text, menu and modeline fonts?
#### Update me.
Note that you should use @samp{Emacs.} and not @samp{Emacs*} when
setting face values.
In @file{.Xresources}:
@example
Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
Emacs*menubar*font: fixed
Emacs.modeline.attributeFont: fixed
@end example
This is confusing because @samp{default} and @samp{modeline} are face
names, and can be found listed with all faces in the current mode by
using @kbd{M-x set-face-font (enter) ?}. They use the face-specific
resource @samp{attributeFont}.
On the other hand, @samp{menubar} is a normal X thing that uses the
resource @samp{font}. With Motif it @emph{may be} necessary to use
@samp{fontList} @emph{instead of} @samp{font}. In @emph{non-Motif}
configurations with Mule it @emph{is} necessary to use @samp{fontSet}
instead of @samp{font}. (Sorry, there just is no simple recipe here.)
@node Q4.0.3, Q4.0.4, Q4.0.2, Display
@unnumberedsubsec Q4.0.3: How can I set color options from @file{init.el}?
How can I set the most commonly used color options from my
@file{init.el} instead of from my @file{.Xresources}?
Like this:
@lisp
(set-face-background 'default "bisque") ; frame background
(set-face-foreground 'default "black") ; normal text
(set-face-background 'zmacs-region "red") ; When selecting w/
; mouse
(set-face-foreground 'zmacs-region "yellow")
(set-face-font 'default "*courier-bold-r*120-100-100*")
(set-face-background 'highlight "blue") ; Ie when selecting
; buffers
(set-face-foreground 'highlight "yellow")
(set-face-background 'modeline "blue") ; Line at bottom
; of buffer
(set-face-foreground 'modeline "white")
(set-face-font 'modeline "*bold-r-normal*140-100-100*")
(set-face-background 'isearch "yellow") ; When highlighting
; while searching
(set-face-foreground 'isearch "red")
(setq x-pointer-foreground-color "black") ; Adds to bg color,
; so keep black
(setq x-pointer-background-color "blue") ; This is color
; you really
; want ptr/crsr
@end lisp
@node Q4.0.4, Q4.0.5, Q4.0.3, Display
@unnumberedsubsec Q4.0.4: How can I set the colors when highlighting a region?
How can I set the background/foreground colors when highlighting a
region?
You can change the face @code{zmacs-region} either in your
@file{.Xresources}:
@example
Emacs.zmacs-region.attributeForeground: firebrick
Emacs.zmacs-region.attributeBackground: lightseagreen
@end example
or in your @file{init.el}:
@lisp
(set-face-background 'zmacs-region "red")
(set-face-foreground 'zmacs-region "yellow")
@end lisp
@node Q4.0.5, Q4.0.6, Q4.0.4, Display
@unnumberedsubsec Q4.0.5: How can I limit color map usage?
I'm using Netscape (or another color grabber like XEmacs);
is there any way to limit the number of available colors in the color map?
Answer: No, but you can start Netscape before XEmacs, and it will use
the closest available color if the colormap is full. You can also limit
the number of colors Netscape uses, using the flags -mono, -ncols <#> or
-install (for mono, limiting to <#> colors, or for using a private color
map).
If you have the money, another solution would be to use a truecolor or
direct color video.
@node Q4.0.6, Q4.0.7, Q4.0.5, Display
@unnumberedsubsec Q4.0.6: My tty supports color, but XEmacs doesn't use them.
XEmacs tries to automatically determine whether your tty supports color,
but sometimes guesses wrong. In that case, you can make XEmacs Do The
Right Thing using this Lisp code:
@lisp
(if (eq 'tty (device-type))
(set-device-class nil 'color))
@end lisp
@node Q4.0.7, Q4.0.8, Q4.0.6, Display
@unnumberedsubsec Q4.0.7: Can I have pixmap backgrounds in XEmacs?
@c New
@email{jvillaci@@wahnsinnig.extreme.indiana.edu, Juan Villacis} writes:
@quotation
There are several ways to do it. For example, you could specify a
default pixmap image to use in your @file{~/.Xresources}, e.g.,
@example
Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm
@end example
and then reload ~/.Xresources and restart XEmacs. Alternatively,
since each face can have its own pixmap background, a better way
would be to set a face's pixmap within your XEmacs init file, e.g.,
@lisp
(set-face-background-pixmap 'default "/path/to/image.xpm")
(set-face-background-pixmap 'bold "/path/to/another_image.xpm")
@end lisp
and so on. You can also do this interactively via @kbd{M-x edit-faces}.
@end quotation
@node Q4.0.8, Q4.0.9, Q4.0.7, Display
@unnumberedsubsec Q4.0.8: How do I display non-ASCII characters?
@c New
If you're using a Mule-enabled XEmacs, then display is automatic. If
you're not seeing the characters you expect, either (1) you don't have
appropriate fonts available or (2) XEmacs did not correctly detect the
coding system (@pxref{Recognize Coding, , , xemacs}). In case (1),
install fonts as is customary for your platform. In case (2), you
need to tell XEmacs explicitly what coding systems you're using.
@ref{Specify Coding, , , xemacs}.
If your XEmacs is not Mule-enabled, and for some reason getting a
Mule-enabled XEmacs seems like the wrong thing to do, all is not lost.
You can arrange it by brute force. In @file{event-Xt.c} (suppress the
urge to look in this file---play Doom instead, because you'll survive
longer), it is written:
@quotation
In a non-Mule world, a user can still have a multi-lingual editor, by
doing @code{(set-face-font "-*-iso8859-2" (current-buffer))} for all
their Latin-2 buffers, etc.
@end quotation
For the related problem of @emph{inputting} non-ASCII characters in a
non-Mule XEmacs, @xref{Q3.0.6, How can you type in special characters
in XEmacs?}.
@node Q4.0.9, Q4.1.1, Q4.0.8, Display
@unnumberedsubsec Q4.0.9: Font selections in don't get saved after @code{Save Options}.
@email{mannj@@ll.mit.edu, John Mann} writes:
@quotation
You have to go to @samp{Options->Menubars} and unselect
@samp{Frame-Local Font Menu}. If this option is selected, font changes
are only applied to the @emph{current} frame and do @emph{not} get saved
when you save options.
@end quotation
Also, set the following in your @file{init.el}:
@lisp
(setq options-save-faces t)
@end lisp
@unnumberedsec 4.1: Syntax Highlighting (Font Lock)
@node Q4.1.1, Q4.1.2, Q4.0.9, Display
@unnumberedsubsec Q4.1.1: How can I do source code highlighting using font-lock?
For most modes, font-lock is already set up and just needs to be turned
on. This can be done by adding the line:
@lisp
(require 'font-lock)
@end lisp
to your @file{init.el}. (You can turn it on for the
current buffer and session only by @kbd{M-x font-lock-mode}.) See the
file @file{etc/sample.init.el} (@file{etc/sample.emacs} in XEmacs
versions prior to 21.4) for more information.
@c the old way:
@c (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
@c (add-hook 'dired-mode-hook 'turn-on-font-lock)
See also @code{Syntax Highlighting} from the @code{Options} menu.
Remember to save options.
@node Q4.1.2, Q4.2.1, Q4.1.1, Display
@unnumberedsubsec Q4.1.2: How do I get @samp{More} Syntax Highlighting on by default?
Use the following code in your @file{init.el}:
@lisp
(setq-default font-lock-maximum-decoration t)
@end lisp
See also @code{Syntax Highlighting} from the @code{Options} menu.
Remember to save options.
@unnumberedsec 4.2: The Modeline
@node Q4.2.1, Q4.2.2, Q4.1.2, Display
@unnumberedsubsec Q4.2.1: How can I make the modeline go away?
@lisp
(set-specifier has-modeline-p nil)
@end lisp
@node Q4.2.2, Q4.2.3, Q4.2.1, Display
@unnumberedsubsec Q4.2.2: How do you have XEmacs display the line number in the modeline?
Add the following line to your @file{init.el} file to
display the line number:
@lisp
(line-number-mode 1)
@end lisp
Use the following to display the column number:
@lisp
(column-number-mode 1)
@end lisp
Or select from the @code{Options} menu
@iftex
@*
@end iftex
@code{Advanced (Customize)->Emacs->Editing->Basics->Line Number Mode}
and/or
@iftex
@*
@end iftex
@code{Advanced (Customize)->Emacs->Editing->Basics->Column Number Mode}
Or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}.
@node Q4.2.3, Q4.2.4, Q4.2.2, Display
@unnumberedsubsec Q4.2.3: How do I get XEmacs to put the time of day on the modeline?
Add the following line to your @file{init.el} file to
display the time:
@lisp
(display-time)
@end lisp
See @code{Customize} from the @code{Options} menu for customization.
@node Q4.2.4, Q4.3.1, Q4.2.3, Display
@unnumberedsubsec Q4.2.4: How can I change the modeline color based on the mode used?
You can use something like the following:
@lisp
(add-hook 'lisp-mode-hook
(lambda ()
(set-face-background 'modeline "red" (current-buffer))))
@end lisp
Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline
colors change from the default set in your @file{init.el}.
The change will only be made in the buffer you just entered (which
contains the Lisp file you are editing) and will not affect the modeline
colors anywhere else.
Notes:
@itemize @bullet
@item The hook is the mode name plus @code{-hook}. eg. c-mode-hook,
c++-mode-hook, emacs-lisp-mode-hook (used for your
@file{init.el} or a @file{xx.el} file),
lisp-interaction-mode-hook (the @samp{*scratch*} buffer),
text-mode-hook, etc.
@item
Be sure to use @code{add-hook}, not @code{(setq c-mode-hook xxxx)},
otherwise you will erase anything that anybody has already put on the
hook.
@item
You can also do @code{(set-face-font 'modeline @var{font})},
eg. @code{(set-face-font 'modeline "*bold-r-normal*140-100-100*"
(current-buffer))} if you wish the modeline font to vary based on the
current mode.
@end itemize
There are additional modeline faces, @code{modeline-buffer-id},
@code{modeline-mousable}, and @code{modeline-mousable-minor-mode}, which
you may want to customize.
@unnumberedsec 4.3: The Cursor
@node Q4.3.1, Q4.3.2, Q4.2.4, Display
@unnumberedsubsec Q4.3.1: Is there a way to make the bar cursor thicker?
I'd like to have the bar cursor a little thicker, as I tend to "lose" it
often.
For a 1 pixel bar cursor, use:
@lisp
(setq bar-cursor t)
@end lisp
For a 2 pixel bar cursor, use:
@lisp
(setq bar-cursor 'anything-else)
@end lisp
You can also change these with Customize.
Select from the @code{Options} menu
@code{Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...} or type
@kbd{M-x customize @key{RET} display @key{RET}}.
You can use a color to make it stand out better:
@example
Emacs*cursorColor: Red
@end example
@node Q4.3.2, Q4.3.3, Q4.3.1, Display
@unnumberedsubsec Q4.3.2: Is there a way to get back the block cursor?
@lisp
(setq bar-cursor nil)
@end lisp
You can also change this with Customize.
Select from the @code{Options} menu
@code{Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...} or type
@kbd{M-x customize @key{RET} display @key{RET}}.
@node Q4.3.3, Q4.4.1, Q4.3.2, Display
@unnumberedsubsec Q4.3.3: Can I make the cursor blink?
Yes, like this:
@lisp
(blink-cursor-mode)
@end lisp
This function toggles between a steady cursor and a blinking cursor.
You may also set this mode from the menu bar by selecting
@samp{Options->Display->Blinking Cursor}. Remember to save options.
@unnumberedsec 4.4: The Menubar
@node Q4.4.1, Q4.4.2, Q4.3.3, Display
@unnumberedsubsec Q4.4.1: How do I get rid of the menubar?
@lisp
(set-specifier menubar-visible-p nil)
@end lisp
@node Q4.4.2, Q4.4.3, Q4.4.1, Display
@unnumberedsubsec Q4.4.2: How can I customize the menubar?
For an extensive menubar, add this line to your @file{init.el}:
@lisp
(load "big-menubar")
@end lisp
If you'd like to write your own, this file provides as good a set of
examples as any to start from. The file is located in edit-utils
package.
@node Q4.4.3, Q4.4.4, Q4.4.2, Display
@unnumberedsubsec Q4.4.3: How do I enable use of the keyboard (@kbd{Alt}) to access menu items?
#### Write me.
@node Q4.4.4, Q4.4.5, Q4.4.3, Display
@unnumberedsubsec Q4.4.4: How do I control how many buffers are listed in the menu @code{Buffers List}?
Add the following to your @file{init.el} (suit to fit):
@lisp
(setq buffers-menu-max-size 20)
@end lisp
For no limit, use an argument of @samp{nil}.
You can also change this with Customize. Select from the
@code{Options} menu
@code{Advanced (Customize)->Emacs->Environment->Menu->Buffers Menu->Max Size...}
or type @kbd{M-x customize @key{RET} buffers-menu @key{RET}}.
@node Q4.4.5, Q4.5.1, Q4.4.4, Display
@unnumberedsubsec Q4.4.5: Resources like @code{Emacs*menubar*font} are not working?
I am trying to use a resource like @code{Emacs*menubar*font} to set the
font of the menubar but it's not working.
In Motif, the use of @samp{font} resources is obsoleted in order to
support internationalization. If you are using the real Motif menubar,
this resource is not recognized at all; you have to say:
@example
Emacs*menubar*fontList: FONT
@end example
If you are using the Lucid menubar, for backward compatibility with
existing user configurations, the @samp{font} resource is recognized.
Since this is not supported by Motif itself, the code is a kludge and
the @samp{font} resource will be recognized only if the @samp{fontList}
resource resource is unset. This means that the resource
@example
*fontList: FONT
@end example
will override
@example
Emacs*menubar*font: FONT
@end example
even though the latter is more specific.
In non-Motif configurations using @samp{--with-mule} and
@samp{--with-xfs} it @emph{is} necessary to use the @code{fontSet}
resource @emph{instead of} the @code{font} resource. The backward
compatibility kludge was never implemented for non-Motif builds.
Example:
@example
*fontSet: FONT
@end example
@unnumberedsec 4.5: The Toolbar
@node Q4.5.1, Q4.5.2, Q4.4.5, Display
@unnumberedsubsec Q4.5.1: How do I get rid of the toolbar?
#### Write me.
@node Q4.5.2, Q4.5.3, Q4.5.1, Display
@unnumberedsubsec Q4.5.2: How can I customize the toolbar?
#### Write me.
@node Q4.5.3, Q4.5.4, Q4.5.2, Display
@unnumberedsubsec Q4.5.3: How can I bind a key to a function to toggle the toolbar?
Try something like:
@lisp
(defun my-toggle-toolbar ()
(interactive)
(set-specifier default-toolbar-visible-p
(not (specifier-instance default-toolbar-visible-p))))
(global-set-key "\C-xT" 'my-toggle-toolbar)
@end lisp
@ignore
@c Probably not relevant any more
There are redisplay bugs in 19.14 that may make the preceding result in
a messed-up display, especially for frames with multiple windows. You
may need to resize the frame before XEmacs completely realizes the
toolbar is really gone.
@end ignore
Thanks to @email{martin@@xemacs.org, Martin Buchholz} for the correct
code.
@node Q4.5.4, Q4.6.1, Q4.5.3, Display
@unnumberedsubsec Q4.5.4: @samp{Can't instantiate image error...} in toolbar
@email{expt@@alanine.ram.org, Dr. Ram Samudrala} writes:
I just installed the XEmacs (20.4-2) RPMS that I downloaded from
@uref{http://www.xemacs.org/}. Everything works fine, except that when
I place my mouse over the toolbar, it beeps and gives me this message:
@example
Can't instantiate image (probably cached):
[xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data
(16 16 <strange control characters> ...
@end example
@email{kyle_jones@@wonderworks.com, Kyle Jones} writes:
@quotation
This is problem specific to some Chips and Technologies video
chips, when running XFree86. Putting
@code{Option "sw_cursor"}
in @file{XF86Config} gets rid of the problem.
@end quotation
@unnumberedsec 4.6: Scrollbars and Scrolling
@node Q4.6.1, Q4.6.2, Q4.5.4, Display
@unnumberedsubsec Q4.6.1: How can I disable the scrollbar?
To disable them for all frames, add the following line to
your @file{.Xresources}:
@example
Emacs.scrollBarWidth: 0
@end example
Or select @samp{Options->Display->Scrollbars}.
Remember to save options.
To turn the scrollbar off on a per-frame basis, use the following
function:
@lisp
(set-specifier scrollbar-width 0 (selected-frame))
@end lisp
You can actually turn the scrollbars on at any level you want by
substituting for (selected-frame) in the above command. For example, to
turn the scrollbars off only in a single buffer:
@lisp
(set-specifier scrollbar-width 0 (current-buffer))
@end lisp
@node Q4.6.2, Q4.6.3, Q4.6.1, Display
@unnumberedsubsec Q4.6.2: How can I change the scrollbar width?
#### Write me.
@node Q4.6.3, Q4.6.4, Q4.6.2, Display
@unnumberedsubsec Q4.6.3: How can I use resources to change scrollbar colors?
Here's a recap of how to use resources to change your scrollbar colors:
@example
! Motif scrollbars
Emacs*XmScrollBar.Background: skyblue
Emacs*XmScrollBar.troughColor: lightgray
! Athena scrollbars
Emacs*Scrollbar.Foreground: skyblue
Emacs*Scrollbar.Background: lightgray
@end example
Note the capitalization of @code{Scrollbar} for the Athena widget.
@node Q4.6.4, Q4.6.5, Q4.6.3, Display
@unnumberedsubsec Q4.6.4: Moving the scrollbar can move the point; can I disable this?
When I move the scrollbar in an XEmacs window, it moves the point as
well, which should not be the default behavior. Is this a bug or a
feature? Can I disable it?
The current behavior is a feature, not a bug. Point remains at the same
buffer position as long as that position does not scroll off the screen.
In that event, point will end up in either the upper-left or lower-left
hand corner.
This cannot be changed.
@node Q4.6.5, Q4.6.6, Q4.6.4, Display
@unnumberedsubsec Q4.6.5: Scrolling one line at a time.
Can the cursor keys scroll the screen a line at a time, rather than the
default half page jump? I tend it to find it disorienting.
Use the following:
@lisp
(setq scroll-step 1)
@end lisp
You can also change this with Customize. Select from the
@code{Options} menu
@code{Advanced (Customize)->Emacs->Environment->Windows->Scroll Step...}
or type @kbd{M-x customize @key{RET} windows @key{RET}}.
@node Q4.6.6, Q4.6.7, Q4.6.5, Display
@unnumberedsubsec Q4.6.6: How can I turn off automatic horizontal scrolling in specific modes?
Do @code{(setq truncate-lines t)} in the mode-hooks for any modes
in which you want lines truncated.
More precisely: If @code{truncate-lines} is nil, horizontal scrollbars
will never appear. Otherwise, they will appear only if the value of
@code{scrollbar-height} for that buffer/window/etc. is non-zero. If you
do
@lisp
(set-specifier scrollbar-height 0)
@end lisp
then horizontal scrollbars will not appear in truncated buffers unless
the package specifically asked for them.
@node Q4.6.7, Q4.7.1, Q4.6.6, Display
@unnumberedsubsec Q4.6.7: I find auto-show-mode disconcerting. How do I turn it off?
@code{auto-show-mode} controls whether or not a horizontal scrollbar
magically appears when a line is too long to be displayed. This is
enabled by default. To turn it off, put the following in your
@file{init.el}:
@lisp
(setq auto-show-mode nil)
(setq-default auto-show-mode nil)
@end lisp
@unnumberedsec 4.7: The Gutter Tabs, The Progress Bar, Widgets
@node Q4.7.1, Q4.7.2, Q4.6.7, Display
@unnumberedsubsec Q4.7.1: How can I disable the gutter tabs?
#### Write me.
@node Q4.7.2, Q4.7.3, Q4.7.1, Display
@unnumberedsubsec Q4.7.2: How can I disable the progress bar?
#### Write me.
@node Q4.7.3, Q4.7.4, Q4.7.2, Display
@unnumberedsubsec Q4.7.3: There are bugs in the gutter or widgets.
#### Write me.
@node Q4.7.4, , Q4.7.3, Display
@unnumberedsubsec Q4.7.4: How can I customize the gutter or gutter tabs?
#### Write me.
@node External Subsystems, Internet, Display, Top
@unnumbered 5 Interfacing with the Operating System and External Devices
This is part 5 of the XEmacs Frequently Asked Questions list. This
section is devoted to the various ways that XEmacs interfaces with the
operating system, with other processes and with external devices such
as speakers and the printer.
@menu
5.0: X Window System and Resources
* Q5.0.1:: Where is a list of X resources?
* Q5.0.2:: How can I detect a color display?
* Q5.0.3:: How can I get the icon to just say @samp{XEmacs}?
* Q5.0.4:: How can I have the window title area display the full path?
* Q5.0.5:: @samp{xemacs -name junk} doesn't work?
* Q5.0.6:: @samp{-iconic} doesn't work.
5.1: Microsoft Windows
* Q5.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}?
* Q5.1.2:: How do I get Windows Explorer to associate a file type with XEmacs?
5.2: Printing
* Q5.2.1:: What do I need to change to make printing work?
* Q5.2.2:: How can I print WYSIWYG a font-locked buffer?
* Q5.2.3:: Getting @kbd{M-x lpr} to work with postscript printer.
* Q5.2.4:: Can you print under MS Windows?
5.3: Sound
* Q5.3.1:: How do I turn off the sound?
* Q5.3.2:: How do I get funky sounds instead of a boring beep?
* Q5.3.3:: What are NAS and ESD (EsounD)?
* Q5.3.4:: Sunsite sounds don't play.
5.4: Running an Interior Shell, Invoking Subprocesses
* Q5.4.1:: What is an interior shell?
* Q5.4.2:: How do I start up a second shell buffer?
* Q5.4.3:: Telnet from shell filters too much
* Q5.4.4:: Strange things are happening in Shell Mode.
* Q5.4.5:: XEmacs complains "No such file or directory, diff"
* Q5.4.6:: Cygwin error "fork_copy: linked dll/bss pass 0 failed"
5.5: Multiple Device Support
* Q5.5.1:: How do I open a frame on another screen of my multi-headed display?
* Q5.5.2:: Can I really connect to a running XEmacs after calling up over a modem? How?
* Q5.5.3:: How do I disable gnuserv from opening a new frame?
* Q5.5.4:: How do I start gnuserv so that each subsequent XEmacs is a client?
* Q5.5.5:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
@end menu
@unnumberedsec 5.0: X Window System and Resources
@node Q5.0.1, Q5.0.2, External Subsystems, External Subsystems
@unnumberedsubsec Q5.0.1: Where is a list of X resources?
Search through the @file{NEWS} file for @samp{X Resources}. A fairly
comprehensive list is given after it.
In addition, an @file{app-defaults} file @file{etc/Emacs.ad} is
supplied, listing the defaults. The file @file{etc/sample.Xresources}
gives a different set of defaults that you might consider for
installation in your @file{~/.Xresources} file. It is nearly the same
as @file{etc/Emacs.ad}, but a few entries are altered. Be careful about
installing the contents of this file into your @file{.Xresources} (or
legacy @file{.Xdefaults}) file if you use GNU Emacs under X11 as well.
@node Q5.0.2, Q5.0.3, Q5.0.1, External Subsystems
@unnumberedsubsec Q5.0.2: How can I detect a color display?
You can test the return value of the function @code{(device-class)}, as
in:
@lisp
(when (eq (device-class) 'color)
(set-face-foreground 'font-lock-comment-face "Grey")
(set-face-foreground 'font-lock-string-face "Red")
....
)
@end lisp
@node Q5.0.3, Q5.0.4, Q5.0.2, External Subsystems
@unnumberedsubsec Q5.0.3: How can I get the icon to just say @samp{XEmacs}?
I'd like the icon to just say @samp{XEmacs}, and not include the name of
the current file in it.
Add the following line to your @file{init.el}:
@lisp
(setq frame-icon-title-format "XEmacs")
@end lisp
@node Q5.0.4, Q5.0.5, Q5.0.3, External Subsystems
@unnumberedsubsec Q5.0.4: How can I have the window title area display the full path?
I'd like to have the window title area display the full directory/name
of the current buffer file and not just the name.
Add the following line to your @file{init.el}:
@lisp
(setq frame-title-format "%S: %f")
@end lisp
A more sophisticated title might be:
@lisp
(setq frame-title-format
'("%S: " (buffer-file-name "%f"
(dired-directory dired-directory "%b"))))
@end lisp
That is, use the file name, or the dired-directory, or the buffer name.
@node Q5.0.5, Q5.0.6, Q5.0.4, External Subsystems
@unnumberedsubsec Q5.0.5: @samp{xemacs -name junk} doesn't work?
When I run @samp{xterm -name junk}, I get an xterm whose class name
according to xprop, is @samp{junk}. This is the way it's supposed to
work, I think. When I run @samp{xemacs -name junk} the class name is
not set to @samp{junk}. It's still @samp{emacs}. What does
@samp{xemacs -name} really do? The reason I ask is that my window
manager (fvwm) will make a window sticky and I use XEmacs to read my
mail. I want that XEmacs window to be sticky, without having to use the
window manager's function to set the window sticky. What gives?
@samp{xemacs -name} sets the application name for the program (that is,
the thing which normally comes from @samp{argv[0]}). Using @samp{-name}
is the same as making a copy of the executable with that new name. The
@code{WM_CLASS} property on each frame is set to the frame-name, and the
application-class. So, if you did @samp{xemacs -name FOO} and then
created a frame named @var{BAR}, you'd get an X window with WM_CLASS =
@code{( "BAR", "Emacs")}. However, the resource hierarchy for this
widget would be:
@example
Name: FOO .shell .container .BAR
Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
@end example
instead of the default
@example
Name: xemacs.shell .container .emacs
Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
@end example
It is arguable that the first element of WM_CLASS should be set to the
application-name instead of the frame-name, but I think that's less
flexible, since it does not give you the ability to have multiple frames
with different WM_CLASS properties. Another possibility would be for
the default frame name to come from the application name instead of
simply being @samp{emacs}. However, at this point, making that change
would be troublesome: it would mean that many users would have to make
yet another change to their resource files (since the default frame name
would suddenly change from @samp{emacs} to @samp{xemacs}, or whatever
the executable happened to be named), so we'd rather avoid it.
To make a frame with a particular name use:
@lisp
(make-frame '((name . "the-name")))
@end lisp
@node Q5.0.6, Q5.1.1, Q5.0.5, External Subsystems
@unnumberedsubsec Q5.0.6: @samp{-iconic} doesn't work.
When I start up XEmacs using @samp{-iconic} it doesn't work right.
Using @samp{-unmapped} on the command line, and setting the
@code{initiallyUnmapped} X Resource don't seem to help much either...
@email{ben@@xemacs.org, Ben Wing} writes:
@quotation
Ugh, this stuff is such an incredible mess that I've about given up
getting it to work. The principal problem is numerous window-manager
bugs...
@end quotation
@unnumberedsec 5.1: Microsoft Windows
@node Q5.1.1, Q5.1.2, Q5.0.6, External Subsystems
@unnumberedsubsec Q5.1.1: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}?
In his flavor of Emacs 20, Richard Stallman has renamed all the @samp{win32-*}
symbols to @samp{w32-*}. Does XEmacs do the same?
We consider such a move counter-productive, thus we do not use the
@samp{w32} prefix. (His rather questionable justification was that he
did not consider Windows to be a "winning" platform.) However, the name
@samp{Win32} is not particularly descriptive outside the Windows world,
and using just @samp{windows-} would be too generic. So we chose a
compromise, the prefix @samp{mswindows-} for Windows-related variables
and functions.
Thus all the XEmacs variables and functions directly related to either
the Windows GUI or OS are prefixed @samp{mswindows-} (except for a
couple of debugging variables, prefixed @samp{debug-mswindows-}). From
an architectural perspective, however, we believe that this is mostly a
non-issue because there should be a very small number of
window-systems-specific variables anyway. Whenever possible, we try to
provide generic interfaces that apply to all window systems.
@c not true:
@c The user variables
@c that share functionality with existing NT Emacs variables are be named
@c with our convention, but we provide the GNU Emacs names as
@c compatibility aliases.
@node Q5.1.2, Q5.2.1, Q5.1.1, External Subsystems
@unnumberedsubsec Q5.1.2: How do I get Windows Explorer to associate a file type with XEmacs?
@unnumberedsubsubsec Associating a new file type with XEmacs.
In Explorer select @samp{View->Options->File Types}, press @samp{[New
Type...]} and fill in the dialog box, e.g.:
@example
Description of type: Emacs Lisp source
Associated extension: el
Content Type (MIME): text/plain
@end example
then press @samp{[New...]} and fill in the @samp{Action} dialog box as
follows:
@example
Action:
Open
Application used to perform action:
D:\Full\path\for\xemacs.exe "%1"
[x] Use DDE
DDE Message:
open("%1")
Application:
<leave blank>
DDE Application Not Running:
<leave blank>
Topic:
<leave blank>
@end example
@unnumberedsubsubsec Associating an existing file type with XEmacs.
In Explorer select @samp{View->Options->File Types}. Click on the file
type in the list and press @samp{[Edit...]}. If the file type already
has an @samp{Open} action, double click on it and fill in the
@samp{Action} dialog box as described above; otherwise create a new
action.
If the file type has more than one action listed, you probably want to
make the @samp{Open} action that you just edited the default by clicking on
it and pressing @samp{Set Default}.
Note for Windows 2000 users: Under Windows 2000, get to @samp{File Types}
using @samp{Control Panel->Folder Options->File Types}.
@unnumberedsec 5.2: Printing
@node Q5.2.1, Q5.2.2, Q5.1.2, External Subsystems
@unnumberedsubsec Q5.2.1: What do I need to change to make printing work?
For regular printing there are two variables that can be customized.
@table @code
@item lpr-command
This should be set to a command that takes standard input and sends
it to a printer. Something like:
@lisp
(setq lpr-command "lp")
@end lisp
@item lpr-switches
This should be set to a list that contains whatever the print command
requires to do its job. Something like:
@lisp
(setq lpr-switches '("-depson"))
@end lisp
@end table
For postscript printing there are three analogous variables to
customize.
@table @code
@item ps-lpr-command
This should be set to a command that takes postscript on standard input
and directs it to a postscript printer.
@item ps-lpr-switches
This should be set to a list of switches required for
@code{ps-lpr-command} to do its job.
@item ps-print-color-p
This boolean variable should be set @code{t} if printing will be done in
color, otherwise it should be set to @code{nil}.
@end table
NOTE: It is an undocumented limitation in XEmacs that postscript
printing (the @code{Pretty Print Buffer} menu item) @strong{requires} a
window system environment. It cannot be used outside of X11.
@node Q5.2.2, Q5.2.3, Q5.2.1, External Subsystems
@unnumberedsubsec Q5.2.2: How can I print WYSIWYG a font-locked buffer?
Font-lock looks nice. How can I print (WYSIWYG) the highlighted
document?
The package @code{ps-print}, which is now included with XEmacs, provides
the ability to do this. The source code contains complete instructions
on its use, in
@file{$prefix/lib/xemacs/xemacs-packages/lisp/ps-print/ps-print.el},
being the default location of an installed ps-print package.
@node Q5.2.3, Q5.2.4, Q5.2.2, External Subsystems
@unnumberedsubsec Q5.2.3: Getting @kbd{M-x lpr} to work with postscript printer.
My printer is a Postscript printer and @code{lpr} only works for
Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x
lpr-buffer} to work?
Put something like this in your @file{init.el}:
@lisp
(setq lpr-command "a2ps")
(setq lpr-switches '("-p" "-1"))
@end lisp
If you don't use a2ps to convert ASCII to postscript (why not, it's
free?), replace with the command you do use. Note also that some
versions of a2ps require a @samp{-Pprinter} to ensure spooling.
@node Q5.2.4, Q5.3.1, Q5.2.3, External Subsystems
@unnumberedsubsec Q5.2.4: Can you print under MS Windows?
As of 21.4, printing works on Windows, using simply
@samp{File->Print BUFFER...}, and can be configured with
@samp{File->Page Setup...}.
Prior to 21.4, there is no built-in support, but there are some clever
hacks out there. If you know how, please let us know and we'll put it
here.
@unnumberedsec 5.3: Sound
@node Q5.3.1, Q5.3.2, Q5.2.4, External Subsystems
@unnumberedsubsec Q5.3.1: How do I turn off the sound?
Add the following line to your @file{init.el}:
@lisp
(setq bell-volume 0)
(setq sound-alist nil)
@end lisp
That will make your XEmacs totally silent---even the default ding sound
(TTY beep on TTY-s) will be gone.
You can also change these with Customize. Select from the
@code{Options} menu @code{Advanced
(Customize)->Emacs->Environment->Sound->Sound...} or type @kbd{M-x
customize @key{RET} sound @key{RET}}.
@node Q5.3.2, Q5.3.3, Q5.3.1, External Subsystems
@unnumberedsubsec Q5.3.2: How do I get funky sounds instead of a boring beep?
Make sure your XEmacs was compiled with sound support, and then put this
in your @file{init.el}:
@lisp
(load-default-sounds)
@end lisp
@node Q5.3.3, Q5.3.4, Q5.3.2, External Subsystems
@unnumberedsubsec Q5.3.3: What are NAS and ESD (EsounD)?
@dfn{Network Audio System} (NAS) is a client-server sound library for X.
@uref{http://radscan.com/nas.html}.
To build XEmacs with it, use the @file{configure} flag
@samp{--with-sound=nas} (@samp{--enable-sound=nas} in 21.5 or later).
@dfn{Enlightened Sound Daemon} (ESD or EsounD) is yet another sound system.
@uref{http://www.tux.org/~ricdude/EsounD.html}.
To build XEmacs with it, use the @file{configure} flag
@samp{--with-sound=esd} (@samp{--enable-sound=esd} in 21.5 or later).
You can specify support for both with a flag like
@samp{--with-sound=nas,esd} (@samp{--enable-sound=nas,esd} in 21.5 or
later).
@node Q5.3.4, Q5.4.1, Q5.3.3, External Subsystems
@unnumberedsubsec Q5.3.4: Sunsite sounds don't play.
I'm having some trouble with sounds I've downloaded from sunsite. They
play when I run them through @code{showaudio} or cat them directly to
@file{/dev/audio}, but XEmacs refuses to play them.
@email{gutschk@@uni-muenster.de, Markus Gutschke} writes:
@quotation
[Many of] These files have an (erroneous) 24byte header that tells about
the format that they have been recorded in. If you cat them to
@file{/dev/audio}, the header will be ignored and the default behavior
for /dev/audio will be used. This happens to be 8kHz uLaw. It is
probably possible to fix the header by piping through @code{sox} and
passing explicit parameters for specifying the sampling format; you then
need to perform a 'null' conversion from SunAudio to SunAudio.
@end quotation
@unnumberedsec 5.4: Running an Interior Shell, Invoking Subprocesses
@node Q5.4.1, Q5.4.2, Q5.3.4, External Subsystems
@unnumberedsubsec Q5.4.1: What is an interior shell?
#### Write me.
@node Q5.4.2, Q5.4.3, Q5.4.1, External Subsystems
@unnumberedsubsec Q5.4.2: How do I start up a second shell buffer?
In the @code{*shell*} buffer:
@lisp
M-x rename-buffer @key{RET} *shell-1* @key{RET}
M-x shell RET
@end lisp
This will then start a second shell. The key is that no buffer named
@samp{*shell*} can exist. It might be preferable to use @kbd{M-x
rename-uniquely} to rename the @code{*shell*} buffer instead of @kbd{M-x
rename-buffer}.
Alternately, you can set the variable @code{shell-multiple-shells}.
If the value of this variable is non-nil, each time shell mode is invoked,
a new shell is made
@node Q5.4.3, Q5.4.4, Q5.4.2, External Subsystems
@unnumberedsubsec Q5.4.3: Telnet from shell filters too much
I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke
and use a telnet session within it. Everything works fine except that
now all @samp{^M}'s are filtered out by Emacs. Fixes?
Use @kbd{M-x rsh} or @kbd{M-x telnet} to open remote sessions rather
than doing rsh or telnet within the local shell buffer. You can also
use @kbd{M-x ssh} to open secure remote session if you have @code{ssh}
installed.
@node Q5.4.4, Q5.4.5, Q5.4.3, External Subsystems
@unnumberedsubsec Q5.4.4: Strange things are happening in Shell Mode.
Sometimes (i.e. it's not repeatable, and I can't work out why it
happens) when I'm typing into shell mode, I hit return and only a
portion of the command is given to the shell, and a blank prompt is
returned. If I hit return again, the rest of the previous command is
given to the shell.
@email{martin@@xemacs.org, Martin Buchholz} writes:
@quotation
There is a known problem with interaction between @code{csh} and the
@code{filec} option and XEmacs. You should add the following to your
@file{.cshrc}:
@example
if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
@end example
@end quotation
@node Q5.4.5, Q5.4.6, Q5.4.4, External Subsystems
@unnumberedsubsec Q5.4.5: XEmacs complains "No such file or directory, diff"
or "ispell" or other commands that seem related to whatever you just
tried to do (M-x ediff or M-$, for example).
There are a large number of common (in the sense that "everyone has
these, they really do") Unix utilities that are not provided with
XEmacs. The GNU Project's implementations are available for Windows in
the the Cygwin distribution (@uref{http://www.cygwin.com/}), which also
provides a complete Unix emulation environment (and thus makes ports of
Unix utilities nearly trivial). Another implementation is that from
MinGW (@uref{http://www.mingw.org/msys.shtml}). If you know of others,
please let us know!
@node Q5.4.6, Q5.5.1, Q5.4.5, External Subsystems
@unnumberedsubsec Q5.4.6: Cygwin error "fork_copy: linked dll/bss pass 0 failed"
If you are getting an error like
@example
17797832 [main] bash 3468 fork_copy: linked dll/bss pass 0 failed,
0x675000..0x6756A0, done 0, windows pid 2708, Win 32 error 487
bash: fork: resource temporarily unavailable
@end example
when trying to run bash using @kbd{M-x shell}, then you need to rebase
your Cygwin DLL's. This is a known problem with Cygwin. To fix:
@enumerate
@item
Download the @file{rebase} utility from Cygwin setup (it's under
@samp{System}).
@item
Kill @strong{all} of your Cygwin processes, including all of your
shells and all background processes. Use @code{ps -a} to list all the
processes you need to kill.
@item
From a DOS prompt, run @file{ash} (@strong{not} @file{bash},
@file{tcsh} or @file{zsh}). Do not try to be clever and @code{exec
/bin/ash} from your last shell; it won't work.
@item
Type @code{/bin/rebaseall -v}.
@end enumerate
The problem should now be fixed -- at least, until you install another
Cygwin package with DLL's, in which case you may have to repeat the
procedure.
@unnumberedsec 5.5: Multiple Device Support
@node Q5.5.1, Q5.5.2, Q5.4.6, External Subsystems
@unnumberedsubsec Q5.5.1: How do I open a frame on another screen of my multi-headed display?
Use the command @kbd{M-x make-frame-on-display}. This command is also
on the File menu in the menubar.
The command @code{make-frame-on-tty} also exists, which will establish a
connection to any tty-like device. Opening the TTY devices should be
left to @code{gnuclient}, though.
@node Q5.5.2, Q5.5.3, Q5.5.1, External Subsystems
@unnumberedsubsec Q5.5.2: Can I really connect to a running XEmacs after calling up over a modem? How?
Yes. Use @code{gnuclient -nw}.
Also see @ref{Q5.5.3, How do I disable gnuserv from opening a new frame?}.
@node Q5.5.3, Q5.5.4, Q5.5.2, External Subsystems
@unnumberedsubsec Q5.5.3: How do I disable gnuserv from opening a new frame?
If you set the @code{gnuserv-frame} variable to the frame that should be
used to display buffers that are pulled up, a new frame will not be
created. For example, you could put
@lisp
(setq gnuserv-frame (selected-frame))
@end lisp
early on in your @file{init.el}, to ensure that the first frame created
is the one used for your gnuserv buffers.
There is an option to set the gnuserv target to the current frame. See
@code{Options->Display->"Other Window" Location->Make Current Frame Gnuserv Target}
You can also change this with Customize. Select from the
@code{Options} menu @code{Advanced
(Customize)->Emacs->Environment->Gnuserv->Gnuserv Frame...} or type
@kbd{M-x customize @key{RET} gnuserv @key{RET}}.
@node Q5.5.4, Q5.5.5, Q5.5.3, External Subsystems
@unnumberedsubsec Q5.5.4: How do I start gnuserv so that each subsequent XEmacs is a client?
Put the following in your @file{init.el} file to start the server:
@lisp
(gnuserv-start)
@end lisp
Start your first XEmacs as usual. After that, you can do:
@example
gnuclient randomfilename
@end example
from the command line to get your existing XEmacs process to open a new
frame and visit randomfilename in that window. When you're done editing
randomfilename, hit @kbd{C-x #} to kill the buffer and get rid of the
frame.
See also man page of gnuclient.
@node Q5.5.5, , Q5.5.4, External Subsystems
@unnumberedsubsec Q5.5.5: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
@email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
@quotation
Here is one of the solutions, we have this in a script called
@file{etc/editclient.sh}.
@example
#!/bin/sh
if gnuclient -batch -eval t >/dev/null 2>&1
then
exec gnuclient $@{1+"$@@"@}
else
xemacs -unmapped -f gnuserv-start &
until gnuclient -batch -eval t >/dev/null 2>&1
do
sleep 1
done
exec gnuclient $@{1+"$@@"@}
fi
@end example
Note that there is a known problem when running XEmacs and 'gnuclient
-nw' on the same TTY.
@end quotation
@node Internet, Advanced, External Subsystems, Top
@unnumbered 6 Connecting to the Internet
This is part 6 of the XEmacs Frequently Asked Questions list. This
section is devoted connecting to the Internet.
@menu
6.0: General Mail and News
* Q6.0.1:: What are the various packages for reading mail?
* Q6.0.2:: How can I send mail?
* Q6.0.3:: How do I get my outgoing mail archived?
* Q6.0.4:: How can I read and/or compose MIME messages?
* Q6.0.5:: How do I customize the From line?
* Q6.0.6:: How do I get my MUA to filter mail for me?
* Q6.0.7:: Remote mail reading with an MUA.
* Q6.0.8:: An MUA gets an error incorporating new mail.
* Q6.0.9:: Why isn't @file{movemail} working?
* Q6.0.10:: How do I make my MUA display graphical smilies?
* Q6.0.11:: How can I get those oh-so-neat X-Face lines?
6.1: Reading Mail with VM
* Q6.1.1:: How do I set up VM to retrieve mail from a remote site using POP?
* Q6.1.2:: How can I get VM to automatically check for new mail?
* Q6.1.3:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
* Q6.1.4:: Is there a mailing list or FAQ for VM?
* Q6.1.5:: How do I make VM stay in a single frame?
* Q6.1.6:: Customization of VM not covered in the manual, or here.
6.2: Reading Netnews and Mail with Gnus
* Q6.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!
* Q6.2.2:: How do I make Gnus stay within a single frame?
6.3: FTP Access
* Q6.3.1:: Can I edit files on other hosts?
* Q6.3.2:: What is EFS?
6.4: Web Browsing with W3
* Q6.4.1:: What is W3?
* Q6.4.2:: How do I run W3 from behind a firewall?
* Q6.4.3:: Is it true that W3 supports style sheets and tables?
@end menu
@unnumberedsec 6.0: General Mail and News
@node Q6.0.1, Q6.0.2, Internet, Internet
@unnumberedsubsec Q6.0.1: What are the various packages for reading mail?
#### Write me.
@node Q6.0.2, Q6.0.3, Q6.0.1, Internet
@unnumberedsubsec Q6.0.2: How can I send mail?
Under Unix and Mac OS X, the @samp{sendmail} package is normally used
for this.
#### Write me.
Under Windows, you need to use @samp{smtpmail}, which communicates
directly with the mail server, as there is no @file{sendmail} program
running. To get it working, use code like the following in your
@file{init.el} file:
@lisp
;; Get mail working under Windows.
(setq message-send-mail-function 'smtpmail-send-it) ; for message/Gnus
(setq send-mail-function 'smtpmail-send-it) ; for C-x m, etc.
;; the following ensures that mail problems can be debugged: it logs a trace
;; of the SMTP conversation to *trace of SMTP session to <somewhere>*.
(setq smtpmail-debug-info t)
;; Substitute your info here.
;(setq user-mail-address "ben@@xemacs.org")
;(setq user-full-name "Ben Wing")
;(setq smtpmail-default-smtp-server "smtp.myserver.myisp.com")
;; The following two aren't completely necessary but may help.
;(setq smtpmail-local-domain "666.com")
;(setq smtpmail-sendto-domain "666.com")
;; If your SMTP server requires a username/password to authenticate, as
;; many do nowadays, set them like this:
;(setq smtpmail-auth-credentials ; or use ~/.authinfo
; '(("smtp.myserver.myisp.com" 25 "USER@@SOMEWHERE" "PASSWORD")))
;; Other possibilities for getting smtpmail to work:
;;
;; If for some reason you need to authenticate using the STARTTLS protocol
;; (don't look into this unless you know what it is), use
;; (setq smtpmail-starttls-credentials
;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert")))
;; Requires external program
;; ftp://ftp.opaopa.org/pub/elisp/starttls-*.tar.gz.
;; See http://www.ietf.org/rfc/rfc2246.txt,
;; http://www.ietf.org/rfc/rfc2487.txt
@end lisp
The lines you need to care about are those that set
@code{user-mail-address}, @code{user-full-name},
@code{smtpmail-default-smtp-server}, and
@code{smtpmail-auth-credentials}. You need to set these with,
respectively, your email address, your full name, the SMTP server you
use for outgoing mail, and the username and password you need to log
in to your SMTP server. (If for some reason your SMTP server doesn't
require logging in to send mail, don't uncomment this last line.)
The other settings may be useful in specific cases, but you should know what
you're doing before enabling them.
@node Q6.0.3, Q6.0.4, Q6.0.2, Internet
@unnumberedsubsec Q6.0.3: How do I get my outgoing mail archived?
@lisp
(setq mail-archive-file-name "~/outbox")
@end lisp
@node Q6.0.4, Q6.0.5, Q6.0.3, Internet
@unnumberedsubsec Q6.0.4: How can I read and/or compose MIME messages?
VM, MH-E and GNUS support MIME natively. Other MUAs may or may not
have MIME support; refer to their documentation and other resources,
such as web pages and mailing lists. Packages like SEMI/WEMI may be
useful in connection with MUAs like mew and Wanderlust.
@node Q6.0.5, Q6.0.6, Q6.0.4, Internet
@unnumberedsubsec Q6.0.5: How do I customize the From line?
How do I change the @samp{From:} line? I have set gnus-user-from-line
to
@example
Gail Gurman <gail.gurman@@sybase.com>
@end example
@noindent , but XEmacs Gnus doesn't use
it. [This should apply to all MUA's. --ed] Instead it uses
@example
Gail Mara Gurman @email{gailg@@deall}
@end example
@noindent and then complains
that it's incorrect. Also, as you perhaps can see, my Message-ID is
screwy. How can I change that?
@email{larsi@@ifi.uio.no, Lars Magne Ingebrigtsen} writes:
@quotation
Set @code{user-mail-address} to @samp{gail.gurman@@sybase.com} or
@code{mail-host-address} to @samp{sybase.com}.
@end quotation
@node Q6.0.6, Q6.0.7, Q6.0.5, Internet
@unnumberedsubsec Q6.0.6: How do I get my MUA to filter mail for me?
One possibility is to use procmail to split your mail before it gets to
the MUA. I prefer this personally, since there are many strange and
wonderful things one can do with procmail. Procmail may be found at
@uref{http://www.procmail.org/}.
Also see the Mail Filtering FAQ at:
@iftex
@*
@end iftex
@uref{http://www.faqs.org/faqs/mail/filtering-faq/}.
@node Q6.0.7, Q6.0.8, Q6.0.6, Internet
@unnumberedsubsec Q6.0.7: Remote mail reading with an MUA.
My mailbox lives at the office on a big honkin server. My regular INBOX
lives on my honkin desktop machine. I now can PPP to the office from
home which is far from honking... I'd like to be able to read mail at
home without storing it here and I'd like to use xemacs and the MUA at
home... Is there a recommended setup?
@email{nuspl@@nvwls.cc.purdue.edu, Joseph J. Nuspl Jr.} writes:
@quotation
There are several ways to do this.
@enumerate
@item
Set your display to your home machine and run dxpc or one of the other X
compressors.
@item
NFS mount your desktop machine on your home machine and modify your pop
command on your home machine to rsh to your desktop machine and actually
do the pop get's.
@item
Run a POP server on your desktop machine as well and do a sort of two
tiered POP get.
@end enumerate
@end quotation
@email{wmperry@@monolith.spry.com, William Perry} adds:
@quotation
Or you could run a pop script periodically on your desktop machine, and
just use ange-ftp or NFS to get to your mailbox. I used to do this all
the time back at IU.
@end quotation
@node Q6.0.8, Q6.0.9, Q6.0.7, Internet
@unnumberedsubsec Q6.0.8: An MUA gets an error incorporating new mail.
rmail and VM, and probably other MUA's as well, get new mail from
your mailbox (called @file{/var/mail/$USER} or @file{/var/spool/mail/$USER}
or something similar) using a program called @code{movemail}.
This program interlocks with @code{/bin/mail} using the protocol
defined by @code{/bin/mail}.
There are various different protocols in general use, which you need to
specify using the @samp{--mail-locking} option
(@samp{--with-mail-locking} in 21.5 or later) to @file{configure}:
@table @samp
@item lockf
POSIX file locking with @code{lockf()}
@item flock
BSD file locking with @code{flock()}
@item dot
To manipulate mail file @file{foo}, first create file @file{foo.lock}
@item locking
Use @code{locking()}, Microsoft's renamed @code{flock()}
@item mmdf
Use @code{lk_open()} and @code{lk_close()} as defined by the Multi-channel
Memo Distribution Facility
@item pop
Retrieve mail using POP (the Post Office Protocol). This is the
default for Cygwin/MinGW.
@end table
@strong{IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
SYSTEM, YOU CAN LOSE MAIL!}
Usually the value is correctly determined automatically:
@file{configure} tries to detect the method in use, and defaults exist
on systems for which this doesn't work.
However, if you run into problems incorporating new mail, it may be
because an incorrect method is being used.
If your system uses the lock file protocol, and permissions are set
so that ordinary users cannot write lock files in the mail spool
directory, you may need to make @file{movemail} setgid to a
suitable group such as @samp{mail}. You can use these commands (as
root):
@example
chgrp mail movemail
chmod 2755 movemail
@end example
If you are using the @samp{pop} locking method, @file{movemail} must
be setuid root.
Installation normally copies movemail from the build directory to an
installation directory which is usually under @file{/usr/local/lib}.
The installed copy of @file{movemail} is usually in the directory
@file{/usr/local/lib/xemacs-VERSION/TARGET} (for example,
@file{/usr/local/lib/xemacs-21.4.15/i686-pc-cygwin}). You must change
the group and mode of the installed copy; changing the group and mode
of the build directory copy is ineffective.
@node Q6.0.9, Q6.0.10, Q6.0.8, Internet
@unnumberedsubsec Q6.0.9: Why isn't @file{movemail} working?
@xref{Q6.0.8}.
Note also that older versions of Mozilla came with a @file{movemail}
program that is @strong{not} compatible with XEmacs. Do not use it.
Always use the @file{movemail} installed with your XEmacs. Failure to
do so can result in lost mail.
@node Q6.0.10, Q6.0.11, Q6.0.9, Internet
@unnumberedsubsec Q6.0.10: How do I make my MUA display graphical smilies?
For mh-e use the following:
@lisp
(add-hook 'mh-show-mode-hook '(lambda ()
(smiley-region (point-min)
(point-max))))
@end lisp
@email{bill@@carpenter.ORG, WJCarpenter} writes:
For VM use the following:
@lisp
(autoload 'smiley-region "smiley" nil t)
(add-hook 'vm-select-message-hook
'(lambda ()
(smiley-region (point-min)
(point-max))))
@end lisp
For tm use the following:
@lisp
(autoload 'smiley-buffer "smiley" nil t)
(add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)
@end lisp
@node Q6.0.11, Q6.1.1, Q6.0.10, Internet
@unnumberedsubsec Q6.0.11: How can I get those oh-so-neat X-Face lines?
Firstly there is an ftp site which describes X-faces and has the
associated tools mentioned below, at
@uref{http://ftp.cs.indiana.edu/pub/faces/}.
Then the steps are
@enumerate
@item
Create 48x48x1 bitmap with your favorite tool
@item
Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc.,
and then compile the face.
@item
@example
cat file.xbm | xbm2ikon |compface > file.face
@end example
@item
Then be sure to quote things that are necessary for emacs strings:
@example
cat ./file.face | sed 's/\\/\\\\/g'
@iftex
\ @*
@end iftex
| sed 's/\"/\\\"/g' > ./file.face.quoted
@end example
@item
Then set up emacs to include the file as a mail header - there were a
couple of suggestions here---either something like:
@lisp
(setq mail-default-headers
"X-Face: @email{Ugly looking text string here}")
@end lisp
Or, alternatively, as:
@lisp
(defun mail-insert-x-face ()
(save-excursion
(goto-char (point-min))
(search-forward mail-header-separator)
(beginning-of-line)
(insert "X-Face:")
(insert-file-contents "~/.face")))
(add-hook 'mail-setup-hook 'mail-insert-x-face)
@end lisp
@end enumerate
However, 2 things might be wrong:
Some versions of pbmtoicon produces some header lines that is not
expected by the version of compface that I grabbed. So I found I had to
include a @code{tail +3} in the pipeline like this:
@example
cat file.xbm | xbm2ikon | tail +3 |compface > file.face
@end example
Some people have also found that if one uses the @code{(insert-file)}
method, one should NOT quote the face string using the sed script .
It might also be helpful to use @email{stig@@hackvan.com, Stig's} script
xbm2face (included in the compface distribution at XEmacs.org) to do the
conversion.
Contributors for this item:
Paul Emsley,
Ricardo Marek,
Amir J. Katz,
Glen McCort,
Heinz Uphoff,
Peter Arius,
Paul Harrison, and
Vegard Vesterheim
@unnumberedsec 6.1: Reading Mail with VM
@node Q6.1.1, Q6.1.2, Q6.0.11, Internet
@unnumberedsubsec Q6.1.1: How do I set up VM to retrieve mail from a remote site using POP?
Use @code{vm-spool-files}, like this for example:
@lisp
(setq vm-spool-files '("/var/spool/mail/wing"
"netcom23.netcom.com:110:pass:wing:MYPASS"))
@end lisp
Of course substitute your actual password for MYPASS.
@node Q6.1.2, Q6.1.3, Q6.1.1, Internet
@unnumberedsubsec Q6.1.2: How can I get VM to automatically check for new mail?
@email{turner@@lanl.gov, John Turner} writes:
@quotation
Use the following:
@lisp
(setq vm-auto-get-new-mail 60)
@end lisp
@end quotation
@node Q6.1.3, Q6.1.4, Q6.1.2, Internet
@unnumberedsubsec Q6.1.3: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
Set @code{vm-reply-ignored-addresses} to a list, like
@lisp
(setq vm-reply-ignored-addresses
'("wing@@nuspl@@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
"wing@@netcom.com" "wing@@xemacs.org"))
@end lisp
Note that each string is a regular expression.
@node Q6.1.4, Q6.1.5, Q6.1.3, Internet
@unnumberedsubsec Q6.1.4: Is there a mailing list or FAQ for VM?
A FAQ for VM exists at @uref{http://www.wonderworks.com/vm/FAQ.html}.
VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.
@node Q6.1.5, Q6.1.6, Q6.1.4, Internet
@unnumberedsubsec Q6.1.5: How do I make VM stay in a single frame?
John.@email{Cooper@@Eng.Sun.COM, John S Cooper} writes:
@quotation
@lisp
; Don't use multiple frames
(setq vm-frame-per-composition nil)
(setq vm-frame-per-folder nil)
(setq vm-frame-per-edit nil)
(setq vm-frame-per-summary nil)
@end lisp
@end quotation
@node Q6.1.6, Q6.2.1, Q6.1.5, Internet
@unnumberedsubsec Q6.1.6: Customization of VM not covered in the manual, or here.
@email{boffi@@hp735.stru.polimi.it, giacomo boffi} writes:
@quotation
The meta-answer is to look into the file @file{vm-vars.el}, in the vm
directory of the lisp library.
@file{vm-vars.el} contains, initializes and carefully describes, with
examples of usage, the plethora of user options that @emph{fully}
control VM's behavior.
Enter vm-vars, @code{forward-search} for toolbar, find the variables
that control the toolbar placement, appearance, existence, copy to your
@file{init.el} or @file{.vm} and modify according to the
detailed instructions.
The above also applies to all the various features of VM: search for
some keywords, maybe the first you conjure isn't appropriate, find the
appropriate variables, copy and experiment.
@end quotation
@unnumberedsec 6.2: Reading Netnews and Mail with Gnus
@node Q6.2.1, Q6.2.2, Q6.1.6, Internet
@unnumberedsubsec Q6.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!
The Gnus numbering issues are not meant for mere mortals to know them.
If you feel you @emph{must} enter the muddy waters of Gnus, visit the
excellent FAQ, maintained by Justin Sheehy, at:
@example
@uref{http://my.gnus.org/FAQ/}
@end example
See also Gnus home page
@example
@uref{http://www.gnus.org/}
@end example
@node Q6.2.2, Q6.3.1, Q6.2.1, Internet
@unnumberedsubsec Q6.2.2: How do I make Gnus stay within a single frame?
The toolbar code to start Gnus opens the new frame---and it's a feature
rather than a bug. If you don't like it, but would still like to click
on the seemly icon, use the following code:
@lisp
(defun toolbar-news ()
(gnus))
@end lisp
It will redefine the callback function of the icon to just call
@code{gnus}, without all the fancy frame stuff.
@unnumberedsec 6.3: FTP Access
@node Q6.3.1, Q6.3.2, Q6.2.2, Internet
@unnumberedsubsec Q6.3.1: Can I edit files on other hosts?
Yes. Of course XEmacs can use any network file system (such as NFS or
Windows file sharing) you have available, and includes some
optimizations and safety features appropriate to those environments.
It is also possible to transparently edit files via FTP, ssh, or rsh. That
is, XEmacs makes a local copy using the transport in the background, and
automatically refreshes the remote original from that copy when you save
it. XEmacs also is capable of doing file system manipulations like
creating and removing directories and files. The FTP interface is
provided by the standard @samp{efs} package @ref{Top, EFS, , efs}. The
ssh/rsh interface is provided by the optional @samp{tramp} package
@ref{Top, TRAMP, , tramp}.
@node Q6.3.2, Q6.4.1, Q6.3.1, Internet
@unnumberedsubsec Q6.3.2: What is EFS?
#### Write me.
@unnumberedsec 6.4: Web Browsing with W3
@node Q6.4.1, Q6.4.2, Q6.3.2, Internet
@unnumberedsubsec Q6.4.1: What is W3?
W3 is an advanced graphical browser written in Emacs lisp that runs on
XEmacs. It has full support for cascaded style sheets, and more...
It has a home web page at
@uref{http://www.cs.indiana.edu/elisp/w3/docs.html}.
@node Q6.4.2, Q6.4.3, Q6.4.1, Internet
@unnumberedsubsec Q6.4.2: How do I run W3 from behind a firewall?
There is a long, well-written, detailed section in the W3 manual that
describes how to do this. Look in the section entitled "Firewalls".
@node Q6.4.3, , Q6.4.2, Internet
@unnumberedsubsec Q6.4.3: Is it true that W3 supports style sheets and tables?
Yes, and much more. W3, as distributed with the latest XEmacs is a
full-featured web browser.
@node Advanced, Other Packages, Internet, Top
@unnumbered 7 Advanced Customization Using XEmacs Lisp
This is part 7 of the XEmacs Frequently Asked Questions list. This
section is devoted to advanced customization using XEmacs Lisp.
@menu
7.0: Emacs Lisp and @file{init.el}
* Q7.0.1:: What version of Emacs am I running?
* Q7.0.2:: How can I evaluate Emacs-Lisp expressions?
* Q7.0.3:: @code{(setq tab-width 6)} behaves oddly.
* Q7.0.4:: How can I add directories to the @code{load-path}?
* Q7.0.5:: How to check if a lisp function is defined?
* Q7.0.6:: Can I force the output of @code{(face-list)} to a buffer?
7.1: Emacs Lisp Programming Techniques
* Q7.1.1:: What is the difference in key sequences between XEmacs and GNU Emacs?
* Q7.1.2:: Can I generate "fake" keyboard events?
* Q7.1.3:: Could you explain @code{read-kbd-macro} in more detail?
* Q7.1.4:: What is the performance hit of @code{let}?
* Q7.1.5:: What is the recommended use of @code{setq}?
* Q7.1.6:: What is the typical misuse of @code{setq}?
* Q7.1.7:: I like the @code{do} form of cl, does it slow things down?
* Q7.1.8:: I like recursion, does it slow things down?
* Q7.1.9:: How do I put a glyph as annotation in a buffer?
* Q7.1.10:: @code{map-extents} won't traverse all of my extents!
* Q7.1.11:: My elisp program is horribly slow. Is there an easy way to find out where it spends time?
7.2: Mathematics
* Q7.2.1:: What are bignums, ratios, and bigfloats in Lisp?
* Q7.2.2:: XEmacs segfaults when I use very big numbers!
* Q7.2.3:: Bignums are really slow!
* Q7.2.4:: Equal bignums don't compare as equal! What gives?
@end menu
@unnumberedsec 7.0: Emacs Lisp and @file{init.el}
@node Q7.0.1, Q7.0.2, Advanced, Advanced
@unnumberedsubsec Q7.0.1: What version of Emacs am I running?
How can @file{init.el} determine which of the family of
Emacsen I am using?
To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the
example given in @file{etc/sample.init.el} (@file{etc/sample.emacs} in
XEmacs versions prior to 21.4). There are other nifty things in there
as well!
For all new code, all you really need to do is:
@lisp
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
@end lisp
@node Q7.0.2, Q7.0.3, Q7.0.1, Advanced
@unnumberedsubsec Q7.0.2: How can I evaluate Emacs-Lisp expressions?
I know I can evaluate Elisp expressions from @code{*scratch*} buffer
with @kbd{C-j} after the expression. How do I do it from another
buffer?
Press @kbd{M-:} (the default binding of @code{eval-expression}), and
enter the expression to the minibuffer.
@node Q7.0.3, Q7.0.4, Q7.0.2, Advanced
@unnumberedsubsec Q7.0.3: @code{(setq tab-width 6)} behaves oddly.
If you put @code{(setq tab-width 6)} in your
@file{init.el} file it does not work! Is there a reason
for this? If you do it at the EVAL prompt it works fine!! How strange.
Use @code{setq-default} instead, since @code{tab-width} is
all-buffer-local.
@node Q7.0.4, Q7.0.5, Q7.0.3, Advanced
@unnumberedsubsec Q7.0.4: How can I add directories to the @code{load-path}?
Here are two ways to do that, one that puts your directories at the
front of the load-path, the other at the end:
@lisp
;;; Add things at the beginning of the load-path, do not add
;;; duplicate directories:
(pushnew "bar" load-path :test 'equal)
(pushnew "foo" load-path :test 'equal)
;;; Add things at the end, unconditionally
(setq load-path (nconc load-path '("foo" "bar")))
@end lisp
@email{keithh@@nortel.ca, keith (k.p.) hanlan} writes:
@quotation
To add directories using Unix shell metacharacters use
@file{expand-file-name} like this:
@lisp
(push (expand-file-name "~keithh/.emacsdir") load-path)
@end lisp
@end quotation
@node Q7.0.5, Q7.0.6, Q7.0.4, Advanced
@unnumberedsubsec Q7.0.5: How to check if a lisp function is defined?
Use the following elisp:
@lisp
(fboundp 'foo)
@end lisp
It's almost always a mistake to test @code{emacs-version} or any similar
variables.
Instead, use feature-tests, such as @code{featurep}, @code{boundp},
@code{fboundp}, or even simple behavioral tests, eg.:
@lisp
(defvar foo-old-losing-code-p
(condition-case nil (progn (losing-code t) nil)
(wrong-number-of-arguments t)))
@end lisp
There is an incredible amount of broken code out there which could work
much better more often in more places if it did the above instead of
trying to divine its environment from the value of one variable.
@node Q7.0.6, Q7.1.1, Q7.0.5, Advanced
@unnumberedsubsec Q7.0.6: Can I force the output of @code{(face-list)} to a buffer?
It would be good having it in a buffer, as the output of
@code{(face-list)} is too wide to fit to a minibuffer.
Evaluate the expression in the @samp{*scratch*} buffer with point after
the rightmost paren and typing @kbd{C-j}.
If the minibuffer smallness is the only problem you encounter, you can
simply press @kbd{C-h l} to get the former minibuffer contents in a
buffer.
@unnumberedsec 7.1: Emacs Lisp Programming Techniques
@node Q7.1.1, Q7.1.2, Q7.0.6, Advanced
@unnumberedsubsec Q7.1.1: What is the difference in key sequences between XEmacs and GNU Emacs?
@email{clerik@@naggum.no, Erik Naggum} writes;
@quotation
Emacs has a legacy of keyboards that produced characters with modifier
bits, and therefore map a variety of input systems into this scheme even
today. XEmacs is instead optimized for X events. This causes an
incompatibility in the way key sequences are specified, but both Emacs
and XEmacs will accept a key sequence as a vector of lists of modifiers
that ends with a key, e.g., to bind @kbd{M-C-a}, you would say
@code{[(meta control a)]} in both Emacsen. XEmacs has an abbreviated
form for a single key, just (meta control a). Emacs has an abbreviated
form for the Control and the Meta modifiers to string-characters (the
ASCII characters), as in @samp{\M-\C-a}. XEmacs users need to be aware
that the abbreviated form works only for one-character key sequences,
while Emacs users need to be aware that the string-character is rather
limited. Specifically, the string-character can accommodate only 256
different values, 128 of which have the Meta modifier and 128 of which
have not. In each of these blocks, only 32 characters have the Control
modifier. Whereas @code{[(meta control A)]} differs from @code{[(meta
control a)]} because the case differs, @samp{\M-\C-a} and @samp{\M-\C-A}
do not. Programmers are advised to use the full common form, both
because it is more readable and less error-prone, and because it is
supported by both Emacsen.
@end quotation
Another (even safer) way to be sure of the key-sequences is to use the
@code{read-kbd-macro} function, which takes a string like @samp{C-c
<up>}, and converts it to the internal key representation of the Emacs
you use. The function is available both on XEmacs and GNU Emacs.
@node Q7.1.2, Q7.1.3, Q7.1.1, Advanced
@unnumberedsubsec Q7.1.2: Can I generate "fake" keyboard events?
I wonder if there is an interactive function that can generate
@dfn{fake} keyboard events. This way, I could simply map them inside
XEmacs.
This seems to work:
@lisp
(defun cg--generate-char-event (ch)
"Generate an event, as if ch has been typed"
(dispatch-event (character-to-event ch)))
;; Backspace and Delete stuff
(global-set-key [backspace]
(lambda () (interactive) (cg--generate-char-event 127)))
(global-set-key [unknown_keysym_0x4]
(lambda () (interactive) (cg--generate-char-event 4)))
@end lisp
@node Q7.1.3, Q7.1.4, Q7.1.2, Advanced
@unnumberedsubsec Q7.1.3: Could you explain @code{read-kbd-macro} in more detail?
The @code{read-kbd-macro} function returns the internal Emacs
representation of a human-readable string (which is its argument).
Thus:
@lisp
(read-kbd-macro "C-c C-a")
@result{} [(control ?c) (control ?a)]
(read-kbd-macro "C-c C-. <up>")
@result{} [(control ?c) (control ?.) up]
@end lisp
In GNU Emacs the same forms will be evaluated to what GNU Emacs
understands internally---the sequences @code{"\C-x\C-c"} and @code{[3
67108910 up]}, respectively.
The exact @dfn{human-readable} syntax is defined in the docstring of
@code{edmacro-mode}. I'll repeat it here, for completeness.
@quotation
Format of keyboard macros during editing:
Text is divided into @dfn{words} separated by whitespace. Except for
the words described below, the characters of each word go directly as
characters of the macro. The whitespace that separates words is
ignored. Whitespace in the macro must be written explicitly, as in
@kbd{foo @key{SPC} bar @key{RET}}.
@itemize @bullet
@item
The special words @kbd{RET}, @kbd{SPC}, @kbd{TAB}, @kbd{DEL}, @kbd{LFD},
@kbd{ESC}, and @kbd{NUL} represent special control characters. The
words must be written in uppercase.
@item
A word in angle brackets, e.g., @code{<return>}, @code{<down>}, or
@code{<f1>}, represents a function key. (Note that in the standard
configuration, the function key @code{<return>} and the control key
@key{RET} are synonymous.) You can use angle brackets on the words
@key{RET}, @key{SPC}, etc., but they are not required there.
@item
Keys can be written by their @sc{ascii} code, using a backslash followed
by up to six octal digits. This is the only way to represent keys with
codes above \377.
@item
One or more prefixes @kbd{M-} (meta), @kbd{C-} (control), @kbd{S-}
(shift), @kbd{A-} (alt), @kbd{H-} (hyper), and @kbd{s-} (super) may
precede a character or key notation. For function keys, the prefixes
may go inside or outside of the brackets: @code{C-<down>} @equiv{}
@code{<C-down>}. The prefixes may be written in any order: @kbd{M-C-x}
@equiv{} @kbd{C-M-x}.
Prefixes are not allowed on multi-key words, e.g., @kbd{C-abc}, except
that the Meta prefix is allowed on a sequence of digits and optional
minus sign: @kbd{M--123} @equiv{} @kbd{M-- M-1 M-2 M-3}.
@item
The @code{^} notation for control characters also works: @kbd{^M}
@equiv{} @kbd{C-m}.
@item
Double angle brackets enclose command names: @code{<<next-line>>} is
shorthand for @kbd{M-x next-line @key{RET}}.
@item
Finally, @code{REM} or @code{;;} causes the rest of the line to be
ignored as a comment.
@end itemize
Any word may be prefixed by a multiplier in the form of a decimal number
and @code{*}: @code{3*<right>} @equiv{} @code{<right> <right> <right>},
and @code{10*foo} @equiv{}
@iftex
@*
@end iftex
@code{foofoofoofoofoofoofoofoofoofoo}.
Multiple text keys can normally be strung together to form a word, but
you may need to add whitespace if the word would look like one of the
above notations: @code{; ; ;} is a keyboard macro with three semicolons,
but @code{;;;} is a comment. Likewise, @code{\ 1 2 3} is four keys but
@code{\123} is a single key written in octal, and @code{< right >} is
seven keys but @code{<right>} is a single function key. When in doubt,
use whitespace.
@end quotation
@node Q7.1.4, Q7.1.5, Q7.1.3, Advanced
@unnumberedsubsec Q7.1.4: What is the performance hit of @code{let}?
In most cases, not noticeable. Besides, there's no avoiding
@code{let}---you have to bind your local variables, after all. Some
pose a question whether to nest @code{let}s, or use one @code{let} per
function. I think because of clarity and maintenance (and possible
future implementation), @code{let}-s should be used (nested) in a way to
provide the clearest code.
@node Q7.1.5, Q7.1.6, Q7.1.4, Advanced
@unnumberedsubsec Q7.1.5: What is the recommended use of @code{setq}?
@itemize @bullet
@item Global variables
You will typically @code{defvar} your global variable to a default
value, and use @code{setq} to set it later.
It is never a good practice to @code{setq} user variables (like
@code{case-fold-search}, etc.), as it ignores the user's choice
unconditionally. Note that @code{defvar} doesn't change the value of a
variable if it was bound previously. If you wish to change a
user-variable temporarily, use @code{let}:
@lisp
(let ((case-fold-search nil))
... ; code with searches that must be case-sensitive
...)
@end lisp
You will notice the user-variables by their docstrings beginning with an
asterisk (a convention).
@item Local variables
Bind them with @code{let}, which will unbind them (or restore their
previous value, if they were bound) after exiting from the @code{let}
form. Change the value of local variables with @code{setq} or whatever
you like (e.g. @code{incf}, @code{setf} and such). The @code{let} form
can even return one of its local variables.
Typical usage:
@lisp
;; iterate through the elements of the list returned by
;; `hairy-function-that-returns-list'
(let ((l (hairy-function-that-returns-list)))
(while l
... do something with (car l) ...
(setq l (cdr l))))
@end lisp
Another typical usage includes building a value simply to work with it.
@lisp
;; Build the mode keymap out of the key-translation-alist
(let ((inbox (file-truename (expand-file-name box)))
(i 0))
... code dealing with inbox ...
inbox)
@end lisp
This piece of code uses the local variable @code{inbox}, which becomes
unbound (or regains old value) after exiting the form. The form also
returns the value of @code{inbox}, which can be reused, for instance:
@lisp
(setq foo-processed-inbox
(let .....))
@end lisp
@end itemize
@node Q7.1.6, Q7.1.7, Q7.1.5, Advanced
@unnumberedsubsec Q7.1.6: What is the typical misuse of @code{setq}?
A typical misuse is probably @code{setq}ing a variable that was meant to
be local. Such a variable will remain bound forever, never to be
garbage-collected. For example, the code doing:
@lisp
(defun my-function (whatever)
(setq a nil)
... build a large list ...
... and exit ...)
@end lisp
does a bad thing, as @code{a} will keep consuming memory, never to be
unbound. The correct thing is to do it like this:
@lisp
(defun my-function (whatever)
(let (a) ; default initialization is to nil
... build a large list ...
... and exit, unbinding `a' in the process ...)
@end lisp
Not only is this prettier syntactically, but it makes it possible for
Emacs to garbage-collect the objects which @code{a} used to reference.
Note that even global variables should not be @code{setq}ed without
@code{defvar}ing them first, because the byte-compiler issues warnings.
The reason for the warning is the following:
@lisp
(defun flurgoze nil) ; ok, global internal variable
...
(setq flurghoze t) ; ops! a typo, but semantically correct.
; however, the byte-compiler warns.
While compiling toplevel forms:
** assignment to free variable flurghoze
@end lisp
@node Q7.1.7, Q7.1.8, Q7.1.6, Advanced
@unnumberedsubsec Q7.1.7: I like the @code{do} form of cl, does it slow things down?
It shouldn't. Here is what Dave Gillespie has to say about cl.el
performance:
@quotation
Many of the advanced features of this package, such as @code{defun*},
@code{loop}, and @code{setf}, are implemented as Lisp macros. In
byte-compiled code, these complex notations will be expanded into
equivalent Lisp code which is simple and efficient. For example, the
forms
@lisp
(incf i n)
(push x (car p))
@end lisp
are expanded at compile-time to the Lisp forms
@lisp
(setq i (+ i n))
(setcar p (cons x (car p)))
@end lisp
which are the most efficient ways of doing these respective operations
in Lisp. Thus, there is no performance penalty for using the more
readable @code{incf} and @code{push} forms in your compiled code.
@emph{Interpreted} code, on the other hand, must expand these macros
every time they are executed. For this reason it is strongly
recommended that code making heavy use of macros be compiled. (The
features labelled @dfn{Special Form} instead of @dfn{Function} in this
manual are macros.) A loop using @code{incf} a hundred times will
execute considerably faster if compiled, and will also garbage-collect
less because the macro expansion will not have to be generated, used,
and thrown away a hundred times.
You can find out how a macro expands by using the @code{cl-prettyexpand}
function.
@end quotation
@node Q7.1.8, Q7.1.9, Q7.1.7, Advanced
@unnumberedsubsec Q7.1.8: I like recursion, does it slow things down?
Yes. The Emacs byte-compiler cannot do much to optimize recursion. But
think well whether this is a real concern in Emacs. Much of the Emacs
slowness comes from internal mechanisms such as redisplay, or from the
fact that it is an interpreter.
Please try not to make your code much uglier to gain a very small speed
gain. It's not usually worth it.
@node Q7.1.9, Q7.1.10, Q7.1.8, Advanced
@unnumberedsubsec Q7.1.9: How do I put a glyph as annotation in a buffer?
Here is a solution that will insert the glyph annotation at the
beginning of buffer:
@lisp
(make-annotation (make-glyph '([FORMAT :file FILE]
[string :data "fallback-text"]))
(point-min)
'text
(current-buffer))
@end lisp
Replace @samp{FORMAT} with an unquoted symbol representing the format of
the image (e.g. @code{xpm}, @code{xbm}, @code{gif}, @code{jpeg}, etc.)
Instead of @samp{FILE}, use the image file name
(e.g.
@iftex
@*
@end iftex
@file{/usr/local/lib/xemacs-21.4/etc/recycle.xpm}).
You can turn this to a function (that optionally prompts you for a file
name), and inserts the glyph at @code{(point)} instead of
@code{(point-min)}.
@node Q7.1.10, Q7.1.11, Q7.1.9, Advanced
@unnumberedsubsec Q7.1.10: @code{map-extents} won't traverse all of my extents!
I tried to use @code{map-extents} to do an operation on all the extents
in a region. However, it seems to quit after processing a random number
of extents. Is it buggy?
No. The documentation of @code{map-extents} states that it will iterate
across the extents as long as @var{function} returns @code{nil}.
Unexperienced programmers often forget to return @code{nil} explicitly,
which results in buggy code. For instance, the following code is
supposed to delete all the extents in a buffer, and issue as many
@samp{fubar!} messages.
@lisp
(map-extents (lambda (ext ignore)
(delete-extent ext)
(message "fubar!")))
@end lisp
Instead, it will delete only the first extent, and stop right there --
because @code{message} will return a non-nil value. The correct code
is:
@lisp
(map-extents (lambda (ext ignore)
(delete-extent ext)
(message "fubar!")
nil))
@end lisp
@node Q7.1.11, Q7.2.1, Q7.1.10, Advanced
@unnumberedsubsec Q7.1.11: My elisp program is horribly slow. Is there an easy way to find out where it spends time?
@c New
@email{hniksic@@xemacs.org, Hrvoje Niksic} writes:
@quotation
Under XEmacs 20.4 and later you can use @kbd{M-x profile-key-sequence},
press a key (say @key{RET} in the Gnus Group buffer), and get the
results using @kbd{M-x profile-results}. It should give you an idea of
where the time is being spent.
@end quotation
@unnumberedsec 7.2: Mathematics
@node Q7.2.1, Q7.2.2, Q7.1.11, Advanced
@unnumberedsubsec Q7.2.1: What are bignums, ratios, and bigfloats in Lisp?
Thanks to @email{james@@xemacs.org, Jerry James}, XEmacs 21.5.18 and
later can use the capabilities of multiple-precision libraries that may
be available for your platform. The GNU Multiple Precision (GMP) and
BSD Multiple Precision (MP) libraries are partially supported. GMP
gives you @dfn{bignums} (arbitrary precision integers), @dfn{ratios}
(arbitrary precision fractions), and @dfn{bigfloats} (arbitrary
precision floating point numbers). GNU MP is better-supported by XEmacs
at the time of writing (2004-04-06). BSD MP support does not include
ratios or bigfloats, and it throws errors that aren't understood.
In most cases, bignum support should be transparent to users and Lisp
programmers. A bignum-enabled XEmacs will automatically convert from
fixnums to bignums and back in pure integer arithmetic, and for GNU MP,
from floats to bigfloats. (Bigfloats must be explicitly coerced to
other types, even if they are exactly representable by less precise
types.) The Lisp reader and printer have been enhanced to handle
bignums, as have the mathematical functions. Rationals (fixnums,
bignums, and ratios) are printed using the @samp{%d}, @samp{%o},
@samp{%x}, and @samp{%u} format conversions. The read syntax for ratios
is @samp{3/5}.
User-visible changes in behavior include (in probable order of annoyance)
@itemize
@item
Arithmetic can cause a segfault, depending on your MP library
@ref{Q7.2.2, XEmacs segfaults when I use very big numbers!}.
@item
Terminology is not Common-Lisp-conforming. For example, ``integer'' for
Emacs Lisp means what Common Lisp calls ``fixnum''. This issue is being
investigated, but the use of ``integer'' for fixnum is pervasive and may
cause backward-compatibility and GNU-Emacs-compatibility problems.
@item
Many operations that used to cause a range error now succeed, with
intermediate results and return values coerced to bignums as needed.
@item
An atom with ratio read syntax now returns a number, not a symbol.
@item
The @samp{%u} format conversion will now give an error if its argument
is negative. (Without MP, it prints a number which Lisp can't read.)
@end itemize
@emph{Surgeon General's Warning}: The automatic conversions cannot be
disabled at runtime. New functions have been added which produce
ratios, so there should be few surprises with type conflicts, but they
can't be ruled out. ``Arbitrary'' precision means precisely what it
says. If you work with extremely large numbers, your machine may
arbitrarily decide to hand you an unpleasant surprise rather than a
bignum @ref{Q7.2.2, XEmacs segfaults when I use very big numbers!}.
To configure with GNU MP, add @samp{--use-number-lib=gmp}
(@samp{--enable-bignum=gmp} in 21.5 or later) to your invocation of
@file{configure}. For BSD MP, use @samp{--use-number-lib=mp}
(@samp{--enable-bignum=mp} for 21.5).
If you would like to help with bignum support, especially on BSD MP,
please subscribe to the @uref{http://www.xemacs.org/Lists/#xemacs-beta,
XEmacs Beta mailing list}, and book up on @file{number-gmp.h} and
@file{number-mp.h}. Jerry has promised to write internals documentation
eventually, but if your skills run more to analysis and documentation
than to writing new code, feel free to fill in the gap!
@node Q7.2.2, Q7.2.3, Q7.2.1, Advanced
@unnumberedsubsec Q7.2.2: XEmacs segfaults when I use very big numbers!
GMP by default allocates temporaries on the stack. If you run out of
stack space, you're dead; there is no way that we know of to reliably
detect this condition, because @samp{alloca} is typically implemented to
be @emph{fast} rather than robust. If you just need a little more
oomph, use a bigger stack (@emph{e.g.}, the @file{ulimit -s} command in
bash(1)). If you want robustness at the cost of speed, configure GMP
with @samp{--disable-alloca} and rebuild the GMP library.
We do not know whether BSD MP uses @samp{alloca} or not. Please send
any information you have as a bug report (@kbd{M-x report-xemacs-bug
@key{RET}}), which will give us platform information. (We do know that
BSD MP implementations vary across vendors, but how much, we do not know
yet.)
@node Q7.2.3, Q7.2.4, Q7.2.2, Advanced
@unnumberedsubsec Q7.2.3: Bignums are really slow!
Many Linux distributions compile all their packages for the i386, and
this is costly. An optimized version can give you two or three orders
of magnitude better performance for a Pentium III or IV. (Yes, really.
See @uref{http://www.swox.com/gmp/gmp-speed.html}.)
@node Q7.2.4, , Q7.2.3, Advanced
@unnumberedsubsec Q7.2.4: Equal bignums don't compare as equal! What gives?
Ah, Grasshopper, I see you are using @code{(eq x y)}. The Bodhisattva
CLTL2 warned of the illusion that equal numbers would be @samp{eq}!
Meditate on the deeper truths of @samp{eql}, in which numbers of the same
type which have equal values compare equal, and @samp{=}, which does any
necessary type coercions before comparing for equality.
Yeah, yeah, it has always worked for integer types, because fixnums and
characters have an immediate representation. Sorry about that;
arbitrary precision obviously requires consing new objects because the
objects are ``large'' and of variable size, and the definition of
@samp{eq} does not permit different objects to compare as equal.
@node Other Packages, Current Events, Advanced, Top
@unnumbered 8 Other External Packages
This is part 8 of the XEmacs Frequently Asked Questions list. This
section is devoted to miscellaneous external packages not covered
elsewhere in XEmacs.
@menu
8.0: TeX
* Q8.0.1:: Is there something better than LaTeX mode?
* Q8.0.2:: What is AUCTeX? Where do you get it?
* Q8.0.3:: Problems installing AUCTeX.
* Q8.0.4:: How do I turn off current chapter from AUCTeX modeline?
8.1: Other Unbundled Packages
* Q8.1.1:: Is there a reason for an Emacs package not to be included in XEmacs?
* Q8.1.2:: Are there any Emacs Lisp Spreadsheets?
* Q8.1.3:: Is there a MatLab mode?
8.2: Environments Built Around XEmacs
* Q8.2.1:: What are SPARCworks, EOS, and WorkShop?
* Q8.2.2:: How do I start the Sun Workshop support in XEmacs 21?
* Q8.2.3:: What is/was Energize?
* Q8.2.4:: What is Infodock?
@end menu
@unnumberedsec 8.0: TeX
@node Q8.0.1, Q8.0.2, Other Packages, Other Packages
@unnumberedsubsec Q8.0.1: Is there something better than LaTeX mode?
@email{dak@@fsnif.neuroinformatik.ruhr-uni-bochum.de, David Kastrup} writes:
@quotation
The standard TeX modes leave much to be desired, and are somewhat
leniently maintained. Serious TeX users use AUCTeX (@pxref{Q8.0.2,
What is AUCTeX? Where do you get it?}).
@end quotation
@node Q8.0.2, Q8.0.3, Q8.0.1, Other Packages
@unnumberedsubsec Q8.0.2: What is AUCTeX? Where do you get it?
AUCTeX is a complex and sophisticated editing package dedicated to TeX
and related text formatting languages, including LaTeX and Texinfo.
It provides support for running TeX on a file or part of a file,
include files, and of course shortcuts for entering common TeX macros,
LaTeX environments, etc, and for fontlock.
AUCTeX is a standard package provided by XEmacs. You can get it as
usual through the @kbd{M-x list-packages} interface. It is also
included in the (non-Mule) SUMO package. The AUCTeX XEmacs package is
maintained by Uwe Brauer <GET MAIL ADDRESS>.
AUCTeX is extremely complicated, and its developers primarily
use GNU Emacs. Not all features of the bleeding edge version
of AUCTeX are immediately ported to XEmacs; if you need
these, you may be better off getting the most recent versions
from the GNU AUCTeX project on @uref{http://savannah.gnu.org}.
@node Q8.0.3, Q8.0.4, Q8.0.2, Other Packages
@unnumberedsubsec Q8.0.3: Problems installing AUCTeX.
@email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
@quotation
AUCTeX works fine on both stock Emacs and XEmacs has been doing so for
a very very long time. This is mostly due to the work of
@email{abraham@@dina.kvl.dk, Per Abrahamsen} (clap clap) in particular his @file{easymenu}
package. Which leads to what is probably the problem...
@end quotation
Most problems with AUCTeX are one of two things:
@itemize @bullet
@item
The TeX-lisp-directory in @file{tex-site.el} and the makefile don't
match.
Fix: make sure you configure AUCTeX properly @strong{before} installing.
@item
You have an old version of easymenu.el in your path.
Fix: use @code{locate-library} and remove old versions to make sure it
@strong{only} finds the one that came with XEmacs.
@end itemize
@node Q8.0.4, Q8.1.1, Q8.0.3, Other Packages
@unnumberedsubsec Q8.0.4: How do I turn off current chapter from AUCTeX modeline?
With AUCTeX, fast typing is hard because the current chapter, section
etc. are given in the modeline. How can I turn this off?
It's not AUCTeX, it comes from @code{func-menu} in @file{func-menu.el}.
@c Add this code to your @file{init.el} to turn it off:
@c
@c @lisp
@c (setq fume-display-in-modeline-p nil)
@c @end lisp
@c
@c Or just add a hook to @code{TeX-mode-hook} to turn it off only for TeX
@c mode:
@c
@c @lisp
@c (add-hook 'TeX-mode-hook
@c '(lambda () (setq fume-display-in-modeline-p nil)))
@c @end lisp
@c
@email{dhughes@@origin-at.co.uk, David Hughes} writes:
@quotation
Try this; you'll still get the function name displayed in the modeline,
but it won't attempt to keep track when you modify the file. To refresh
when it gets out of synch, you simply need click on the @samp{Rescan
Buffer} option in the function-menu.
@lisp
(setq-default fume-auto-rescan-buffer-p nil)
@end lisp
@end quotation
@unnumberedsec 8.1: Other Unbundled Packages
@node Q8.1.1, Q8.1.2, Q8.0.4, Other Packages
@unnumberedsubsec Q8.1.1: Is there a reason for an Emacs package not to be included in XEmacs?
The reason for an Emacs package not to be included in XEmacs is
usually one or more of the following:
@enumerate
@item
The package has not been ported to XEmacs. This will typically happen
when it uses GNU-Emacs-specific features, which make it fail under
XEmacs.
Porting a package to XEmacs can range from a trivial amount of change to
a partial or full rewrite. Fortunately, the authors of modern packages
usually choose to support both Emacsen themselves.
@item
The package has been decided not to be appropriate for XEmacs. It may
have an equivalent or better replacement within XEmacs, in which case
the developers may choose not to burden themselves with supporting an
additional package.
Each package bundled with XEmacs means more work for the maintainers,
whether they want it or not. If you are ready to take over the
maintenance responsibilities for the package you port, be sure to say
so---we will more likely include it.
@item
The package simply hasn't been noted by the XEmacs development. If
that's the case, the messages like yours are very useful for attracting
our attention.
@item
The package was noted by the developers, but they simply haven't yet
gotten around to including/porting it. Wait for the next release or,
even better, offer your help. It will be gladly accepted and
appreciated.
@end enumerate
@node Q8.1.2, Q8.1.3, Q8.1.1, Other Packages
@unnumberedsubsec Q8.1.2: Are there any Emacs Lisp Spreadsheets?
Yes. Check out @dfn{dismal} (which stands for Dis' Mode Ain't Lotus) at
@iftex
@*
@end iftex
@uref{http://acs.ist.psu.edu/dismal/dismal.html}.
@node Q8.1.3, Q8.2.1, Q8.1.2, Other Packages
@unnumberedsubsec Q8.1.3: Is there a MatLab mode?
Yes, a matlab mode and other items are available at the
@uref{http://www.mathworks.com/matlabcentral/files/104/matlab.el}.
@unnumberedsec 8.2: Environments Built Around XEmacs
@node Q8.2.1, Q8.2.2, Q8.1.3, Other Packages
@unnumberedsubsec Q8.2.1: What are SPARCworks, EOS, and WorkShop?
SPARCworks was a development environment from Sun (circa 1993-1996)
and consisted of compilers (C, C++, FORTRAN 77, Fortran 90, Ada, and
Pascal), a debugger, and other tools such as TeamWare (for
configuration management), MakeTool, etc.
EOS is the integration of XEmacs with the SPARCworks debugger. It
allows one to use an XEmacs frame to view code (complete with
fontification, etc.), set breakpoints, print variables, etc., while
using the SPARCworks debugger.
EOS stands for "Era on SPARCworks"; Era stood for "Emacs Rewritten
Again" and was the name used by Sun for its modified version of Lucid
Emacs (later XEmacs) in the early-mid 90's. This is documented in
more detail in the history section of the XEmacs About page.
EOS was replaced around 1996 with a newer graphical development
environment called Sun WorkShop. The current status of this is
unknown.
@node Q8.2.2, Q8.2.3, Q8.2.1, Other Packages
@unnumberedsubsec Q8.2.2: How do I start the Sun Workshop support in XEmacs 21?
Add the switch ---with-workshop to the configure command when building
XEmacs and put the following in one of your startup files
(e.g. site-start.el or .emacs):
@lisp
(when (featurep 'tooltalk)
(load "tooltalk-macros")
(load "tooltalk-util")
(load "tooltalk-init"))
(when (featurep 'sparcworks)
(load "sunpro-init")
(load "ring")
(load "comint")
(load "annotations")
(sunpro-startup))
@end lisp
If you are not using the latest Workshop (5.0) you have to apply the
following patch:
@format
--- /opt/SUNWspro/lib/eserve.el.ORIG Fri May 14 15:23:26 1999
+++ /opt/SUNWspro/lib/eserve.el Fri May 14 15:24:54 1999
@@@@ -42,7 +42,7 @@@@
(defvar running-xemacs nil "t if we're running XEmacs")
(defvar running-emacs nil "t if we're running GNU Emacs 19")
-(if (string-match "^\\(19\\|20\\)\..*\\(XEmacs\\|Lucid\\)" emacs-version)
+(if (string-match "\\(XEmacs\\|Lucid\\)" emacs-version)
(setq running-xemacs t)
(setq running-emacs t))
@end format
@node Q8.2.3, Q8.2.4, Q8.2.2, Other Packages
@unnumberedsubsec Q8.2.3: What is/was Energize?
The "Energize Programming System" was a C and C++ development environment
sold by Lucid, Inc. It was the reason why Lucid Emacs, now XEmacs, was
created in the first place. Unfortunately, Lucid went out of business in
1994. The rights to sell it in Japan were purchased by INS
Engineering (which briefly employed Stig Hackvan aka Jonathan
Stigelman to work on Japanese support for XEmacs, in late 1994 and
early 1995) and Tartan bought the rights to sell it in the rest of the
world. However, INS is not selling Energize at this point and may or
may not have ever done so; Tartan certainly never did.
@node Q8.2.4, , Q8.2.3, Other Packages
@unnumberedsubsec Q8.2.4: What is Infodock?
@uref{http://sourceforge.net/projects/infodock/, InfoDock} is an
integrated productivity toolset, mainly aimed at technical people,
hosted at SourceForge.
InfoDock is built atop the XEmacs variant of GNU Emacs and so has all of
the power of Emacs, but with an easier to use and more comprehensive
menu-based user interface. The bottom portion of this text describes
how it differs from XEmacs and GNU Emacs from the Free Software
Foundation.
InfoDock is aimed at people who want a free, turn-key productivity
environment. Although InfoDock is customizable, it is not intended for
people who like basic versions of Emacs which need to be customized
extensively for local use; standard Emacs distributions are better for
such uses. InfoDock is for those people who want a complete,
pre-customized environment in one package, which they need not touch
more than once or twice a year to update to new revisions.
InfoDock is pre-built for SPARC SunOS/Solaris systems, PA-RISC HP-UX,
and Intel Linux systems. It is intended for use on a color display,
although most features will work on monochrome monitors. Simply unpack
InfoDock according to the instructions in the ID-INSTALL file and you
are ready to run.
The InfoDock Manual is concise, yet sufficient as a user guide for users
who have never used an Emacs-type editor before. For users who are
already familiar with Emacs, it supplements the information in the GNU
Emacs Manual.
InfoDock menus are much more extensive and more mature than standard
Emacs menus. Each menu offers a @samp{Manual} item which displays
documentation associated with the menu's functions.
@noindent
Four types of menubars are provided:
@enumerate
@item
An extensive menubar providing access to global InfoDock commands.
@item
Mode-specific menubars tailored to the current major mode.
@item
A simple menubar for basic editing to help novices get started with InfoDock.
@item
The standard XEmacs menubar.
@end enumerate
Most modes also include mode-specific popup menus. Additionally, region and
rectangle popup menus are included.
@samp{Hyperbole}, the everyday information manager, is a core part of
InfoDock. This provides context-sensitive mouse keys, a rolodex-type
contact manager, programmable hypertext buttons, and an autonumbered
outliner with embedded hyperlink anchors.
The @samp{OO-Browser}, a multi-language object-oriented code browser, is a
standard part of InfoDock.
InfoDock saves a more extensive set of user options than other Emacs
versions.
InfoDock inserts a useful file header in many file types, showing the
author, summary, and last modification time of each file. A summary
program can then be used to summarize all of the files in a directory,
for easy MANIFEST file creation.
Your working set of buffers is automatically saved and restored (if you
answer yes to a prompt) between InfoDock sessions.
Refined color choices for code highlighting are provided for both dark and
light background display frames.
The @kbd{C-z} key prefix performs frame-based commands which parallel the
@kbd{C-x} key prefix for window-based commands.
The Smart Menu system is included for producing command menus on dumb
terminals.
Lisp libraries are better categorized according to function.
Extensions and improvements to many areas of Emacs are included, such as:
paragraph filling, mail reading with Rmail, shell handling, outlining, code
highlighting and browsing, and man page browsing.
InfoDock questions, answers and discussion should go to the mail list
@iftex
@*
@end iftex
@email{infodock@@infodock.com}. Use
@email{infodock-request@@infodock.com} to be added or removed from the
list. Always include your InfoDock version number when sending help
requests.
@node Current Events, Legacy Versions, Other Packages, Top
@unnumbered 9 What the Future Holds
This is part 9 of the XEmacs Frequently Asked Questions list. This
section will change frequently, and (in theory) should contain any
interesting items that have transpired recently. (But in practice it's
not getting updated like this.)
This section also contains descriptions of the new features in all the
recent releases of XEmacs. For the most part, the information below is
a synopsis of the more complete information that can be found in the
file @file{NEWS} in the @file{etc} directory of the XEmacs distribution.
You can view this file in XEmacs using @kbd{C-h n} or the @samp{Help}
menu.
Information on older versions of XEmacs can be find in @file{ONEWS} in
the same directory, or @file{OONEWS} for really old versions.
@menu
9.0: Changes
* Q9.0.1:: What new features will be in XEmacs soon?
* Q9.0.2:: What's new in XEmacs 21.4?
* Q9.0.3:: What's new in XEmacs 21.1?
* Q9.0.4:: What's new in XEmacs 20.4?
* Q9.0.5:: What's new in XEmacs 20.3?
* Q9.0.6:: What's new in XEmacs 20.2?
@end menu
@unnumberedsec 9.0: Changes
@node Q9.0.1, Q9.0.2, Current Events, Current Events
@unnumberedsubsec Q9.0.1: What new features will be in XEmacs soon?
#### Write me.
@node Q9.0.2, Q9.0.3, Q9.0.1, Current Events
@unnumberedsubsec Q9.0.2: What's new in XEmacs 21.4?
21.4 was the "stable" version of the 21.2 series, which was considered
"experimental" throughout its life; thus there were no "official"
releases at all. In essence, XEmacs is now following the "alternating"
scheme of Linux, where at any point there are at least two different
development branches, one "stable" and one "experimental". Periodic
releases happen in both branches, but those in the experimental branch
are not tested as well, and there's no guarantee they will work at all.
The experiemental branch is open to any and all code that's acceptable
to the developers; the stable branch, however, is in general limited
only to bug fixes, and all contributions are carefully reviewed to make
sure they will increase and not decrease stability.
21.3 never existed at all; it was decided to follow the Linux scheme
exactly, where odd-numbered series are experimental and even-numbered
ones stable.
The following lists summarizes the essential changes made in this
version. For a fuller list, see the @file{NEWS} in the @file{etc}
directory of the XEmacs distribution, or use @kbd{C-h n} or the
@samp{Help} menu to view this file inside of XEmacs.
@unnumberedsubsubsec User-visible changes in XEmacs 21.4
@itemize @bullet
@item
The delete key now deletes forward by default.
@item
Shifted motion keys now select text by default.
@item
You can now build XEmacs with support for GTK+ widget set.
@item
~/.xemacs/init.el is now the preferred location for the init
file. (XEmacs now supports a `~/.xemacs/init.el' startup file. Custom
file will move to ~/.xemacs/custom.el.)
@item
Much-improved sample init.el, showing how to use many useful features.
@item
XEmacs support for menu accelerators has been much improved.
@item
Default menubar improvements. (Default menubar has many new commands and
better organization. The font-menu is now available under MS Windows.)
@item
Dialog box improvements, including a real file dialog box. (XEmacs now
has a proper file dialog box under MS Windows (and GTK)! The old
clunky file dialog box is improved. Keyboard traversal now works
correctly in MS Windows dialog boxes. There is a Search dialog box
available from @samp{Edit->Find...})
@item
New buffer tabs.
@item
There is a new MS Windows installer, netinstall, ported from Cygwin.
@item
The subprocess quote-handling mechanism under Windows is much improved.
@item
Printing support now available under MS Windows.
@item
Selection improvements. (Kill and yank now interact with the clipboard under Windows. MS Windows support for selection is now much more robust. Motif selection support is now more correct (but slower).)
@item
Mail spool locking now works correctly.
@item
International support changes. (The default coding-priority-list is now
safer. International keysyms are now supported under X. MS Windows
1251 code page now supported. Czech, Thai, Cyrillic-KOI8, Vietnamese,
Ethiopic now supported. Proper support for words in Latin 3 and Latin
4.)
@item
Help buffers contain hyperlinks, and other changes.
@item
The modeline's text is now scrollable.
@item
The mouse wheel under MS Windows now functions correctly.
@item
Interactive searching and matching case improvements. (Incremental search will now highlight all visible matches. Interactive searches always respect uppercase characters.)
@item
Rectangle functions rewritten to avoid inserting extra spaces.
@item
New command `kill-entire-line' that always kills the entire line.
@item
Default values correctly stored in minibuffer histories.
@item
You can now create "indirect buffers", like in GNU Emacs.
@item
Pixel-based scrolling has been implemented.
@item
Operation progress can be displayed using graphical widgets.
@item
User names following a tilde can now be completed at file name prompts.
@item
XEmacs can now play sound using Enlightenment Sound Daemon (ESD).
@item
X-Face support is now available under MS Windows.
@item
The PostgreSQL Relational Database Management System is now supported.
@item
Indentation no longer indents comments that begin at column zero.
@item
Face and variable settings can have comments in Customize.
@item
New locations for early package hierarchies.
@item
The `auto-save' library has been greatly improved.
@item
New variable `mswindows-alt-by-itself-activates-menu'.
@item
Other init-file-related changes. (Init file in your home directory may be called `.emacs.el'. New command-line switches -user-init-file and -user-init-directory.)
@item
Etags changes. See @file{NEWS} for full details.
@end itemize
@unnumberedsubsubsec Lisp and internal changes in XEmacs 21.4
Not yet written.
@c APA: Texi2html produces invalid HTML from an empty list of bullets!
@c Please uncomment following list when it does contain bullets.
@c @itemize @bullet
@c @end itemize
@node Q9.0.3, Q9.0.4, Q9.0.2, Current Events
@unnumberedsubsec Q9.0.3: What's new in XEmacs 21.1?
21.1 was the "stable" version of "experimental" 21.0 series.
@xref{Q9.0.2, What's new in XEmacs 21.4?}.
The following lists summarizes the essential changes made in this
version. For a fuller list, see the @file{NEWS} in the @file{etc}
directory of the XEmacs distribution, or use @kbd{C-h n} or the
@samp{Help} menu to view this file inside of XEmacs.
@unnumberedsubsubsec User-visible changes in XEmacs 21.1
@itemize @bullet
@item
XEmacs is now supported under Microsoft Windows 95/98 and Windows
NT/2000/XP operating systems. To discuss Windows-specific issues,
subscribe to the mailing list at
@email{xemacs-winnt-request@@xemacs.org}.
@item
XEmacs has been unbundled into constituent installable packages.
@item
@strong{Other notable changes}: The @samp{Options} menu has been ported to
Custom; XEmacs now is able to choose X visuals and use private
colormaps; You can drag the vertical divider of "horizontally"
(side-by-side) split windows.
@item
@strong{Building changes}: XEmacs can be built with support for 31-bit Lisp
integers and 32-bit pointers (previously, it was 28-bit integers and
pointers); XEmacs can be built with LDAP support; @file{dir} files can be
removed in the Info subsystem, and will be regenerated on-the-fly.
@item
@strong{New packages}: @file{imenu}, @file{popper}, @file{gdb-highlight}
@item
@strong{Package changes}: Many changes to @file{cc-mode}, @file{gnus},
@file{gnuclient}. See @file{NEWS} for full details.
@item
@strong{New commands, variables and functions}:
@code{center-to-window-line} (like @code{recenter} but doesn't force a
redisplay); variable @code{user-full-name} (customize what your full
name looks like in mail); @kbd{M-x customize-changed-options} (customize
options whose default values changes because you upgraded your XEmacs);
@kbd{M-x add-log-convert} (converts an old-style ChangeLog buffer to
new-style); @kbd{M-x zap-up-to-char} (like @code{zap-to-char} but
doesn't delete the char searched for); commands to store, retrieve and
increment numbers in registers, useful for macros.
@item
@strong{Changes to commands, variables, and functions}: @kbd{M-x
query-replace} and friends operate only on the region when it's active;
@code{echo-keystrokes} can now be a floating-point number; @kbd{M-.}
searches exact tag matches before inexact ones; function
@code{user-full-name} with no arguments returns the var
@code{user-full-name}; a prefix arg to @kbd{M-:} and @kbd{C-h c} inserts
the result in the current buffer.
@item
@strong{Other changes}: Under X, new application class @samp{XEmacs};
byte-compilation of user-specs now works.
@item
@strong{XEmacs/Mule (internationalization) changes}: Mule support now
works on TTY's; Egg/SJ3 input method now officially supported (Quail and
Egg/Skk already available through LEIM since 20.3); localized Japanese
menubars if XEmacs is built with the right support.
@end itemize
@unnumberedsubsubsec Lisp and internal changes in XEmacs 21.1
@itemize @bullet
@item
@strong{Specifier changes}: The window locale now has a higher
precedence than the buffer locale when instantiating; new macro
@code{let-specifier}; new specifiers
@code{vertical-scrollbar-visible-p}, horizontal-scrollbar-visible-p',
@code{scrollbar-on-left-p}, @code{scrollbar-on-top-p},
@code{vertical-divider-always-visible-p},
@code{vertical-divider-shadow-thickness},
@code{vertical-divider-line-width}, @code{vertical-divider-spacing};
specifiers and symbols whose value is a specifier allowed as modeline
specifications.
@item
@strong{Frame focus changes}: @code{focus-follows-mouse} works like FSF,
prevents any attempt to permanently change the selected frame; new
function @code{focus-frame} sets the window system focus a frame; new
special forms @code{save-selected-frame} and @code{with-selected-frame}.
@item
@strong{Window function changes}: @code{select-window} now has optional
argument @var{NORECORD} to inhibit recording a buffer change;
@code{vertical-motion} now correctly handles optional @var{WINDOW}
argument and has new optional argument @var{PIXELS}, to have the
returned values be in pixels; new function
@code{vertical-motion-pixels}; new functions
@code{window-text-area-pixel-@{width,height,edges@}}; new functions
@code{shrink-window-pixels} and @code{enlarge-window-pixels}; new
function @code{window-displayed-text-pixel-height}.
@item
@strong{Other function changes}: Arithmetic comparison functions
@code{<}, @code{>}, @code{=}, @code{/=} now accept a variable number of
arguments; hashtables now have a consistent read/print syntax; keyword
symbols cannot be set to a value other than themselves; @code{concat} no
longer accepts integer arguments; new function @code{string}, like
@code{list}, @code{vector}, etc.; new function @code{temp-directory}
(OS-independent way to get a temp directory); @code{load-average} has
optional argument @var{USE-FLOATS}; @code{make-event} implemented
completely; new function @code{function-interactive} (returns a
function's interactive spec); new functions @code{lmessage},
@code{lwarn} (printf-like versions of @code{display-wessage},
@code{display-warning}); new keyword @code{:version} to
@code{defcustom}.
@item
@strong{Performance}: when the new GNU Malloc aka Doug Lea Malloc is
available, it will be used (better performance on libc6 Linux systems);
tracking line-numbers in modeline is now efficient; profiling records a
call-count of all called functions, retrievable through
@code{profile-call-count-results}.
@item
@strong{Startup and path searching}: code to assemble paths at startup
rewritten for new package system; new function @code{split-path} (splits
by @code{path-separator}); @code{Info-default-directory-list} obsolete,
use @code{Info-directory-list} instead; site-lisp is deprecated and no
longer on the load-path by default.
@end itemize
@node Q9.0.4, Q9.0.5, Q9.0.3, Current Events
@unnumberedsubsec Q9.0.4: What's new in XEmacs 20.4?
XEmacs 20.4 is a bugfix release with no user-visible changes.
@c Filled in from NEWS file of 20.5-b33
@node Q9.0.5, Q9.0.6, Q9.0.4, Current Events
@unnumberedsubsec Q9.0.5: What's new in XEmacs 20.3?
XEmacs 20.3 was released in November 1997. It contains many bugfixes,
and a number of new features, including Autoconf 2 based configuration,
additional support for Mule (Multi-language extensions to Emacs), many
more customizations, multiple frames on TTY-s, support for multiple info
directories, an enhanced gnuclient, improvements to regexp matching,
increased MIME support, and many, many synches with GNU Emacs 20.
The XEmacs/Mule support has been only seriously tested in a Japanese
locale, and no doubt many problems still remain. The support for
ISO-Latin-1 and Japanese is fairly strong. MULE support comes at a
price---about a 30% slowdown from 19.16. We're making progress on
improving performance and XEmacs 20.3 compiled without Mule (which is
the default) is definitely faster than XEmacs 19.16.
XEmacs 20.3 is the first non-beta v20 release, and will be the
basis for all further development.
@node Q9.0.6, , Q9.0.5, Current Events
@unnumberedsubsec Q9.0.6: What's new in XEmacs 20.2?
The biggest changes in 20.2 include integration of EFS (the next
generation of ange-ftp) and AUC Tex (the Emacs subsystem that includes a
major mode for editing Tex and LaTeX, and a lot of other stuff). Many
bugs from 20.0 have been fixed for this release. 20.2 also contains a
new system for customizing XEmacs options, invoked via @kbd{M-x
customize}.
XEmacs 20.2 is the development release (20.0 was beta), and is no longer
considered unstable.
For older news, see the file @file{ONEWS} in the @file{etc} directory of
the XEmacs distribution.
@node Legacy Versions, , Current Events, Top
@unnumbered 10 New information about old XEmacsen
This is part 10 of the XEmacs Frequently Asked Questions list. It will
occasionally be updated to reflect new information about versions which
are no longer being revised by the XEmacs Project. The primary purpose
is advice on compatibility of older XEmacsen with new packages and
updated versions of packages, but bug fixes (which will not be applied
to released XEmacsen, but users can apply themselves) are also accepted.
@menu
10.0: XEmacs 21.1
* Q10.0.1:: Gnus 5.10 won't display smileys in XEmacs 21.1.
* Q10.0.2:: XEmacs won't start on Windows in XEmacs 21.1.
@end menu
@unnumberedsec 10.0: XEmacs 21.1
@node Q10.0.1, Q10.0.2, Legacy Versions, Legacy Versions
@unnumberedsubsec Q10.0.1: Gnus 5.10 won't display smileys in XEmacs 21.1.
@email{eeide@@cs.utah.edu, Eric Eide} wrote:
@quotation
Previously I wrote:
Eric> Summary: with Gnus 5.10.1 in XEmacs 21.1.14, I don't see
Eric> any smileys :-(.
After a bit of sleuthing, I discovered the essence of the problem.
For me, the form:
@lisp
(with-temp-buffer
(insert-file-contents "foo.xpm")
(buffer-string))
@end lisp
returns the empty string. This is because something somewhere
replaces the XPM data with a glyph --- I haven't figured out where
this occurs.
@end quotation
@email{kyle_jones@@wonderworks.com, Kyle Jones} replies:
@quotation
Do this:
@lisp
(setq format-alist nil)
@end lisp
The image-mode stuff is gone from format-alist in the 21.4
branch, praise be.
@end quotation
@node Q10.0.2, , Q10.0.1, Legacy Versions
@unnumberedsubsec Q10.0.2: XEmacs won't start on Windows in XEmacs 21.1.
XEmacs relies on a process called "dumping" to generate a working
executable. Under MS-Windows this process effectively fixes the memory
addresses of information in the executable. When XEmacs starts up it tries
to reserve these memory addresses so that the dumping process can be
reversed -- putting the information back at the correct addresses.
Unfortunately some .DLLs (for instance the soundblaster driver) occupy
memory addresses that can conflict with those needed by the dumped XEmacs
executable. In this instance XEmacs will fail to start without any
explanation. Note that this is extremely machine specific.
21.1.10 includes a fix for this that makes more intelligent guesses
about which memory addresses will be free, and this should cure the
problem for most people. 21.4 implements "portable dumping", which
eliminates the problem altogether. We recommend you use the 21.4
binaries, but you can use the 21.1 binaries if you are very paranoid
about stability. @xref{Q1.1.2, Are binaries available?}.
@bye
|