diff options
| author | Karl Berry | 2006-04-09 22:40:34 +0000 |
|---|---|---|
| committer | Karl Berry | 2006-04-09 22:40:34 +0000 |
| commit | e691d082f60d28aed73d3ec02ea9557794fa285a (patch) | |
| tree | 80bfd87f9d32369b6928e3f5a7e16fc907a3185f /man | |
| parent | 2a8da5551cef30845096a5ac370233e80af9a1aa (diff) | |
| download | emacs-e691d082f60d28aed73d3ec02ea9557794fa285a.tar.gz emacs-e691d082f60d28aed73d3ec02ea9557794fa285a.zip | |
move MS-DOS material to emacs-xtra.texi
Diffstat (limited to 'man')
| -rw-r--r-- | man/ChangeLog | 6 | ||||
| -rw-r--r-- | man/building.texi | 2 | ||||
| -rw-r--r-- | man/emacs-xtra.texi | 682 | ||||
| -rw-r--r-- | man/emacs.texi | 19 | ||||
| -rw-r--r-- | man/frames.texi | 2 | ||||
| -rw-r--r-- | man/gnu.texi | 2 | ||||
| -rw-r--r-- | man/macos.texi | 2 | ||||
| -rw-r--r-- | man/msdog.texi | 682 | ||||
| -rw-r--r-- | man/mule.texi | 2 | ||||
| -rw-r--r-- | man/trouble.texi | 3 |
10 files changed, 716 insertions, 686 deletions
diff --git a/man/ChangeLog b/man/ChangeLog index 48712e9c81a..c6ad56970a6 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -7,6 +7,12 @@ | |||
| 7 | 7 | ||
| 8 | 2006-04-09 Karl Berry <karl@gnu.org> | 8 | 2006-04-09 Karl Berry <karl@gnu.org> |
| 9 | 9 | ||
| 10 | * msdog.texi, emacs-xtra.texi: move all the MS-DOS material to | ||
| 11 | emacs-xtra.texi, leaving only MS Windows information. | ||
| 12 | * building.texi, emacs.texi, frames.texi, gnu.texi, macos.texi, | ||
| 13 | msdog.texi, mule.texi, trouble.texi: change cross-references and | ||
| 14 | node names. | ||
| 15 | |||
| 10 | * emacs.texi: move @summarycontents and @contents to the beginning | 16 | * emacs.texi: move @summarycontents and @contents to the beginning |
| 11 | of the file. | 17 | of the file. |
| 12 | 18 | ||
diff --git a/man/building.texi b/man/building.texi index ccabf22b549..ec44b828022 100644 --- a/man/building.texi +++ b/man/building.texi | |||
| @@ -323,7 +323,7 @@ method to conditionalize them. | |||
| 323 | subprocesses; to work around this lack, @kbd{M-x compile} runs the | 323 | subprocesses; to work around this lack, @kbd{M-x compile} runs the |
| 324 | compilation command synchronously on MS-DOS. As a consequence, you must | 324 | compilation command synchronously on MS-DOS. As a consequence, you must |
| 325 | wait until the command finishes before you can do anything else in | 325 | wait until the command finishes before you can do anything else in |
| 326 | Emacs. @xref{MS-DOS}. | 326 | Emacs. @xref{MS-DOS,,,emacs-xtra,Specialized Emacs Features}. |
| 327 | 327 | ||
| 328 | @node Grep Searching | 328 | @node Grep Searching |
| 329 | @section Searching with Grep under Emacs | 329 | @section Searching with Grep under Emacs |
diff --git a/man/emacs-xtra.texi b/man/emacs-xtra.texi index 4aff9716f75..7f7574d05e5 100644 --- a/man/emacs-xtra.texi +++ b/man/emacs-xtra.texi | |||
| @@ -64,6 +64,7 @@ license to the document, as described in section 6 of the license. | |||
| 64 | * Picture Mode:: Editing pictures made up of characters | 64 | * Picture Mode:: Editing pictures made up of characters |
| 65 | using the quarter-plane screen model. | 65 | using the quarter-plane screen model. |
| 66 | * Fortran:: Fortran mode and its special features. | 66 | * Fortran:: Fortran mode and its special features. |
| 67 | * MS-DOG:: | ||
| 67 | * Index:: | 68 | * Index:: |
| 68 | @end menu | 69 | @end menu |
| 69 | 70 | ||
| @@ -2406,6 +2407,687 @@ to @samp{continue}, provided Abbrev mode is enabled.@refill | |||
| 2406 | Type @samp{;?} or @samp{;C-h} to display a list of all the built-in | 2407 | Type @samp{;?} or @samp{;C-h} to display a list of all the built-in |
| 2407 | Fortran abbrevs and what they stand for. | 2408 | Fortran abbrevs and what they stand for. |
| 2408 | 2409 | ||
| 2410 | |||
| 2411 | @node MS-DOG | ||
| 2412 | @chapter Emacs and MS-DOS | ||
| 2413 | @cindex MS-DOG | ||
| 2414 | @cindex MS-DOS peculiarities | ||
| 2415 | |||
| 2416 | This section briefly describes the peculiarities of using Emacs on | ||
| 2417 | the MS-DOS ``operating system'' (also known as ``MS-DOG''). | ||
| 2418 | Information about Emacs and Microsoft's current operating system | ||
| 2419 | Windows (also known as ``Losedows) is in the main Emacs manual | ||
| 2420 | (@pxref{Emacs and Microsoft Systems,,, emacs, the Emacs Manual}). | ||
| 2421 | |||
| 2422 | If you build Emacs for MS-DOS, the binary will also run on Windows | ||
| 2423 | 3.X, Windows NT, Windows 9X/ME, Windows 2000, or OS/2 as a DOS | ||
| 2424 | application; all of this chapter applies for all of those systems, if | ||
| 2425 | you use an Emacs that was built for MS-DOS. | ||
| 2426 | |||
| 2427 | @xref{Text and Binary,,,emacs, the Emacs Manual}, for information | ||
| 2428 | about Emacs' special handling of text files under MS-DOS (and | ||
| 2429 | Windows). | ||
| 2430 | |||
| 2431 | @menu | ||
| 2432 | * Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS. | ||
| 2433 | * Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS. | ||
| 2434 | * Display: MS-DOS Display. Fonts, frames and display size on MS-DOS. | ||
| 2435 | * Files: MS-DOS File Names. File name conventions on MS-DOS. | ||
| 2436 | * Printing: MS-DOS Printing. How to specify the printer on MS-DOS. | ||
| 2437 | * I18N: MS-DOS and MULE. Support for internationalization on MS-DOS. | ||
| 2438 | * Processes: MS-DOS Processes. Running subprocesses on MS-DOS. | ||
| 2439 | @end menu | ||
| 2440 | |||
| 2441 | @node MS-DOS Keyboard | ||
| 2442 | @section Keyboard Usage on MS-DOS | ||
| 2443 | |||
| 2444 | @kindex DEL @r{(MS-DOS)} | ||
| 2445 | @kindex BS @r{(MS-DOS)} | ||
| 2446 | The key that is called @key{DEL} in Emacs (because that's how it is | ||
| 2447 | designated on most workstations) is known as @key{BS} (backspace) on a | ||
| 2448 | PC. That is why the PC-specific terminal initialization remaps the | ||
| 2449 | @key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act | ||
| 2450 | as @kbd{C-d} for the same reasons. | ||
| 2451 | |||
| 2452 | @kindex C-g @r{(MS-DOS)} | ||
| 2453 | @kindex C-BREAK @r{(MS-DOS)} | ||
| 2454 | @cindex quitting on MS-DOS | ||
| 2455 | Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit | ||
| 2456 | character, just like @kbd{C-g}. This is because Emacs cannot detect | ||
| 2457 | that you have typed @kbd{C-g} until it is ready for more input. As a | ||
| 2458 | consequence, you cannot use @kbd{C-g} to stop a running command | ||
| 2459 | (@pxref{Quitting,,,emacs, the Emacs Manual}). By contrast, | ||
| 2460 | @kbd{C-@key{BREAK}} @emph{is} detected as soon as you type it (as | ||
| 2461 | @kbd{C-g} is on other systems), so it can be used to stop a running | ||
| 2462 | command and for emergency escape (@pxref{Emergency Escape,,,emacs, the | ||
| 2463 | Emacs Manual}). | ||
| 2464 | |||
| 2465 | @cindex Meta (under MS-DOS) | ||
| 2466 | @cindex Hyper (under MS-DOS) | ||
| 2467 | @cindex Super (under MS-DOS) | ||
| 2468 | @vindex dos-super-key | ||
| 2469 | @vindex dos-hyper-key | ||
| 2470 | The PC keyboard maps use the left @key{ALT} key as the @key{META} key. | ||
| 2471 | You have two choices for emulating the @key{SUPER} and @key{HYPER} keys: | ||
| 2472 | choose either the right @key{CTRL} key or the right @key{ALT} key by | ||
| 2473 | setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1 | ||
| 2474 | or 2 respectively. If neither @code{dos-super-key} nor | ||
| 2475 | @code{dos-hyper-key} is 1, then by default the right @key{ALT} key is | ||
| 2476 | also mapped to the @key{META} key. However, if the MS-DOS international | ||
| 2477 | keyboard support program @file{KEYB.COM} is installed, Emacs will | ||
| 2478 | @emph{not} map the right @key{ALT} to @key{META}, since it is used for | ||
| 2479 | accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard | ||
| 2480 | layouts; in this case, you may only use the left @key{ALT} as @key{META} | ||
| 2481 | key. | ||
| 2482 | |||
| 2483 | @kindex C-j @r{(MS-DOS)} | ||
| 2484 | @vindex dos-keypad-mode | ||
| 2485 | The variable @code{dos-keypad-mode} is a flag variable that controls | ||
| 2486 | what key codes are returned by keys in the numeric keypad. You can also | ||
| 2487 | define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the | ||
| 2488 | following line into your @file{_emacs} file: | ||
| 2489 | |||
| 2490 | @smallexample | ||
| 2491 | ;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.} | ||
| 2492 | (define-key function-key-map [kp-enter] [?\C-j]) | ||
| 2493 | @end smallexample | ||
| 2494 | |||
| 2495 | @node MS-DOS Mouse | ||
| 2496 | @section Mouse Usage on MS-DOS | ||
| 2497 | |||
| 2498 | @cindex mouse support under MS-DOS | ||
| 2499 | Emacs on MS-DOS supports a mouse (on the default terminal only). | ||
| 2500 | The mouse commands work as documented, including those that use menus | ||
| 2501 | and the menu bar (@pxref{Menu Bar,,,emacs, the Emacs Manual}). Scroll | ||
| 2502 | bars don't work in MS-DOS Emacs. PC mice usually have only two | ||
| 2503 | buttons; these act as @kbd{Mouse-1} and @kbd{Mouse-2}, but if you | ||
| 2504 | press both of them together, that has the effect of @kbd{Mouse-3}. If | ||
| 2505 | the mouse does have 3 buttons, Emacs detects that at startup, and all | ||
| 2506 | the 3 buttons function normally, as on X. | ||
| 2507 | |||
| 2508 | Help strings for menu-bar and pop-up menus are displayed in the echo | ||
| 2509 | area when the mouse pointer moves across the menu items. Highlighting | ||
| 2510 | of mouse-sensitive text (@pxref{Mouse References,,,emacs, the Emacs | ||
| 2511 | Manual}) is also supported. | ||
| 2512 | |||
| 2513 | @cindex mouse, set number of buttons | ||
| 2514 | @findex msdos-set-mouse-buttons | ||
| 2515 | Some versions of mouse drivers don't report the number of mouse | ||
| 2516 | buttons correctly. For example, mice with a wheel report that they | ||
| 2517 | have 3 buttons, but only 2 of them are passed to Emacs; the clicks on | ||
| 2518 | the wheel, which serves as the middle button, are not passed. In | ||
| 2519 | these cases, you can use the @kbd{M-x msdos-set-mouse-buttons} command | ||
| 2520 | to tell Emacs how many mouse buttons to expect. You could make such a | ||
| 2521 | setting permanent by adding this fragment to your @file{_emacs} init | ||
| 2522 | file: | ||
| 2523 | |||
| 2524 | @example | ||
| 2525 | ;; @r{Treat the mouse like a 2-button mouse.} | ||
| 2526 | (msdos-set-mouse-buttons 2) | ||
| 2527 | @end example | ||
| 2528 | |||
| 2529 | @cindex Windows clipboard support | ||
| 2530 | Emacs built for MS-DOS supports clipboard operations when it runs on | ||
| 2531 | Windows. Commands that put text on the kill ring, or yank text from | ||
| 2532 | the ring, check the Windows clipboard first, just as Emacs does on the | ||
| 2533 | X Window System (@pxref{Mouse Commands,,,emacs, the Emacs Manual}). | ||
| 2534 | Only the primary selection and the cut buffer are supported by MS-DOS | ||
| 2535 | Emacs on Windows; the secondary selection always appears as empty. | ||
| 2536 | |||
| 2537 | Due to the way clipboard access is implemented by Windows, the | ||
| 2538 | length of text you can put into the clipboard is limited by the amount | ||
| 2539 | of free DOS memory that is available to Emacs. Usually, up to 620KB of | ||
| 2540 | text can be put into the clipboard, but this limit depends on the system | ||
| 2541 | configuration and is lower if you run Emacs as a subprocess of | ||
| 2542 | another program. If the killed text does not fit, Emacs outputs a | ||
| 2543 | message saying so, and does not put the text into the clipboard. | ||
| 2544 | |||
| 2545 | Null characters also cannot be put into the Windows clipboard. If the | ||
| 2546 | killed text includes null characters, Emacs does not put such text into | ||
| 2547 | the clipboard, and displays in the echo area a message to that effect. | ||
| 2548 | |||
| 2549 | @vindex dos-display-scancodes | ||
| 2550 | The variable @code{dos-display-scancodes}, when non-@code{nil}, | ||
| 2551 | directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of | ||
| 2552 | each keystroke; this feature serves as a complement to the | ||
| 2553 | @code{view-lossage} command, for debugging. | ||
| 2554 | |||
| 2555 | @node MS-DOS Display | ||
| 2556 | @section Display on MS-DOS | ||
| 2557 | @cindex faces under MS-DOS | ||
| 2558 | @cindex fonts, emulating under MS-DOS | ||
| 2559 | |||
| 2560 | Display on MS-DOS cannot use font variants, like bold or italic, but | ||
| 2561 | it does support multiple faces, each of which can specify a foreground | ||
| 2562 | and a background color. Therefore, you can get the full functionality | ||
| 2563 | of Emacs packages that use fonts (such as @code{font-lock}, Enriched | ||
| 2564 | Text mode, and others) by defining the relevant faces to use different | ||
| 2565 | colors. Use the @code{list-colors-display} command (@pxref{Frame | ||
| 2566 | Parameters,,,emacs, the Emacs Manual}) and the | ||
| 2567 | @code{list-faces-display} command (@pxref{Faces,,,emacs, the Emacs | ||
| 2568 | Manual}) to see what colors and faces are available and what they look | ||
| 2569 | like. | ||
| 2570 | |||
| 2571 | @xref{MS-DOS and MULE}, later in this chapter, for information on | ||
| 2572 | how Emacs displays glyphs and characters that aren't supported by the | ||
| 2573 | native font built into the DOS display. | ||
| 2574 | |||
| 2575 | @cindex cursor shape on MS-DOS | ||
| 2576 | When Emacs starts, it changes the cursor shape to a solid box. This | ||
| 2577 | is for compatibility with other systems, where the box cursor is the | ||
| 2578 | default in Emacs. This default shape can be changed to a bar by | ||
| 2579 | specifying the @code{cursor-type} parameter in the variable | ||
| 2580 | @code{default-frame-alist} (@pxref{Creating Frames,,,emacs, the Emacs | ||
| 2581 | Manual}). The MS-DOS terminal doesn't support a vertical-bar cursor, | ||
| 2582 | so the bar cursor is horizontal, and the @code{@var{width}} parameter, | ||
| 2583 | if specified by the frame parameters, actually determines its height. | ||
| 2584 | For this reason, the @code{bar} and @code{hbar} cursor types produce | ||
| 2585 | the same effect on MS-DOS. As an extension, the bar cursor | ||
| 2586 | specification can include the starting scan line of the cursor as well | ||
| 2587 | as its width, like this: | ||
| 2588 | |||
| 2589 | @example | ||
| 2590 | '(cursor-type bar @var{width} . @var{start}) | ||
| 2591 | @end example | ||
| 2592 | |||
| 2593 | @noindent | ||
| 2594 | In addition, if the @var{width} parameter is negative, the cursor bar | ||
| 2595 | begins at the top of the character cell. | ||
| 2596 | |||
| 2597 | @cindex frames on MS-DOS | ||
| 2598 | The MS-DOS terminal can only display a single frame at a time. The | ||
| 2599 | Emacs frame facilities work on MS-DOS much as they do on text-only | ||
| 2600 | terminals (@pxref{Frames,,,emacs, the Emacs Manual}). When you run | ||
| 2601 | Emacs from a DOS window on MS-Windows, you can make the visible frame | ||
| 2602 | smaller than the full screen, but Emacs still cannot display more than | ||
| 2603 | a single frame at a time. | ||
| 2604 | |||
| 2605 | @cindex frame size under MS-DOS | ||
| 2606 | @findex mode4350 | ||
| 2607 | @findex mode25 | ||
| 2608 | The @code{mode4350} command switches the display to 43 or 50 | ||
| 2609 | lines, depending on your hardware; the @code{mode25} command switches | ||
| 2610 | to the default 80x25 screen size. | ||
| 2611 | |||
| 2612 | By default, Emacs only knows how to set screen sizes of 80 columns by | ||
| 2613 | 25, 28, 35, 40, 43 or 50 rows. However, if your video adapter has | ||
| 2614 | special video modes that will switch the display to other sizes, you can | ||
| 2615 | have Emacs support those too. When you ask Emacs to switch the frame to | ||
| 2616 | @var{n} rows by @var{m} columns dimensions, it checks if there is a | ||
| 2617 | variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so, | ||
| 2618 | uses its value (which must be an integer) as the video mode to switch | ||
| 2619 | to. (Emacs switches to that video mode by calling the BIOS @code{Set | ||
| 2620 | Video Mode} function with the value of | ||
| 2621 | @code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.) | ||
| 2622 | For example, suppose your adapter will switch to 66x80 dimensions when | ||
| 2623 | put into video mode 85. Then you can make Emacs support this screen | ||
| 2624 | size by putting the following into your @file{_emacs} file: | ||
| 2625 | |||
| 2626 | @example | ||
| 2627 | (setq screen-dimensions-66x80 85) | ||
| 2628 | @end example | ||
| 2629 | |||
| 2630 | Since Emacs on MS-DOS can only set the frame size to specific | ||
| 2631 | supported dimensions, it cannot honor every possible frame resizing | ||
| 2632 | request. When an unsupported size is requested, Emacs chooses the next | ||
| 2633 | larger supported size beyond the specified size. For example, if you | ||
| 2634 | ask for 36x80 frame, you will get 40x80 instead. | ||
| 2635 | |||
| 2636 | The variables @code{screen-dimensions-@var{n}x@var{m}} are used only | ||
| 2637 | when they exactly match the specified size; the search for the next | ||
| 2638 | larger supported size ignores them. In the above example, even if your | ||
| 2639 | VGA supports 38x80 dimensions and you define a variable | ||
| 2640 | @code{screen-dimensions-38x80} with a suitable value, you will still get | ||
| 2641 | 40x80 screen when you ask for a 36x80 frame. If you want to get the | ||
| 2642 | 38x80 size in this case, you can do it by setting the variable named | ||
| 2643 | @code{screen-dimensions-36x80} with the same video mode value as | ||
| 2644 | @code{screen-dimensions-38x80}. | ||
| 2645 | |||
| 2646 | Changing frame dimensions on MS-DOS has the effect of changing all the | ||
| 2647 | other frames to the new dimensions. | ||
| 2648 | |||
| 2649 | @node MS-DOS File Names | ||
| 2650 | @section File Names on MS-DOS | ||
| 2651 | @cindex file names under MS-DOS | ||
| 2652 | @cindex init file, default name under MS-DOS | ||
| 2653 | |||
| 2654 | MS-DOS normally uses a backslash, @samp{\}, to separate name units | ||
| 2655 | within a file name, instead of the slash used on other systems. Emacs | ||
| 2656 | on MS-DOS permits use of either slash or backslash, and also knows | ||
| 2657 | about drive letters in file names. | ||
| 2658 | |||
| 2659 | On MS-DOS, file names are case-insensitive and limited to eight | ||
| 2660 | characters, plus optionally a period and three more characters. Emacs | ||
| 2661 | knows enough about these limitations to handle file names that were | ||
| 2662 | meant for other operating systems. For instance, leading dots | ||
| 2663 | @samp{.} in file names are invalid in MS-DOS, so Emacs transparently | ||
| 2664 | converts them to underscores @samp{_}; thus your default init file | ||
| 2665 | (@pxref{Init File,,,emacs, the Emacs Manual}) is called @file{_emacs} | ||
| 2666 | on MS-DOS. Excess characters before or after the period are generally | ||
| 2667 | ignored by MS-DOS itself; thus, if you visit the file | ||
| 2668 | @file{LongFileName.EvenLongerExtension}, you will silently get | ||
| 2669 | @file{longfile.eve}, but Emacs will still display the long file name | ||
| 2670 | on the mode line. Other than that, it's up to you to specify file | ||
| 2671 | names which are valid under MS-DOS; the transparent conversion as | ||
| 2672 | described above only works on file names built into Emacs. | ||
| 2673 | |||
| 2674 | @cindex backup file names on MS-DOS | ||
| 2675 | The above restrictions on the file names on MS-DOS make it almost | ||
| 2676 | impossible to construct the name of a backup file (@pxref{Backup | ||
| 2677 | Names,,,emacs, the Emacs Manual}) without losing some of the original | ||
| 2678 | file name characters. For example, the name of a backup file for | ||
| 2679 | @file{docs.txt} is @file{docs.tx~} even if single backup is used. | ||
| 2680 | |||
| 2681 | @cindex file names under Windows 95/NT | ||
| 2682 | @cindex long file names in DOS box under Windows 95/NT | ||
| 2683 | If you run Emacs as a DOS application under Windows 9X, Windows ME, or | ||
| 2684 | Windows 2000, you can turn on support for long file names. If you do | ||
| 2685 | that, Emacs doesn't truncate file names or convert them to lower case; | ||
| 2686 | instead, it uses the file names that you specify, verbatim. To enable | ||
| 2687 | long file name support, set the environment variable @env{LFN} to | ||
| 2688 | @samp{y} before starting Emacs. Unfortunately, Windows NT doesn't allow | ||
| 2689 | DOS programs to access long file names, so Emacs built for MS-DOS will | ||
| 2690 | only see their short 8+3 aliases. | ||
| 2691 | |||
| 2692 | @cindex @env{HOME} directory under MS-DOS | ||
| 2693 | MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends | ||
| 2694 | that the directory where it is installed is the value of the @env{HOME} | ||
| 2695 | environment variable. That is, if your Emacs binary, | ||
| 2696 | @file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then | ||
| 2697 | Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In | ||
| 2698 | particular, that is where Emacs looks for the init file @file{_emacs}. | ||
| 2699 | With this in mind, you can use @samp{~} in file names as an alias for | ||
| 2700 | the home directory, as you would on GNU or Unix. You can also set | ||
| 2701 | @env{HOME} variable in the environment before starting Emacs; its | ||
| 2702 | value will then override the above default behavior. | ||
| 2703 | |||
| 2704 | Emacs on MS-DOS handles the directory name @file{/dev} specially, | ||
| 2705 | because of a feature in the emulator libraries of DJGPP that pretends | ||
| 2706 | I/O devices have names in that directory. We recommend that you avoid | ||
| 2707 | using an actual directory named @file{/dev} on any disk. | ||
| 2708 | |||
| 2709 | @node MS-DOS Printing | ||
| 2710 | @section Printing and MS-DOS | ||
| 2711 | |||
| 2712 | Printing commands, such as @code{lpr-buffer} | ||
| 2713 | (@pxref{Printing,,,emacs, the Emacs Manual }) and | ||
| 2714 | @code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual}) | ||
| 2715 | can work in MS-DOS and MS-Windows by sending the output to one of the | ||
| 2716 | printer ports, if a Posix-style @code{lpr} program is unavailable. | ||
| 2717 | The same Emacs variables control printing on all systems, but in some | ||
| 2718 | cases they have different default values on MS-DOS and MS-Windows. | ||
| 2719 | |||
| 2720 | @vindex printer-name @r{(MS-DOS)} | ||
| 2721 | If you want to use your local printer, printing on it in the usual DOS | ||
| 2722 | manner, then set the Lisp variable @code{lpr-command} to @code{""} (its | ||
| 2723 | default value) and @code{printer-name} to the name of the printer | ||
| 2724 | port---for example, @code{"PRN"}, the usual local printer port (that's | ||
| 2725 | the default), or @code{"LPT2"}, or @code{"COM1"} for a serial printer. | ||
| 2726 | You can also set @code{printer-name} to a file name, in which case | ||
| 2727 | ``printed'' output is actually appended to that file. If you set | ||
| 2728 | @code{printer-name} to @code{"NUL"}, printed output is silently | ||
| 2729 | discarded (sent to the system null device). | ||
| 2730 | |||
| 2731 | On MS-Windows, when the Windows network software is installed, you can | ||
| 2732 | also use a printer shared by another machine by setting | ||
| 2733 | @code{printer-name} to the UNC share name for that printer---for example, | ||
| 2734 | @code{"//joes_pc/hp4si"}. (It doesn't matter whether you use forward | ||
| 2735 | slashes or backslashes here.) To find out the names of shared printers, | ||
| 2736 | run the command @samp{net view} at a DOS command prompt to obtain a list | ||
| 2737 | of servers, and @samp{net view @var{server-name}} to see the names of printers | ||
| 2738 | (and directories) shared by that server. Alternatively, click the | ||
| 2739 | @samp{Network Neighborhood} icon on your desktop, and look for machines | ||
| 2740 | which share their printers via the network. | ||
| 2741 | |||
| 2742 | @cindex @samp{net use}, and printing on MS-Windows | ||
| 2743 | @cindex networked printers (MS-Windows) | ||
| 2744 | If the printer doesn't appear in the output of @samp{net view}, or | ||
| 2745 | if setting @code{printer-name} to the UNC share name doesn't produce a | ||
| 2746 | hardcopy on that printer, you can use the @samp{net use} command to | ||
| 2747 | connect a local print port such as @code{"LPT2"} to the networked | ||
| 2748 | printer. For example, typing @kbd{net use LPT2: | ||
| 2749 | \\joes_pc\hp4si}@footnote{ | ||
| 2750 | Note that the @samp{net use} command requires the UNC share name to be | ||
| 2751 | typed with the Windows-style backslashes, while the value of | ||
| 2752 | @code{printer-name} can be set with either forward- or backslashes.} | ||
| 2753 | causes Windows to @dfn{capture} the LPT2 port and redirect the printed | ||
| 2754 | material to the printer connected to the machine @code{joes_pc}. | ||
| 2755 | After this command, setting @code{printer-name} to @code{"LPT2"} | ||
| 2756 | should produce the hardcopy on the networked printer. | ||
| 2757 | |||
| 2758 | With some varieties of Windows network software, you can instruct | ||
| 2759 | Windows to capture a specific printer port such as @code{"LPT2"}, and | ||
| 2760 | redirect it to a networked printer via the @w{@code{Control | ||
| 2761 | Panel->Printers}} applet instead of @samp{net use}. | ||
| 2762 | |||
| 2763 | Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even | ||
| 2764 | though they are connected to a Windows machine which uses a different | ||
| 2765 | encoding for the same locale. For example, in the Latin-1 locale, DOS | ||
| 2766 | uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and | ||
| 2767 | MULE}. When you print to such printers from Windows, you can use the | ||
| 2768 | @kbd{C-x RET c} (@code{universal-coding-system-argument}) command before | ||
| 2769 | @kbd{M-x lpr-buffer}; Emacs will then convert the text to the DOS | ||
| 2770 | codepage that you specify. For example, @kbd{C-x RET c cp850-dos RET | ||
| 2771 | M-x lpr-region RET} will print the region while converting it to the | ||
| 2772 | codepage 850 encoding. You may need to create the @code{cp@var{nnn}} | ||
| 2773 | coding system with @kbd{M-x codepage-setup}. | ||
| 2774 | |||
| 2775 | If you set @code{printer-name} to a file name, it's best to use an | ||
| 2776 | absolute file name. Emacs changes the working directory according to | ||
| 2777 | the default directory of the current buffer, so if the file name in | ||
| 2778 | @code{printer-name} is relative, you will end up with several such | ||
| 2779 | files, each one in the directory of the buffer from which the printing | ||
| 2780 | was done. | ||
| 2781 | |||
| 2782 | @findex print-buffer @r{(MS-DOS)} | ||
| 2783 | @findex print-region @r{(MS-DOS)} | ||
| 2784 | @vindex lpr-headers-switches @r{(MS-DOS)} | ||
| 2785 | The commands @code{print-buffer} and @code{print-region} call the | ||
| 2786 | @code{pr} program, or use special switches to the @code{lpr} program, to | ||
| 2787 | produce headers on each printed page. MS-DOS and MS-Windows don't | ||
| 2788 | normally have these programs, so by default, the variable | ||
| 2789 | @code{lpr-headers-switches} is set so that the requests to print page | ||
| 2790 | headers are silently ignored. Thus, @code{print-buffer} and | ||
| 2791 | @code{print-region} produce the same output as @code{lpr-buffer} and | ||
| 2792 | @code{lpr-region}, respectively. If you do have a suitable @code{pr} | ||
| 2793 | program (for example, from GNU Textutils), set | ||
| 2794 | @code{lpr-headers-switches} to @code{nil}; Emacs will then call | ||
| 2795 | @code{pr} to produce the page headers, and print the resulting output as | ||
| 2796 | specified by @code{printer-name}. | ||
| 2797 | |||
| 2798 | @vindex print-region-function @r{(MS-DOS)} | ||
| 2799 | @cindex lpr usage under MS-DOS | ||
| 2800 | @vindex lpr-command @r{(MS-DOS)} | ||
| 2801 | @vindex lpr-switches @r{(MS-DOS)} | ||
| 2802 | Finally, if you do have an @code{lpr} work-alike, you can set the | ||
| 2803 | variable @code{lpr-command} to @code{"lpr"}. Then Emacs will use | ||
| 2804 | @code{lpr} for printing, as on other systems. (If the name of the | ||
| 2805 | program isn't @code{lpr}, set @code{lpr-command} to specify where to | ||
| 2806 | find it.) The variable @code{lpr-switches} has its standard meaning | ||
| 2807 | when @code{lpr-command} is not @code{""}. If the variable | ||
| 2808 | @code{printer-name} has a string value, it is used as the value for the | ||
| 2809 | @code{-P} option to @code{lpr}, as on Unix. | ||
| 2810 | |||
| 2811 | @findex ps-print-buffer @r{(MS-DOS)} | ||
| 2812 | @findex ps-spool-buffer @r{(MS-DOS)} | ||
| 2813 | @vindex ps-printer-name @r{(MS-DOS)} | ||
| 2814 | @vindex ps-lpr-command @r{(MS-DOS)} | ||
| 2815 | @vindex ps-lpr-switches @r{(MS-DOS)} | ||
| 2816 | A parallel set of variables, @code{ps-lpr-command}, | ||
| 2817 | @code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{PostScript | ||
| 2818 | Variables,,,emacs, the Emacs Manual}), defines how PostScript files | ||
| 2819 | should be printed. These variables are used in the same way as the | ||
| 2820 | corresponding variables described above for non-PostScript printing. | ||
| 2821 | Thus, the value of @code{ps-printer-name} is used as the name of the | ||
| 2822 | device (or file) to which PostScript output is sent, just as | ||
| 2823 | @code{printer-name} is used for non-PostScript printing. (There are | ||
| 2824 | two distinct sets of variables in case you have two printers attached | ||
| 2825 | to two different ports, and only one of them is a PostScript printer.) | ||
| 2826 | |||
| 2827 | The default value of the variable @code{ps-lpr-command} is @code{""}, | ||
| 2828 | which causes PostScript output to be sent to the printer port specified | ||
| 2829 | by @code{ps-printer-name}, but @code{ps-lpr-command} can also be set to | ||
| 2830 | the name of a program which will accept PostScript files. Thus, if you | ||
| 2831 | have a non-PostScript printer, you can set this variable to the name of | ||
| 2832 | a PostScript interpreter program (such as Ghostscript). Any switches | ||
| 2833 | that need to be passed to the interpreter program are specified using | ||
| 2834 | @code{ps-lpr-switches}. (If the value of @code{ps-printer-name} is a | ||
| 2835 | string, it will be added to the list of switches as the value for the | ||
| 2836 | @code{-P} option. This is probably only useful if you are using | ||
| 2837 | @code{lpr}, so when using an interpreter typically you would set | ||
| 2838 | @code{ps-printer-name} to something other than a string so it is | ||
| 2839 | ignored.) | ||
| 2840 | |||
| 2841 | For example, to use Ghostscript for printing on an Epson printer | ||
| 2842 | connected to the @samp{LPT2} port, put this in your @file{_emacs} file: | ||
| 2843 | |||
| 2844 | @example | ||
| 2845 | (setq ps-printer-name t) ; Ghostscript doesn't understand -P | ||
| 2846 | (setq ps-lpr-command "c:/gs/gs386") | ||
| 2847 | (setq ps-lpr-switches '("-q" "-dNOPAUSE" | ||
| 2848 | "-sDEVICE=epson" | ||
| 2849 | "-r240x72" | ||
| 2850 | "-sOutputFile=LPT2" | ||
| 2851 | "-Ic:/gs")) | ||
| 2852 | @end example | ||
| 2853 | |||
| 2854 | @noindent | ||
| 2855 | (This assumes that Ghostscript is installed in the @file{"c:/gs"} | ||
| 2856 | directory.) | ||
| 2857 | |||
| 2858 | @vindex dos-printer | ||
| 2859 | @vindex dos-ps-printer | ||
| 2860 | For backwards compatibility, the value of @code{dos-printer} | ||
| 2861 | (@code{dos-ps-printer}), if it has a value, overrides the value of | ||
| 2862 | @code{printer-name} (@code{ps-printer-name}), on MS-DOS and MS-Windows | ||
| 2863 | only. | ||
| 2864 | |||
| 2865 | |||
| 2866 | @node MS-DOS and MULE | ||
| 2867 | @section International Support on MS-DOS | ||
| 2868 | @cindex international support @r{(MS-DOS)} | ||
| 2869 | |||
| 2870 | Emacs on MS-DOS supports the same international character sets as it | ||
| 2871 | does on GNU, Unix and other platforms (@pxref{International,,,emacs, | ||
| 2872 | the Emacs Manual}), including coding systems for converting between | ||
| 2873 | the different character sets. However, due to incompatibilities | ||
| 2874 | between MS-DOS/MS-Windows and other systems, there are several | ||
| 2875 | DOS-specific aspects of this support that you should be aware of. | ||
| 2876 | This section describes these aspects. | ||
| 2877 | |||
| 2878 | The description below is largely specific to the MS-DOS port of | ||
| 2879 | Emacs, especially where it talks about practical implications for | ||
| 2880 | Emacs users. For other operating systems, see the @file{code-pages.el} | ||
| 2881 | package, which implements support for MS-DOS- and MS-Windows-specific | ||
| 2882 | encodings for all platforms other than MS-DOS. | ||
| 2883 | |||
| 2884 | @table @kbd | ||
| 2885 | @item M-x dos-codepage-setup | ||
| 2886 | Set up Emacs display and coding systems as appropriate for the current | ||
| 2887 | DOS codepage. | ||
| 2888 | |||
| 2889 | @item M-x codepage-setup | ||
| 2890 | Create a coding system for a certain DOS codepage. | ||
| 2891 | @end table | ||
| 2892 | |||
| 2893 | @cindex codepage, MS-DOS | ||
| 2894 | @cindex DOS codepages | ||
| 2895 | MS-DOS is designed to support one character set of 256 characters at | ||
| 2896 | any given time, but gives you a variety of character sets to choose | ||
| 2897 | from. The alternative character sets are known as @dfn{DOS codepages}. | ||
| 2898 | Each codepage includes all 128 @acronym{ASCII} characters, but the other 128 | ||
| 2899 | characters (codes 128 through 255) vary from one codepage to another. | ||
| 2900 | Each DOS codepage is identified by a 3-digit number, such as 850, 862, | ||
| 2901 | etc. | ||
| 2902 | |||
| 2903 | In contrast to X, which lets you use several fonts at the same time, | ||
| 2904 | MS-DOS normally doesn't allow use of several codepages in a single | ||
| 2905 | session. MS-DOS was designed to load a single codepage at system | ||
| 2906 | startup, and require you to reboot in order to change | ||
| 2907 | it@footnote{Normally, one particular codepage is burnt into the | ||
| 2908 | display memory, while other codepages can be installed by modifying | ||
| 2909 | system configuration files, such as @file{CONFIG.SYS}, and rebooting. | ||
| 2910 | While there is third-party software that allows changing the codepage | ||
| 2911 | without rebooting, we describe here how a stock MS-DOS system | ||
| 2912 | behaves.}. Much the same limitation applies when you run DOS | ||
| 2913 | executables on other systems such as MS-Windows. | ||
| 2914 | |||
| 2915 | @cindex unibyte operation @r{(MS-DOS)} | ||
| 2916 | If you invoke Emacs on MS-DOS with the @samp{--unibyte} option | ||
| 2917 | (@pxref{Initial Options,,,emacs, the Emacs Manual}), Emacs does not | ||
| 2918 | perform any conversion of non-@acronym{ASCII} characters. Instead, it | ||
| 2919 | reads and writes any non-@acronym{ASCII} characters verbatim, and | ||
| 2920 | sends their 8-bit codes to the display verbatim. Thus, unibyte Emacs | ||
| 2921 | on MS-DOS supports the current codepage, whatever it may be, but | ||
| 2922 | cannot even represent any other characters. | ||
| 2923 | |||
| 2924 | @vindex dos-codepage | ||
| 2925 | For multibyte operation on MS-DOS, Emacs needs to know which | ||
| 2926 | characters the chosen DOS codepage can display. So it queries the | ||
| 2927 | system shortly after startup to get the chosen codepage number, and | ||
| 2928 | stores the number in the variable @code{dos-codepage}. Some systems | ||
| 2929 | return the default value 437 for the current codepage, even though the | ||
| 2930 | actual codepage is different. (This typically happens when you use the | ||
| 2931 | codepage built into the display hardware.) You can specify a different | ||
| 2932 | codepage for Emacs to use by setting the variable @code{dos-codepage} in | ||
| 2933 | your init file. | ||
| 2934 | |||
| 2935 | @cindex language environment, automatic selection on @r{MS-DOS} | ||
| 2936 | Multibyte Emacs supports only certain DOS codepages: those which can | ||
| 2937 | display Far-Eastern scripts, like the Japanese codepage 932, and those | ||
| 2938 | that encode a single ISO 8859 character set. | ||
| 2939 | |||
| 2940 | The Far-Eastern codepages can directly display one of the MULE | ||
| 2941 | character sets for these countries, so Emacs simply sets up to use the | ||
| 2942 | appropriate terminal coding system that is supported by the codepage. | ||
| 2943 | The special features described in the rest of this section mostly | ||
| 2944 | pertain to codepages that encode ISO 8859 character sets. | ||
| 2945 | |||
| 2946 | For the codepages which correspond to one of the ISO character sets, | ||
| 2947 | Emacs knows the character set name based on the codepage number. Emacs | ||
| 2948 | automatically creates a coding system to support reading and writing | ||
| 2949 | files that use the current codepage, and uses this coding system by | ||
| 2950 | default. The name of this coding system is @code{cp@var{nnn}}, where | ||
| 2951 | @var{nnn} is the codepage number.@footnote{The standard Emacs coding | ||
| 2952 | systems for ISO 8859 are not quite right for the purpose, because | ||
| 2953 | typically the DOS codepage does not match the standard ISO character | ||
| 2954 | codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has | ||
| 2955 | code 231 in the standard Latin-1 character set, but the corresponding | ||
| 2956 | DOS codepage 850 uses code 135 for this glyph.} | ||
| 2957 | |||
| 2958 | @cindex mode line @r{(MS-DOS)} | ||
| 2959 | All the @code{cp@var{nnn}} coding systems use the letter @samp{D} | ||
| 2960 | (for ``DOS'') as their mode-line mnemonic. Since both the terminal | ||
| 2961 | coding system and the default coding system for file I/O are set to | ||
| 2962 | the proper @code{cp@var{nnn}} coding system at startup, it is normal | ||
| 2963 | for the mode line on MS-DOS to begin with @samp{-DD\-}. @xref{Mode | ||
| 2964 | Line,,,emacs, the Emacs Manual}. Far-Eastern DOS terminals do not use | ||
| 2965 | the @code{cp@var{nnn}} coding systems, and thus their initial mode | ||
| 2966 | line looks like the Emacs default. | ||
| 2967 | |||
| 2968 | Since the codepage number also indicates which script you are using, | ||
| 2969 | Emacs automatically runs @code{set-language-environment} to select the | ||
| 2970 | language environment for that script (@pxref{Language | ||
| 2971 | Environments,,,emacs, the Emacs Manual}). | ||
| 2972 | |||
| 2973 | If a buffer contains a character belonging to some other ISO 8859 | ||
| 2974 | character set, not the one that the chosen DOS codepage supports, Emacs | ||
| 2975 | displays it using a sequence of @acronym{ASCII} characters. For example, if the | ||
| 2976 | current codepage doesn't have a glyph for the letter @samp{@`o} (small | ||
| 2977 | @samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where | ||
| 2978 | the braces serve as a visual indication that this is a single character. | ||
| 2979 | (This may look awkward for some non-Latin characters, such as those from | ||
| 2980 | Greek or Hebrew alphabets, but it is still readable by a person who | ||
| 2981 | knows the language.) Even though the character may occupy several | ||
| 2982 | columns on the screen, it is really still just a single character, and | ||
| 2983 | all Emacs commands treat it as one. | ||
| 2984 | |||
| 2985 | @cindex IBM graphics characters (MS-DOS) | ||
| 2986 | @cindex box-drawing characters (MS-DOS) | ||
| 2987 | @cindex line-drawing characters (MS-DOS) | ||
| 2988 | Not all characters in DOS codepages correspond to ISO 8859 | ||
| 2989 | characters---some are used for other purposes, such as box-drawing | ||
| 2990 | characters and other graphics. Emacs maps these characters to two | ||
| 2991 | special character sets called @code{eight-bit-control} and | ||
| 2992 | @code{eight-bit-graphic}, and displays them as their IBM glyphs. | ||
| 2993 | However, you should be aware that other systems might display these | ||
| 2994 | characters differently, so you should avoid them in text that might be | ||
| 2995 | copied to a different operating system, or even to another DOS machine | ||
| 2996 | that uses a different codepage. | ||
| 2997 | |||
| 2998 | @vindex dos-unsupported-character-glyph | ||
| 2999 | Emacs supports many other characters sets aside from ISO 8859, but it | ||
| 3000 | cannot display them on MS-DOS. So if one of these multibyte characters | ||
| 3001 | appears in a buffer, Emacs on MS-DOS displays them as specified by the | ||
| 3002 | @code{dos-unsupported-character-glyph} variable; by default, this glyph | ||
| 3003 | is an empty triangle. Use the @kbd{C-u C-x =} command to display the | ||
| 3004 | actual code and character set of such characters. @xref{Position | ||
| 3005 | Info,,,emacs, the Emacs Manual}. | ||
| 3006 | |||
| 3007 | @findex codepage-setup | ||
| 3008 | By default, Emacs defines a coding system to support the current | ||
| 3009 | codepage. To define a coding system for some other codepage (e.g., to | ||
| 3010 | visit a file written on a DOS machine in another country), use the | ||
| 3011 | @kbd{M-x codepage-setup} command. It prompts for the 3-digit code of | ||
| 3012 | the codepage, with completion, then creates the coding system for the | ||
| 3013 | specified codepage. You can then use the new coding system to read and | ||
| 3014 | write files, but you must specify it explicitly for the file command | ||
| 3015 | when you want to use it (@pxref{Text Coding,,,emacs, the Emacs Manual}). | ||
| 3016 | |||
| 3017 | These coding systems are also useful for visiting a file encoded using | ||
| 3018 | a DOS codepage, using Emacs running on some other operating system. | ||
| 3019 | |||
| 3020 | @cindex MS-Windows codepages | ||
| 3021 | MS-Windows provides its own codepages, which are different from the | ||
| 3022 | DOS codepages for the same locale. For example, DOS codepage 850 | ||
| 3023 | supports the same character set as Windows codepage 1252; DOS codepage | ||
| 3024 | 855 supports the same character set as Windows codepage 1251, etc. | ||
| 3025 | The MS-Windows version of Emacs uses the current codepage for display | ||
| 3026 | when invoked with the @samp{-nw} option. Support for codepages in the | ||
| 3027 | Windows port of Emacs is part of the @file{code-pages.el} package. | ||
| 3028 | |||
| 3029 | @node MS-DOS Processes | ||
| 3030 | @section Subprocesses on MS-DOS | ||
| 3031 | |||
| 3032 | @cindex compilation under MS-DOS | ||
| 3033 | @cindex inferior processes under MS-DOS | ||
| 3034 | @findex compile @r{(MS-DOS)} | ||
| 3035 | @findex grep @r{(MS-DOS)} | ||
| 3036 | Because MS-DOS is a single-process ``operating system,'' | ||
| 3037 | asynchronous subprocesses are not available. In particular, Shell | ||
| 3038 | mode and its variants do not work. Most Emacs features that use | ||
| 3039 | asynchronous subprocesses also don't work on MS-DOS, including | ||
| 3040 | Shell mode and GUD. When in doubt, try and see; commands that | ||
| 3041 | don't work output an error message saying that asynchronous processes | ||
| 3042 | aren't supported. | ||
| 3043 | |||
| 3044 | Compilation under Emacs with @kbd{M-x compile}, searching files with | ||
| 3045 | @kbd{M-x grep} and displaying differences between files with @kbd{M-x | ||
| 3046 | diff} do work, by running the inferior processes synchronously. This | ||
| 3047 | means you cannot do any more editing until the inferior process | ||
| 3048 | finishes. | ||
| 3049 | |||
| 3050 | Spell checking also works, by means of special support for synchronous | ||
| 3051 | invocation of the @code{ispell} program. This is slower than the | ||
| 3052 | asynchronous invocation on other platforms | ||
| 3053 | |||
| 3054 | Instead of the Shell mode, which doesn't work on MS-DOS, you can use | ||
| 3055 | the @kbd{M-x eshell} command. This invokes the Eshell package that | ||
| 3056 | implements a Posix-like shell entirely in Emacs Lisp. | ||
| 3057 | |||
| 3058 | By contrast, Emacs compiled as a native Windows application | ||
| 3059 | @strong{does} support asynchronous subprocesses. @xref{Windows | ||
| 3060 | Processes,,,emacs, the Emacs Manual}. | ||
| 3061 | |||
| 3062 | @cindex printing under MS-DOS | ||
| 3063 | Printing commands, such as @code{lpr-buffer} | ||
| 3064 | (@pxref{Printing,,,emacs, the Emacs Manual}) and | ||
| 3065 | @code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual}), | ||
| 3066 | work in MS-DOS by sending the output to one of the printer ports. | ||
| 3067 | @xref{MS-DOS Printing,,,emacs, the Emacs Manual}. | ||
| 3068 | |||
| 3069 | When you run a subprocess synchronously on MS-DOS, make sure the | ||
| 3070 | program terminates and does not try to read keyboard input. If the | ||
| 3071 | program does not terminate on its own, you will be unable to terminate | ||
| 3072 | it, because MS-DOS provides no general way to terminate a process. | ||
| 3073 | Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these | ||
| 3074 | cases. | ||
| 3075 | |||
| 3076 | Accessing files on other machines is not supported on MS-DOS. Other | ||
| 3077 | network-oriented commands such as sending mail, Web browsing, remote | ||
| 3078 | login, etc., don't work either, unless network access is built into | ||
| 3079 | MS-DOS with some network redirector. | ||
| 3080 | |||
| 3081 | @cindex directory listing on MS-DOS | ||
| 3082 | @vindex dired-listing-switches @r{(MS-DOS)} | ||
| 3083 | Dired on MS-DOS uses the @code{ls-lisp} package where other | ||
| 3084 | platforms use the system @code{ls} command. Therefore, Dired on | ||
| 3085 | MS-DOS supports only some of the possible options you can mention in | ||
| 3086 | the @code{dired-listing-switches} variable. The options that work are | ||
| 3087 | @samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S}, | ||
| 3088 | @samp{-s}, @samp{-t}, and @samp{-u}. | ||
| 3089 | |||
| 3090 | |||
| 2409 | @node Index | 3091 | @node Index |
| 2410 | @unnumbered Index | 3092 | @unnumbered Index |
| 2411 | 3093 | ||
diff --git a/man/emacs.texi b/man/emacs.texi index 44a718c9911..0dc04945e9f 100644 --- a/man/emacs.texi +++ b/man/emacs.texi | |||
| @@ -127,7 +127,7 @@ and Sending Mail and Registers and Minibuffer. | |||
| 127 | * Glossary:: The glossary. | 127 | * Glossary:: The glossary. |
| 128 | * Antinews:: Information about Emacs version 21. | 128 | * Antinews:: Information about Emacs version 21. |
| 129 | * Mac OS:: Using Emacs in the Mac. | 129 | * Mac OS:: Using Emacs in the Mac. |
| 130 | * MS-DOS:: Using Emacs on MS-DOS and Microsoft Windows. | 130 | * Emacs and Microsoft Windows:: Using Emacs on Microsoft Windows. |
| 131 | * Manifesto:: What's GNU? Gnu's Not Unix! | 131 | * Manifesto:: What's GNU? Gnu's Not Unix! |
| 132 | * Acknowledgments:: Major contributors to GNU Emacs. | 132 | * Acknowledgments:: Major contributors to GNU Emacs. |
| 133 | 133 | ||
| @@ -860,16 +860,9 @@ Emacs and Mac OS | |||
| 860 | * Mac Font Specs:: Specifying fonts on Mac. | 860 | * Mac Font Specs:: Specifying fonts on Mac. |
| 861 | * Mac Functions:: Mac-specific Lisp functions. | 861 | * Mac Functions:: Mac-specific Lisp functions. |
| 862 | 862 | ||
| 863 | MS-DOS and Windows 95/98/NT | 863 | Emacs and Microsoft Windows |
| 864 | 864 | ||
| 865 | * MS-DOS Keyboard:: Keyboard usage on MS-DOS. | ||
| 866 | * MS-DOS Mouse:: Mouse usage on MS-DOS. | ||
| 867 | * MS-DOS Display:: Fonts, frames and display size on MS-DOS. | ||
| 868 | * MS-DOS File Names:: File-name conventions on MS-DOS. | ||
| 869 | * Text and Binary:: Text files on MS-DOS use CRLF to separate lines. | 865 | * Text and Binary:: Text files on MS-DOS use CRLF to separate lines. |
| 870 | * MS-DOS Printing:: How to specify the printer on MS-DOS. | ||
| 871 | * MS-DOS and MULE:: Support for internationalization on MS-DOS. | ||
| 872 | * MS-DOS Processes:: Running subprocesses on MS-DOS. | ||
| 873 | * Windows Processes:: Running subprocesses on Windows. | 866 | * Windows Processes:: Running subprocesses on Windows. |
| 874 | * Windows System Menu:: Controlling what the ALT key does. | 867 | * Windows System Menu:: Controlling what the ALT key does. |
| 875 | @end menu | 868 | @end menu |
| @@ -931,10 +924,10 @@ This edition of the manual is intended for use with GNU Emacs | |||
| 931 | installed on GNU and Unix systems. GNU Emacs can also be used on VMS, | 924 | installed on GNU and Unix systems. GNU Emacs can also be used on VMS, |
| 932 | MS-DOS (also called MS-DOG), Microsoft Windows, and Macintosh systems. | 925 | MS-DOS (also called MS-DOG), Microsoft Windows, and Macintosh systems. |
| 933 | Those systems use different file name syntax; in addition, VMS and | 926 | Those systems use different file name syntax; in addition, VMS and |
| 934 | MS-DOS do not support all GNU Emacs features. @xref{MS-DOS}, for | 927 | MS-DOS do not support all GNU Emacs features. @xref{Emacs and |
| 935 | information about using Emacs on MS-DOS and Windows. @xref{Mac OS}, | 928 | Microsoft Windows}, for information about using Emacs on Windows. |
| 936 | for information about using Emacs on Macintosh. We don't try to | 929 | @xref{Mac OS}, for information about using Emacs on Macintosh. We |
| 937 | describe VMS usage in this manual. | 930 | don't try to describe VMS usage in this manual. |
| 938 | @end iftex | 931 | @end iftex |
| 939 | 932 | ||
| 940 | @node Distrib, Intro, Top, Top | 933 | @node Distrib, Intro, Top, Top |
diff --git a/man/frames.texi b/man/frames.texi index b5ec21533b7..c11d6f74685 100644 --- a/man/frames.texi +++ b/man/frames.texi | |||
| @@ -27,7 +27,7 @@ it terminates all the frames. To delete just one frame, use @kbd{C-x 5 | |||
| 27 | 27 | ||
| 28 | Emacs compiled for MS-DOS emulates some windowing functionality, | 28 | Emacs compiled for MS-DOS emulates some windowing functionality, |
| 29 | so that you can use many of the features described in this chapter. | 29 | so that you can use many of the features described in this chapter. |
| 30 | @xref{MS-DOS Mouse}, for more information. | 30 | @xref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}. |
| 31 | 31 | ||
| 32 | @menu | 32 | @menu |
| 33 | * Mouse Commands:: Moving, cutting, and pasting, with the mouse. | 33 | * Mouse Commands:: Moving, cutting, and pasting, with the mouse. |
diff --git a/man/gnu.texi b/man/gnu.texi index c2652d09a7b..6b050d7839a 100644 --- a/man/gnu.texi +++ b/man/gnu.texi | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1995, 2002, 2003, 2004, | 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1995, 2002, 2003, 2004, |
| 3 | @c 2005, 2006 Free Software Foundation, Inc. | 3 | @c 2005, 2006 Free Software Foundation, Inc. |
| 4 | @ifclear justgnu | 4 | @ifclear justgnu |
| 5 | @node Manifesto,, MS-DOS, Top | 5 | @node Manifesto,, Emacs and Microsoft Windows, Top |
| 6 | @unnumbered The GNU Manifesto | 6 | @unnumbered The GNU Manifesto |
| 7 | @end ifclear | 7 | @end ifclear |
| 8 | @ifset justgnu | 8 | @ifset justgnu |
diff --git a/man/macos.texi b/man/macos.texi index ba0f9e995ca..89ce13d1d1b 100644 --- a/man/macos.texi +++ b/man/macos.texi | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | @c Copyright (C) 2000, 2001, 2002, 2003, 2004, | 2 | @c Copyright (C) 2000, 2001, 2002, 2003, 2004, |
| 3 | @c 2005, 2006 Free Software Foundation, Inc. | 3 | @c 2005, 2006 Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Mac OS, MS-DOS, Antinews, Top | 5 | @node Mac OS, Emacs and Microsoft Windows, Antinews, Top |
| 6 | @appendix Emacs and Mac OS | 6 | @appendix Emacs and Mac OS |
| 7 | @cindex Mac OS | 7 | @cindex Mac OS |
| 8 | @cindex Macintosh | 8 | @cindex Macintosh |
diff --git a/man/msdog.texi b/man/msdog.texi index 434427b49b4..3bdc9051a71 100644 --- a/man/msdog.texi +++ b/man/msdog.texi | |||
| @@ -2,307 +2,28 @@ | |||
| 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, | 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, |
| 3 | @c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 3 | @c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node MS-DOS, Manifesto, Mac OS, Top | 5 | @node Emacs and Microsoft Windows, Manifesto, Mac OS, Top |
| 6 | @appendix Emacs and Microsoft Systems | 6 | @appendix Emacs and Microsoft Windows |
| 7 | @cindex MS-DOG | ||
| 8 | @cindex Microsoft Windows | 7 | @cindex Microsoft Windows |
| 9 | @cindex MS-DOS peculiarities | 8 | |
| 10 | 9 | This section describes peculiarities of using Emacs on Microsoft | |
| 11 | This section briefly describes the peculiarities of using Emacs on | 10 | Windows. Information about Emacs and Microsoft's older MS-DOS |
| 12 | the MS-DOS ``operating system'' (also known as ``MS-DOG'') and on | 11 | ``operating system'' (also known as ``MS-DOG'') is now in a separate |
| 13 | Microsoft Windows. | 12 | manual (@inforef{MS-DOG,, emacs-xtra}). |
| 14 | 13 | ||
| 15 | If you build Emacs for MS-DOS, the binary will also run on Windows | 14 | Iif you want to use Emacs on Windows, you would normally build Emacs |
| 16 | 3.X, Windows NT, Windows 9X/ME, Windows 2000, or OS/2 as a DOS | 15 | specifically for Windows. If you do that, the behavior is reasonably |
| 17 | application; all the of this chapter applies for all of those systems, | 16 | similar to what is documented in the rest of the manual, including |
| 18 | if you use an Emacs that was built for MS-DOS. | 17 | support for long file names, multiple frames, scroll bars, mouse |
| 19 | 18 | menus, and subprocesses. However, a few special considerations apply, | |
| 20 | However, if you want to use Emacs on Windows, you would normally | 19 | and they are described here. |
| 21 | build Emacs specifically for Windows. If you do that, most of this | ||
| 22 | chapter does not apply; instead, you get behavior much closer to what | ||
| 23 | is documented in the rest of the manual, including support for long | ||
| 24 | file names, multiple frames, scroll bars, mouse menus, and | ||
| 25 | subprocesses. However, the section on text files and binary files | ||
| 26 | does still apply. There are also two sections at the end of this | ||
| 27 | chapter which apply specifically for the Windows version. | ||
| 28 | 20 | ||
| 29 | @menu | 21 | @menu |
| 30 | * Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS. | 22 | * Text and Binary:: Text files use CRLF to terminate lines. |
| 31 | * Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS. | ||
| 32 | * Display: MS-DOS Display. Fonts, frames and display size on MS-DOS. | ||
| 33 | * Files: MS-DOS File Names. File name conventions on MS-DOS. | ||
| 34 | * Text and Binary:: Text files on MS-DOS use CRLF to separate lines. | ||
| 35 | * Printing: MS-DOS Printing. How to specify the printer on MS-DOS. | ||
| 36 | * I18N: MS-DOS and MULE. Support for internationalization on MS-DOS. | ||
| 37 | * Processes: MS-DOS Processes. Running subprocesses on MS-DOS. | ||
| 38 | * Windows Processes:: Running subprocesses on Windows. | 23 | * Windows Processes:: Running subprocesses on Windows. |
| 39 | * Windows System Menu:: Controlling what the ALT key does. | 24 | * Windows System Menu:: Controlling what the ALT key does. |
| 40 | @end menu | 25 | @end menu |
| 41 | 26 | ||
| 42 | @node MS-DOS Keyboard | ||
| 43 | @section Keyboard Usage on MS-DOS | ||
| 44 | |||
| 45 | @kindex DEL @r{(MS-DOS)} | ||
| 46 | @kindex BS @r{(MS-DOS)} | ||
| 47 | The key that is called @key{DEL} in Emacs (because that's how it is | ||
| 48 | designated on most workstations) is known as @key{BS} (backspace) on a | ||
| 49 | PC. That is why the PC-specific terminal initialization remaps the | ||
| 50 | @key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act | ||
| 51 | as @kbd{C-d} for the same reasons. | ||
| 52 | |||
| 53 | @kindex C-g @r{(MS-DOS)} | ||
| 54 | @kindex C-BREAK @r{(MS-DOS)} | ||
| 55 | @cindex quitting on MS-DOS | ||
| 56 | Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit | ||
| 57 | character, just like @kbd{C-g}. This is because Emacs cannot detect | ||
| 58 | that you have typed @kbd{C-g} until it is ready for more input. As a | ||
| 59 | consequence, you cannot use @kbd{C-g} to stop a running command | ||
| 60 | (@pxref{Quitting}). By contrast, @kbd{C-@key{BREAK}} @emph{is} detected | ||
| 61 | as soon as you type it (as @kbd{C-g} is on other systems), so it can be | ||
| 62 | used to stop a running command and for emergency escape | ||
| 63 | (@pxref{Emergency Escape}). | ||
| 64 | |||
| 65 | @cindex Meta (under MS-DOS) | ||
| 66 | @cindex Hyper (under MS-DOS) | ||
| 67 | @cindex Super (under MS-DOS) | ||
| 68 | @vindex dos-super-key | ||
| 69 | @vindex dos-hyper-key | ||
| 70 | The PC keyboard maps use the left @key{ALT} key as the @key{META} key. | ||
| 71 | You have two choices for emulating the @key{SUPER} and @key{HYPER} keys: | ||
| 72 | choose either the right @key{CTRL} key or the right @key{ALT} key by | ||
| 73 | setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1 | ||
| 74 | or 2 respectively. If neither @code{dos-super-key} nor | ||
| 75 | @code{dos-hyper-key} is 1, then by default the right @key{ALT} key is | ||
| 76 | also mapped to the @key{META} key. However, if the MS-DOS international | ||
| 77 | keyboard support program @file{KEYB.COM} is installed, Emacs will | ||
| 78 | @emph{not} map the right @key{ALT} to @key{META}, since it is used for | ||
| 79 | accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard | ||
| 80 | layouts; in this case, you may only use the left @key{ALT} as @key{META} | ||
| 81 | key. | ||
| 82 | |||
| 83 | @kindex C-j @r{(MS-DOS)} | ||
| 84 | @vindex dos-keypad-mode | ||
| 85 | The variable @code{dos-keypad-mode} is a flag variable that controls | ||
| 86 | what key codes are returned by keys in the numeric keypad. You can also | ||
| 87 | define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the | ||
| 88 | following line into your @file{_emacs} file: | ||
| 89 | |||
| 90 | @smallexample | ||
| 91 | ;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.} | ||
| 92 | (define-key function-key-map [kp-enter] [?\C-j]) | ||
| 93 | @end smallexample | ||
| 94 | |||
| 95 | @node MS-DOS Mouse | ||
| 96 | @section Mouse Usage on MS-DOS | ||
| 97 | |||
| 98 | @cindex mouse support under MS-DOS | ||
| 99 | Emacs on MS-DOS supports a mouse (on the default terminal only). | ||
| 100 | The mouse commands work as documented, including those that use menus | ||
| 101 | and the menu bar (@pxref{Menu Bar}). Scroll bars don't work in | ||
| 102 | MS-DOS Emacs. PC mice usually have only two buttons; these act as | ||
| 103 | @kbd{Mouse-1} and @kbd{Mouse-2}, but if you press both of them | ||
| 104 | together, that has the effect of @kbd{Mouse-3}. If the mouse does have | ||
| 105 | 3 buttons, Emacs detects that at startup, and all the 3 buttons function | ||
| 106 | normally, as on X. | ||
| 107 | |||
| 108 | Help strings for menu-bar and pop-up menus are displayed in the echo | ||
| 109 | area when the mouse pointer moves across the menu items. | ||
| 110 | Highlighting of mouse-sensitive text (@pxref{Mouse References}) is also | ||
| 111 | supported. | ||
| 112 | |||
| 113 | @cindex mouse, set number of buttons | ||
| 114 | @findex msdos-set-mouse-buttons | ||
| 115 | Some versions of mouse drivers don't report the number of mouse | ||
| 116 | buttons correctly. For example, mice with a wheel report that they | ||
| 117 | have 3 buttons, but only 2 of them are passed to Emacs; the clicks on | ||
| 118 | the wheel, which serves as the middle button, are not passed. In | ||
| 119 | these cases, you can use the @kbd{M-x msdos-set-mouse-buttons} command | ||
| 120 | to tell Emacs how many mouse buttons to expect. You could make such a | ||
| 121 | setting permanent by adding this fragment to your @file{_emacs} init | ||
| 122 | file: | ||
| 123 | |||
| 124 | @example | ||
| 125 | ;; @r{Treat the mouse like a 2-button mouse.} | ||
| 126 | (msdos-set-mouse-buttons 2) | ||
| 127 | @end example | ||
| 128 | |||
| 129 | @cindex Windows clipboard support | ||
| 130 | Emacs built for MS-DOS supports clipboard operations when it runs on | ||
| 131 | Windows. Commands that put text on the kill ring, or yank text from the | ||
| 132 | ring, check the Windows clipboard first, just as Emacs does on the X | ||
| 133 | Window System (@pxref{Mouse Commands}). Only the primary selection and | ||
| 134 | the cut buffer are supported by MS-DOS Emacs on Windows; the secondary | ||
| 135 | selection always appears as empty. | ||
| 136 | |||
| 137 | Due to the way clipboard access is implemented by Windows, the | ||
| 138 | length of text you can put into the clipboard is limited by the amount | ||
| 139 | of free DOS memory that is available to Emacs. Usually, up to 620KB of | ||
| 140 | text can be put into the clipboard, but this limit depends on the system | ||
| 141 | configuration and is lower if you run Emacs as a subprocess of | ||
| 142 | another program. If the killed text does not fit, Emacs outputs a | ||
| 143 | message saying so, and does not put the text into the clipboard. | ||
| 144 | |||
| 145 | Null characters also cannot be put into the Windows clipboard. If the | ||
| 146 | killed text includes null characters, Emacs does not put such text into | ||
| 147 | the clipboard, and displays in the echo area a message to that effect. | ||
| 148 | |||
| 149 | @vindex dos-display-scancodes | ||
| 150 | The variable @code{dos-display-scancodes}, when non-@code{nil}, | ||
| 151 | directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of | ||
| 152 | each keystroke; this feature serves as a complement to the | ||
| 153 | @code{view-lossage} command, for debugging. | ||
| 154 | |||
| 155 | @node MS-DOS Display | ||
| 156 | @section Display on MS-DOS | ||
| 157 | @cindex faces under MS-DOS | ||
| 158 | @cindex fonts, emulating under MS-DOS | ||
| 159 | |||
| 160 | Display on MS-DOS cannot use font variants, like bold or italic, | ||
| 161 | but it does support | ||
| 162 | multiple faces, each of which can specify a foreground and a background | ||
| 163 | color. Therefore, you can get the full functionality of Emacs packages | ||
| 164 | that use fonts (such as @code{font-lock}, Enriched Text mode, and | ||
| 165 | others) by defining the relevant faces to use different colors. Use the | ||
| 166 | @code{list-colors-display} command (@pxref{Frame Parameters}) and the | ||
| 167 | @code{list-faces-display} command (@pxref{Faces}) to see what colors and | ||
| 168 | faces are available and what they look like. | ||
| 169 | |||
| 170 | @xref{MS-DOS and MULE}, later in this chapter, for information on | ||
| 171 | how Emacs displays glyphs and characters that aren't supported by the | ||
| 172 | native font built into the DOS display. | ||
| 173 | |||
| 174 | @cindex cursor shape on MS-DOS | ||
| 175 | When Emacs starts, it changes the cursor shape to a solid box. This | ||
| 176 | is for compatibility with other systems, where the box cursor is the | ||
| 177 | default in Emacs. This default shape can be changed to a bar by | ||
| 178 | specifying the @code{cursor-type} parameter in the variable | ||
| 179 | @code{default-frame-alist} (@pxref{Creating Frames}). The MS-DOS | ||
| 180 | terminal doesn't support a vertical-bar cursor, so the bar cursor is | ||
| 181 | horizontal, and the @code{@var{width}} parameter, if specified by the | ||
| 182 | frame parameters, actually determines its height. For this reason, | ||
| 183 | the @code{bar} and @code{hbar} cursor types produce the same effect on | ||
| 184 | MS-DOS. As an extension, the bar cursor specification can include the | ||
| 185 | starting scan line of the cursor as well as its width, like this: | ||
| 186 | |||
| 187 | @example | ||
| 188 | '(cursor-type bar @var{width} . @var{start}) | ||
| 189 | @end example | ||
| 190 | |||
| 191 | @noindent | ||
| 192 | In addition, if the @var{width} parameter is negative, the cursor bar | ||
| 193 | begins at the top of the character cell. | ||
| 194 | |||
| 195 | @cindex frames on MS-DOS | ||
| 196 | The MS-DOS terminal can only display a single frame at a time. The | ||
| 197 | Emacs frame facilities work on MS-DOS much as they do on text-only | ||
| 198 | terminals (@pxref{Frames}). When you run Emacs from a DOS window on | ||
| 199 | MS-Windows, you can make the visible frame smaller than the full | ||
| 200 | screen, but Emacs still cannot display more than a single frame at a | ||
| 201 | time. | ||
| 202 | |||
| 203 | @cindex frame size under MS-DOS | ||
| 204 | @findex mode4350 | ||
| 205 | @findex mode25 | ||
| 206 | The @code{mode4350} command switches the display to 43 or 50 | ||
| 207 | lines, depending on your hardware; the @code{mode25} command switches | ||
| 208 | to the default 80x25 screen size. | ||
| 209 | |||
| 210 | By default, Emacs only knows how to set screen sizes of 80 columns by | ||
| 211 | 25, 28, 35, 40, 43 or 50 rows. However, if your video adapter has | ||
| 212 | special video modes that will switch the display to other sizes, you can | ||
| 213 | have Emacs support those too. When you ask Emacs to switch the frame to | ||
| 214 | @var{n} rows by @var{m} columns dimensions, it checks if there is a | ||
| 215 | variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so, | ||
| 216 | uses its value (which must be an integer) as the video mode to switch | ||
| 217 | to. (Emacs switches to that video mode by calling the BIOS @code{Set | ||
| 218 | Video Mode} function with the value of | ||
| 219 | @code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.) | ||
| 220 | For example, suppose your adapter will switch to 66x80 dimensions when | ||
| 221 | put into video mode 85. Then you can make Emacs support this screen | ||
| 222 | size by putting the following into your @file{_emacs} file: | ||
| 223 | |||
| 224 | @example | ||
| 225 | (setq screen-dimensions-66x80 85) | ||
| 226 | @end example | ||
| 227 | |||
| 228 | Since Emacs on MS-DOS can only set the frame size to specific | ||
| 229 | supported dimensions, it cannot honor every possible frame resizing | ||
| 230 | request. When an unsupported size is requested, Emacs chooses the next | ||
| 231 | larger supported size beyond the specified size. For example, if you | ||
| 232 | ask for 36x80 frame, you will get 40x80 instead. | ||
| 233 | |||
| 234 | The variables @code{screen-dimensions-@var{n}x@var{m}} are used only | ||
| 235 | when they exactly match the specified size; the search for the next | ||
| 236 | larger supported size ignores them. In the above example, even if your | ||
| 237 | VGA supports 38x80 dimensions and you define a variable | ||
| 238 | @code{screen-dimensions-38x80} with a suitable value, you will still get | ||
| 239 | 40x80 screen when you ask for a 36x80 frame. If you want to get the | ||
| 240 | 38x80 size in this case, you can do it by setting the variable named | ||
| 241 | @code{screen-dimensions-36x80} with the same video mode value as | ||
| 242 | @code{screen-dimensions-38x80}. | ||
| 243 | |||
| 244 | Changing frame dimensions on MS-DOS has the effect of changing all the | ||
| 245 | other frames to the new dimensions. | ||
| 246 | |||
| 247 | @node MS-DOS File Names | ||
| 248 | @section File Names on MS-DOS | ||
| 249 | @cindex file names under MS-DOS | ||
| 250 | @cindex init file, default name under MS-DOS | ||
| 251 | |||
| 252 | MS-DOS normally uses a backslash, @samp{\}, to separate name units | ||
| 253 | within a file name, instead of the slash used on other systems. Emacs | ||
| 254 | on MS-DOS permits use of either slash or backslash, and also knows | ||
| 255 | about drive letters in file names. | ||
| 256 | |||
| 257 | On MS-DOS, file names are case-insensitive and limited to eight | ||
| 258 | characters, plus optionally a period and three more characters. Emacs | ||
| 259 | knows enough about these limitations to handle file names that were | ||
| 260 | meant for other operating systems. For instance, leading dots @samp{.} | ||
| 261 | in file names are invalid in MS-DOS, so Emacs transparently converts | ||
| 262 | them to underscores @samp{_}; thus your default init file (@pxref{Init | ||
| 263 | File}) is called @file{_emacs} on MS-DOS. Excess characters before or | ||
| 264 | after the period are generally ignored by MS-DOS itself; thus, if you | ||
| 265 | visit the file @file{LongFileName.EvenLongerExtension}, you will | ||
| 266 | silently get @file{longfile.eve}, but Emacs will still display the long | ||
| 267 | file name on the mode line. Other than that, it's up to you to specify | ||
| 268 | file names which are valid under MS-DOS; the transparent conversion as | ||
| 269 | described above only works on file names built into Emacs. | ||
| 270 | |||
| 271 | @cindex backup file names on MS-DOS | ||
| 272 | The above restrictions on the file names on MS-DOS make it almost | ||
| 273 | impossible to construct the name of a backup file (@pxref{Backup | ||
| 274 | Names}) without losing some of the original file name characters. For | ||
| 275 | example, the name of a backup file for @file{docs.txt} is | ||
| 276 | @file{docs.tx~} even if single backup is used. | ||
| 277 | |||
| 278 | @cindex file names under Windows 95/NT | ||
| 279 | @cindex long file names in DOS box under Windows 95/NT | ||
| 280 | If you run Emacs as a DOS application under Windows 9X, Windows ME, or | ||
| 281 | Windows 2000, you can turn on support for long file names. If you do | ||
| 282 | that, Emacs doesn't truncate file names or convert them to lower case; | ||
| 283 | instead, it uses the file names that you specify, verbatim. To enable | ||
| 284 | long file name support, set the environment variable @env{LFN} to | ||
| 285 | @samp{y} before starting Emacs. Unfortunately, Windows NT doesn't allow | ||
| 286 | DOS programs to access long file names, so Emacs built for MS-DOS will | ||
| 287 | only see their short 8+3 aliases. | ||
| 288 | |||
| 289 | @cindex @env{HOME} directory under MS-DOS | ||
| 290 | MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends | ||
| 291 | that the directory where it is installed is the value of the @env{HOME} | ||
| 292 | environment variable. That is, if your Emacs binary, | ||
| 293 | @file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then | ||
| 294 | Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In | ||
| 295 | particular, that is where Emacs looks for the init file @file{_emacs}. | ||
| 296 | With this in mind, you can use @samp{~} in file names as an alias for | ||
| 297 | the home directory, as you would on GNU or Unix. You can also set | ||
| 298 | @env{HOME} variable in the environment before starting Emacs; its | ||
| 299 | value will then override the above default behavior. | ||
| 300 | |||
| 301 | Emacs on MS-DOS handles the directory name @file{/dev} specially, | ||
| 302 | because of a feature in the emulator libraries of DJGPP that pretends | ||
| 303 | I/O devices have names in that directory. We recommend that you avoid | ||
| 304 | using an actual directory named @file{/dev} on any disk. | ||
| 305 | |||
| 306 | @node Text and Binary | 27 | @node Text and Binary |
| 307 | @section Text Files and Binary Files | 28 | @section Text Files and Binary Files |
| 308 | @cindex text and binary files on MS-DOS/MS-Windows | 29 | @cindex text and binary files on MS-DOS/MS-Windows |
| @@ -419,379 +140,6 @@ always writes those files with DOS-style EOLs. | |||
| 419 | the file-name patterns in @code{file-name-buffer-file-type-alist}, the | 140 | the file-name patterns in @code{file-name-buffer-file-type-alist}, the |
| 420 | EOL conversion is determined by @code{file-name-buffer-file-type-alist}. | 141 | EOL conversion is determined by @code{file-name-buffer-file-type-alist}. |
| 421 | 142 | ||
| 422 | @node MS-DOS Printing | ||
| 423 | @section Printing and MS-DOS | ||
| 424 | |||
| 425 | Printing commands, such as @code{lpr-buffer} (@pxref{Printing}) and | ||
| 426 | @code{ps-print-buffer} (@pxref{PostScript}) can work in MS-DOS and | ||
| 427 | MS-Windows by sending the output to one of the printer ports, if a | ||
| 428 | Posix-style @code{lpr} program is unavailable. The same Emacs | ||
| 429 | variables control printing on all systems, but in some cases they have | ||
| 430 | different default values on MS-DOS and MS-Windows. | ||
| 431 | |||
| 432 | @vindex printer-name @r{(MS-DOS)} | ||
| 433 | If you want to use your local printer, printing on it in the usual DOS | ||
| 434 | manner, then set the Lisp variable @code{lpr-command} to @code{""} (its | ||
| 435 | default value) and @code{printer-name} to the name of the printer | ||
| 436 | port---for example, @code{"PRN"}, the usual local printer port (that's | ||
| 437 | the default), or @code{"LPT2"}, or @code{"COM1"} for a serial printer. | ||
| 438 | You can also set @code{printer-name} to a file name, in which case | ||
| 439 | ``printed'' output is actually appended to that file. If you set | ||
| 440 | @code{printer-name} to @code{"NUL"}, printed output is silently | ||
| 441 | discarded (sent to the system null device). | ||
| 442 | |||
| 443 | On MS-Windows, when the Windows network software is installed, you can | ||
| 444 | also use a printer shared by another machine by setting | ||
| 445 | @code{printer-name} to the UNC share name for that printer---for example, | ||
| 446 | @code{"//joes_pc/hp4si"}. (It doesn't matter whether you use forward | ||
| 447 | slashes or backslashes here.) To find out the names of shared printers, | ||
| 448 | run the command @samp{net view} at a DOS command prompt to obtain a list | ||
| 449 | of servers, and @samp{net view @var{server-name}} to see the names of printers | ||
| 450 | (and directories) shared by that server. Alternatively, click the | ||
| 451 | @samp{Network Neighborhood} icon on your desktop, and look for machines | ||
| 452 | which share their printers via the network. | ||
| 453 | |||
| 454 | @cindex @samp{net use}, and printing on MS-Windows | ||
| 455 | @cindex networked printers (MS-Windows) | ||
| 456 | If the printer doesn't appear in the output of @samp{net view}, or | ||
| 457 | if setting @code{printer-name} to the UNC share name doesn't produce a | ||
| 458 | hardcopy on that printer, you can use the @samp{net use} command to | ||
| 459 | connect a local print port such as @code{"LPT2"} to the networked | ||
| 460 | printer. For example, typing @kbd{net use LPT2: | ||
| 461 | \\joes_pc\hp4si}@footnote{ | ||
| 462 | Note that the @samp{net use} command requires the UNC share name to be | ||
| 463 | typed with the Windows-style backslashes, while the value of | ||
| 464 | @code{printer-name} can be set with either forward- or backslashes.} | ||
| 465 | causes Windows to @dfn{capture} the LPT2 port and redirect the printed | ||
| 466 | material to the printer connected to the machine @code{joes_pc}. | ||
| 467 | After this command, setting @code{printer-name} to @code{"LPT2"} | ||
| 468 | should produce the hardcopy on the networked printer. | ||
| 469 | |||
| 470 | With some varieties of Windows network software, you can instruct | ||
| 471 | Windows to capture a specific printer port such as @code{"LPT2"}, and | ||
| 472 | redirect it to a networked printer via the @w{@code{Control | ||
| 473 | Panel->Printers}} applet instead of @samp{net use}. | ||
| 474 | |||
| 475 | Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even | ||
| 476 | though they are connected to a Windows machine which uses a different | ||
| 477 | encoding for the same locale. For example, in the Latin-1 locale, DOS | ||
| 478 | uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and | ||
| 479 | MULE}. When you print to such printers from Windows, you can use the | ||
| 480 | @kbd{C-x RET c} (@code{universal-coding-system-argument}) command before | ||
| 481 | @kbd{M-x lpr-buffer}; Emacs will then convert the text to the DOS | ||
| 482 | codepage that you specify. For example, @kbd{C-x RET c cp850-dos RET | ||
| 483 | M-x lpr-region RET} will print the region while converting it to the | ||
| 484 | codepage 850 encoding. You may need to create the @code{cp@var{nnn}} | ||
| 485 | coding system with @kbd{M-x codepage-setup}. | ||
| 486 | |||
| 487 | If you set @code{printer-name} to a file name, it's best to use an | ||
| 488 | absolute file name. Emacs changes the working directory according to | ||
| 489 | the default directory of the current buffer, so if the file name in | ||
| 490 | @code{printer-name} is relative, you will end up with several such | ||
| 491 | files, each one in the directory of the buffer from which the printing | ||
| 492 | was done. | ||
| 493 | |||
| 494 | @findex print-buffer @r{(MS-DOS)} | ||
| 495 | @findex print-region @r{(MS-DOS)} | ||
| 496 | @vindex lpr-headers-switches @r{(MS-DOS)} | ||
| 497 | The commands @code{print-buffer} and @code{print-region} call the | ||
| 498 | @code{pr} program, or use special switches to the @code{lpr} program, to | ||
| 499 | produce headers on each printed page. MS-DOS and MS-Windows don't | ||
| 500 | normally have these programs, so by default, the variable | ||
| 501 | @code{lpr-headers-switches} is set so that the requests to print page | ||
| 502 | headers are silently ignored. Thus, @code{print-buffer} and | ||
| 503 | @code{print-region} produce the same output as @code{lpr-buffer} and | ||
| 504 | @code{lpr-region}, respectively. If you do have a suitable @code{pr} | ||
| 505 | program (for example, from GNU Textutils), set | ||
| 506 | @code{lpr-headers-switches} to @code{nil}; Emacs will then call | ||
| 507 | @code{pr} to produce the page headers, and print the resulting output as | ||
| 508 | specified by @code{printer-name}. | ||
| 509 | |||
| 510 | @vindex print-region-function @r{(MS-DOS)} | ||
| 511 | @cindex lpr usage under MS-DOS | ||
| 512 | @vindex lpr-command @r{(MS-DOS)} | ||
| 513 | @vindex lpr-switches @r{(MS-DOS)} | ||
| 514 | Finally, if you do have an @code{lpr} work-alike, you can set the | ||
| 515 | variable @code{lpr-command} to @code{"lpr"}. Then Emacs will use | ||
| 516 | @code{lpr} for printing, as on other systems. (If the name of the | ||
| 517 | program isn't @code{lpr}, set @code{lpr-command} to specify where to | ||
| 518 | find it.) The variable @code{lpr-switches} has its standard meaning | ||
| 519 | when @code{lpr-command} is not @code{""}. If the variable | ||
| 520 | @code{printer-name} has a string value, it is used as the value for the | ||
| 521 | @code{-P} option to @code{lpr}, as on Unix. | ||
| 522 | |||
| 523 | @findex ps-print-buffer @r{(MS-DOS)} | ||
| 524 | @findex ps-spool-buffer @r{(MS-DOS)} | ||
| 525 | @vindex ps-printer-name @r{(MS-DOS)} | ||
| 526 | @vindex ps-lpr-command @r{(MS-DOS)} | ||
| 527 | @vindex ps-lpr-switches @r{(MS-DOS)} | ||
| 528 | A parallel set of variables, @code{ps-lpr-command}, | ||
| 529 | @code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{PostScript | ||
| 530 | Variables}), defines how PostScript files should be printed. These | ||
| 531 | variables are used in the same way as the corresponding variables | ||
| 532 | described above for non-PostScript printing. Thus, the value of | ||
| 533 | @code{ps-printer-name} is used as the name of the device (or file) to | ||
| 534 | which PostScript output is sent, just as @code{printer-name} is used for | ||
| 535 | non-PostScript printing. (There are two distinct sets of variables in | ||
| 536 | case you have two printers attached to two different ports, and only one | ||
| 537 | of them is a PostScript printer.) | ||
| 538 | |||
| 539 | The default value of the variable @code{ps-lpr-command} is @code{""}, | ||
| 540 | which causes PostScript output to be sent to the printer port specified | ||
| 541 | by @code{ps-printer-name}, but @code{ps-lpr-command} can also be set to | ||
| 542 | the name of a program which will accept PostScript files. Thus, if you | ||
| 543 | have a non-PostScript printer, you can set this variable to the name of | ||
| 544 | a PostScript interpreter program (such as Ghostscript). Any switches | ||
| 545 | that need to be passed to the interpreter program are specified using | ||
| 546 | @code{ps-lpr-switches}. (If the value of @code{ps-printer-name} is a | ||
| 547 | string, it will be added to the list of switches as the value for the | ||
| 548 | @code{-P} option. This is probably only useful if you are using | ||
| 549 | @code{lpr}, so when using an interpreter typically you would set | ||
| 550 | @code{ps-printer-name} to something other than a string so it is | ||
| 551 | ignored.) | ||
| 552 | |||
| 553 | For example, to use Ghostscript for printing on an Epson printer | ||
| 554 | connected to the @samp{LPT2} port, put this in your @file{_emacs} file: | ||
| 555 | |||
| 556 | @example | ||
| 557 | (setq ps-printer-name t) ; Ghostscript doesn't understand -P | ||
| 558 | (setq ps-lpr-command "c:/gs/gs386") | ||
| 559 | (setq ps-lpr-switches '("-q" "-dNOPAUSE" | ||
| 560 | "-sDEVICE=epson" | ||
| 561 | "-r240x72" | ||
| 562 | "-sOutputFile=LPT2" | ||
| 563 | "-Ic:/gs")) | ||
| 564 | @end example | ||
| 565 | |||
| 566 | @noindent | ||
| 567 | (This assumes that Ghostscript is installed in the @file{"c:/gs"} | ||
| 568 | directory.) | ||
| 569 | |||
| 570 | @vindex dos-printer | ||
| 571 | @vindex dos-ps-printer | ||
| 572 | For backwards compatibility, the value of @code{dos-printer} | ||
| 573 | (@code{dos-ps-printer}), if it has a value, overrides the value of | ||
| 574 | @code{printer-name} (@code{ps-printer-name}), on MS-DOS and MS-Windows | ||
| 575 | only. | ||
| 576 | |||
| 577 | |||
| 578 | @node MS-DOS and MULE | ||
| 579 | @section International Support on MS-DOS | ||
| 580 | @cindex international support @r{(MS-DOS)} | ||
| 581 | |||
| 582 | Emacs on MS-DOS supports the same international character sets as it | ||
| 583 | does on GNU, Unix and other platforms (@pxref{International}), including | ||
| 584 | coding systems for converting between the different character sets. | ||
| 585 | However, due to incompatibilities between MS-DOS/MS-Windows and other systems, | ||
| 586 | there are several DOS-specific aspects of this support that you should | ||
| 587 | be aware of. This section describes these aspects. | ||
| 588 | |||
| 589 | The description below is largely specific to the MS-DOS port of | ||
| 590 | Emacs, especially where it talks about practical implications for | ||
| 591 | Emacs users. For other operating systems, see the @file{code-pages.el} | ||
| 592 | package, which implements support for MS-DOS- and MS-Windows-specific | ||
| 593 | encodings for all platforms other than MS-DOS. | ||
| 594 | |||
| 595 | @table @kbd | ||
| 596 | @item M-x dos-codepage-setup | ||
| 597 | Set up Emacs display and coding systems as appropriate for the current | ||
| 598 | DOS codepage. | ||
| 599 | |||
| 600 | @item M-x codepage-setup | ||
| 601 | Create a coding system for a certain DOS codepage. | ||
| 602 | @end table | ||
| 603 | |||
| 604 | @cindex codepage, MS-DOS | ||
| 605 | @cindex DOS codepages | ||
| 606 | MS-DOS is designed to support one character set of 256 characters at | ||
| 607 | any given time, but gives you a variety of character sets to choose | ||
| 608 | from. The alternative character sets are known as @dfn{DOS codepages}. | ||
| 609 | Each codepage includes all 128 @acronym{ASCII} characters, but the other 128 | ||
| 610 | characters (codes 128 through 255) vary from one codepage to another. | ||
| 611 | Each DOS codepage is identified by a 3-digit number, such as 850, 862, | ||
| 612 | etc. | ||
| 613 | |||
| 614 | In contrast to X, which lets you use several fonts at the same time, | ||
| 615 | MS-DOS normally doesn't allow use of several codepages in a single | ||
| 616 | session. MS-DOS was designed to load a single codepage at system | ||
| 617 | startup, and require you to reboot in order to change | ||
| 618 | it@footnote{Normally, one particular codepage is burnt into the | ||
| 619 | display memory, while other codepages can be installed by modifying | ||
| 620 | system configuration files, such as @file{CONFIG.SYS}, and rebooting. | ||
| 621 | While there is third-party software that allows changing the codepage | ||
| 622 | without rebooting, we describe here how a stock MS-DOS system | ||
| 623 | behaves.}. Much the same limitation applies when you run DOS | ||
| 624 | executables on other systems such as MS-Windows. | ||
| 625 | |||
| 626 | @cindex unibyte operation @r{(MS-DOS)} | ||
| 627 | If you invoke Emacs on MS-DOS with the @samp{--unibyte} option | ||
| 628 | (@pxref{Initial Options}), Emacs does not perform any conversion of | ||
| 629 | non-@acronym{ASCII} characters. Instead, it reads and writes any non-@acronym{ASCII} | ||
| 630 | characters verbatim, and sends their 8-bit codes to the display | ||
| 631 | verbatim. Thus, unibyte Emacs on MS-DOS supports the current codepage, | ||
| 632 | whatever it may be, but cannot even represent any other characters. | ||
| 633 | |||
| 634 | @vindex dos-codepage | ||
| 635 | For multibyte operation on MS-DOS, Emacs needs to know which | ||
| 636 | characters the chosen DOS codepage can display. So it queries the | ||
| 637 | system shortly after startup to get the chosen codepage number, and | ||
| 638 | stores the number in the variable @code{dos-codepage}. Some systems | ||
| 639 | return the default value 437 for the current codepage, even though the | ||
| 640 | actual codepage is different. (This typically happens when you use the | ||
| 641 | codepage built into the display hardware.) You can specify a different | ||
| 642 | codepage for Emacs to use by setting the variable @code{dos-codepage} in | ||
| 643 | your init file. | ||
| 644 | |||
| 645 | @cindex language environment, automatic selection on @r{MS-DOS} | ||
| 646 | Multibyte Emacs supports only certain DOS codepages: those which can | ||
| 647 | display Far-Eastern scripts, like the Japanese codepage 932, and those | ||
| 648 | that encode a single ISO 8859 character set. | ||
| 649 | |||
| 650 | The Far-Eastern codepages can directly display one of the MULE | ||
| 651 | character sets for these countries, so Emacs simply sets up to use the | ||
| 652 | appropriate terminal coding system that is supported by the codepage. | ||
| 653 | The special features described in the rest of this section mostly | ||
| 654 | pertain to codepages that encode ISO 8859 character sets. | ||
| 655 | |||
| 656 | For the codepages which correspond to one of the ISO character sets, | ||
| 657 | Emacs knows the character set name based on the codepage number. Emacs | ||
| 658 | automatically creates a coding system to support reading and writing | ||
| 659 | files that use the current codepage, and uses this coding system by | ||
| 660 | default. The name of this coding system is @code{cp@var{nnn}}, where | ||
| 661 | @var{nnn} is the codepage number.@footnote{The standard Emacs coding | ||
| 662 | systems for ISO 8859 are not quite right for the purpose, because | ||
| 663 | typically the DOS codepage does not match the standard ISO character | ||
| 664 | codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has | ||
| 665 | code 231 in the standard Latin-1 character set, but the corresponding | ||
| 666 | DOS codepage 850 uses code 135 for this glyph.} | ||
| 667 | |||
| 668 | @cindex mode line @r{(MS-DOS)} | ||
| 669 | All the @code{cp@var{nnn}} coding systems use the letter @samp{D} (for | ||
| 670 | ``DOS'') as their mode-line mnemonic. Since both the terminal coding | ||
| 671 | system and the default coding system for file I/O are set to the proper | ||
| 672 | @code{cp@var{nnn}} coding system at startup, it is normal for the mode | ||
| 673 | line on MS-DOS to begin with @samp{-DD\-}. @xref{Mode Line}. | ||
| 674 | Far-Eastern DOS terminals do not use the @code{cp@var{nnn}} coding | ||
| 675 | systems, and thus their initial mode line looks like the Emacs default. | ||
| 676 | |||
| 677 | Since the codepage number also indicates which script you are using, | ||
| 678 | Emacs automatically runs @code{set-language-environment} to select the | ||
| 679 | language environment for that script (@pxref{Language Environments}). | ||
| 680 | |||
| 681 | If a buffer contains a character belonging to some other ISO 8859 | ||
| 682 | character set, not the one that the chosen DOS codepage supports, Emacs | ||
| 683 | displays it using a sequence of @acronym{ASCII} characters. For example, if the | ||
| 684 | current codepage doesn't have a glyph for the letter @samp{@`o} (small | ||
| 685 | @samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where | ||
| 686 | the braces serve as a visual indication that this is a single character. | ||
| 687 | (This may look awkward for some non-Latin characters, such as those from | ||
| 688 | Greek or Hebrew alphabets, but it is still readable by a person who | ||
| 689 | knows the language.) Even though the character may occupy several | ||
| 690 | columns on the screen, it is really still just a single character, and | ||
| 691 | all Emacs commands treat it as one. | ||
| 692 | |||
| 693 | @cindex IBM graphics characters (MS-DOS) | ||
| 694 | @cindex box-drawing characters (MS-DOS) | ||
| 695 | @cindex line-drawing characters (MS-DOS) | ||
| 696 | Not all characters in DOS codepages correspond to ISO 8859 | ||
| 697 | characters---some are used for other purposes, such as box-drawing | ||
| 698 | characters and other graphics. Emacs maps these characters to two | ||
| 699 | special character sets called @code{eight-bit-control} and | ||
| 700 | @code{eight-bit-graphic}, and displays them as their IBM glyphs. | ||
| 701 | However, you should be aware that other systems might display these | ||
| 702 | characters differently, so you should avoid them in text that might be | ||
| 703 | copied to a different operating system, or even to another DOS machine | ||
| 704 | that uses a different codepage. | ||
| 705 | |||
| 706 | @vindex dos-unsupported-character-glyph | ||
| 707 | Emacs supports many other characters sets aside from ISO 8859, but it | ||
| 708 | cannot display them on MS-DOS. So if one of these multibyte characters | ||
| 709 | appears in a buffer, Emacs on MS-DOS displays them as specified by the | ||
| 710 | @code{dos-unsupported-character-glyph} variable; by default, this glyph | ||
| 711 | is an empty triangle. Use the @kbd{C-u C-x =} command to display the | ||
| 712 | actual code and character set of such characters. @xref{Position Info}. | ||
| 713 | |||
| 714 | @findex codepage-setup | ||
| 715 | By default, Emacs defines a coding system to support the current | ||
| 716 | codepage. To define a coding system for some other codepage (e.g., to | ||
| 717 | visit a file written on a DOS machine in another country), use the | ||
| 718 | @kbd{M-x codepage-setup} command. It prompts for the 3-digit code of | ||
| 719 | the codepage, with completion, then creates the coding system for the | ||
| 720 | specified codepage. You can then use the new coding system to read and | ||
| 721 | write files, but you must specify it explicitly for the file command | ||
| 722 | when you want to use it (@pxref{Text Coding}). | ||
| 723 | |||
| 724 | These coding systems are also useful for visiting a file encoded using | ||
| 725 | a DOS codepage, using Emacs running on some other operating system. | ||
| 726 | |||
| 727 | @cindex MS-Windows codepages | ||
| 728 | MS-Windows provides its own codepages, which are different from the | ||
| 729 | DOS codepages for the same locale. For example, DOS codepage 850 | ||
| 730 | supports the same character set as Windows codepage 1252; DOS codepage | ||
| 731 | 855 supports the same character set as Windows codepage 1251, etc. | ||
| 732 | The MS-Windows version of Emacs uses the current codepage for display | ||
| 733 | when invoked with the @samp{-nw} option. Support for codepages in the | ||
| 734 | Windows port of Emacs is part of the @file{code-pages.el} package. | ||
| 735 | |||
| 736 | @node MS-DOS Processes | ||
| 737 | @section Subprocesses on MS-DOS | ||
| 738 | |||
| 739 | @cindex compilation under MS-DOS | ||
| 740 | @cindex inferior processes under MS-DOS | ||
| 741 | @findex compile @r{(MS-DOS)} | ||
| 742 | @findex grep @r{(MS-DOS)} | ||
| 743 | Because MS-DOS is a single-process ``operating system,'' | ||
| 744 | asynchronous subprocesses are not available. In particular, Shell | ||
| 745 | mode and its variants do not work. Most Emacs features that use | ||
| 746 | asynchronous subprocesses also don't work on MS-DOS, including | ||
| 747 | Shell mode and GUD. When in doubt, try and see; commands that | ||
| 748 | don't work output an error message saying that asynchronous processes | ||
| 749 | aren't supported. | ||
| 750 | |||
| 751 | Compilation under Emacs with @kbd{M-x compile}, searching files with | ||
| 752 | @kbd{M-x grep} and displaying differences between files with @kbd{M-x | ||
| 753 | diff} do work, by running the inferior processes synchronously. This | ||
| 754 | means you cannot do any more editing until the inferior process | ||
| 755 | finishes. | ||
| 756 | |||
| 757 | Spell checking also works, by means of special support for synchronous | ||
| 758 | invocation of the @code{ispell} program. This is slower than the | ||
| 759 | asynchronous invocation on other platforms | ||
| 760 | |||
| 761 | Instead of the Shell mode, which doesn't work on MS-DOS, you can use | ||
| 762 | the @kbd{M-x eshell} command. This invokes the Eshell package that | ||
| 763 | implements a Posix-like shell entirely in Emacs Lisp. | ||
| 764 | |||
| 765 | By contrast, Emacs compiled as a native Windows application | ||
| 766 | @strong{does} support asynchronous subprocesses. @xref{Windows | ||
| 767 | Processes}. | ||
| 768 | |||
| 769 | @cindex printing under MS-DOS | ||
| 770 | Printing commands, such as @code{lpr-buffer} (@pxref{Printing}) and | ||
| 771 | @code{ps-print-buffer} (@pxref{PostScript}), work in MS-DOS by sending | ||
| 772 | the output to one of the printer ports. @xref{MS-DOS Printing}. | ||
| 773 | |||
| 774 | When you run a subprocess synchronously on MS-DOS, make sure the | ||
| 775 | program terminates and does not try to read keyboard input. If the | ||
| 776 | program does not terminate on its own, you will be unable to terminate | ||
| 777 | it, because MS-DOS provides no general way to terminate a process. | ||
| 778 | Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these | ||
| 779 | cases. | ||
| 780 | |||
| 781 | Accessing files on other machines is not supported on MS-DOS. Other | ||
| 782 | network-oriented commands such as sending mail, Web browsing, remote | ||
| 783 | login, etc., don't work either, unless network access is built into | ||
| 784 | MS-DOS with some network redirector. | ||
| 785 | |||
| 786 | @cindex directory listing on MS-DOS | ||
| 787 | @vindex dired-listing-switches @r{(MS-DOS)} | ||
| 788 | Dired on MS-DOS uses the @code{ls-lisp} package where other | ||
| 789 | platforms use the system @code{ls} command. Therefore, Dired on | ||
| 790 | MS-DOS supports only some of the possible options you can mention in | ||
| 791 | the @code{dired-listing-switches} variable. The options that work are | ||
| 792 | @samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S}, | ||
| 793 | @samp{-s}, @samp{-t}, and @samp{-u}. | ||
| 794 | |||
| 795 | @node Windows Processes | 143 | @node Windows Processes |
| 796 | @section Subprocesses on Windows 9X/ME and Windows NT/2K | 144 | @section Subprocesses on Windows 9X/ME and Windows NT/2K |
| 797 | 145 | ||
diff --git a/man/mule.texi b/man/mule.texi index 4b63fb90d4e..91c5aaaf47e 100644 --- a/man/mule.texi +++ b/man/mule.texi | |||
| @@ -605,7 +605,7 @@ system; for example, to visit a file encoded in codepage 850, type | |||
| 605 | @key{RET}}@footnote{ | 605 | @key{RET}}@footnote{ |
| 606 | In the MS-DOS port of Emacs, you need to create a @code{cp@var{nnn}} | 606 | In the MS-DOS port of Emacs, you need to create a @code{cp@var{nnn}} |
| 607 | coding system with @kbd{M-x codepage-setup}, before you can use it. | 607 | coding system with @kbd{M-x codepage-setup}, before you can use it. |
| 608 | @xref{MS-DOS and MULE}.}. | 608 | @xref{MS-DOS and MULE,,,emacs-extra,Specialized Emacs Features}.}. |
| 609 | 609 | ||
| 610 | In addition to converting various representations of non-@acronym{ASCII} | 610 | In addition to converting various representations of non-@acronym{ASCII} |
| 611 | characters, a coding system can perform end-of-line conversion. Emacs | 611 | characters, a coding system can perform end-of-line conversion. Emacs |
diff --git a/man/trouble.texi b/man/trouble.texi index 6298e24805a..f44862598c4 100644 --- a/man/trouble.texi +++ b/man/trouble.texi | |||
| @@ -58,7 +58,8 @@ Search}). | |||
| 58 | like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to | 58 | like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to |
| 59 | recognize @kbd{C-g} while a command is running, between interactions | 59 | recognize @kbd{C-g} while a command is running, between interactions |
| 60 | with the user. By contrast, it @emph{is} feasible to recognize | 60 | with the user. By contrast, it @emph{is} feasible to recognize |
| 61 | @kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Keyboard}. | 61 | @kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Keyboard,,,emacs-xtra, |
| 62 | Specialized Emacs Features}. | ||
| 62 | 63 | ||
| 63 | @findex keyboard-quit | 64 | @findex keyboard-quit |
| 64 | @kbd{C-g} works by setting the variable @code{quit-flag} to @code{t} | 65 | @kbd{C-g} works by setting the variable @code{quit-flag} to @code{t} |