aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Innes1999-01-17 19:06:41 +0000
committerAndrew Innes1999-01-17 19:06:41 +0000
commitca2565b0593d54f958c3737740643b619b0259bc (patch)
tree4556e1802b0575c4da34606666592996ba46b487
parent6714412bd4dc5edfa76d2bcf4ad9fca5dcd52742 (diff)
downloademacs-ca2565b0593d54f958c3737740643b619b0259bc.tar.gz
emacs-ca2565b0593d54f958c3737740643b619b0259bc.zip
Initial revision
-rw-r--r--man/msdog.texi674
1 files changed, 674 insertions, 0 deletions
diff --git a/man/msdog.texi b/man/msdog.texi
new file mode 100644
index 00000000000..624e9b3d791
--- /dev/null
+++ b/man/msdog.texi
@@ -0,0 +1,674 @@
1@c This is part of the Emacs manual.
2@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
3@c See file emacs.texi for copying conditions.
4@node MS-DOS, Manifesto, Antinews, Top
5@appendix Emacs and MS-DOS
6@cindex MS-DOG
7@cindex MS-DOS peculiarities
8
9 This section briefly describes the peculiarities of using Emacs under
10the MS-DOS ``operating system'' (also known as ``MS-DOG''). If you
11build Emacs for MS-DOS, the binary will also run on Windows 3.X, Windows
12NT, Windows 9X, or OS/2 as a DOS application; the information in this
13chapter applies for all of those systems, if you use an Emacs that was
14built for MS-DOS.
15
16 Note that it is possible to build Emacs specifically for Windows NT or
17Windows 9X. If you do that, most of this chapter does not apply;
18instead, you get behavior much closer to what is documented in the rest
19of the manual, including support for long file names, multiple frames,
20scroll bars, mouse menus, and subprocesses. However, the section on
21text files and binary files does still apply. There are also two
22sections at the end of this chapter which apply specifically for Windows
23NT and 9X.
24
25@menu
26* Input: MS-DOS Input. Keyboard and mouse usage on MS-DOS.
27* Display: MS-DOS Display. Fonts, frames and display size on MS-DOS.
28* Files: MS-DOS File Names. File name conventions on MS-DOS.
29* Text and Binary:: Text files on MS-DOS use CRLF to separate lines.
30* Printing: MS-DOS Printing. How to specify the printer on MS-DOS.
31* I18N: MS-DOS and MULE. Support for internationalization on MS-DOS.
32* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.
33* Windows Processes:: Running subprocesses on Windows.
34* Windows System Menu:: Controlling what the ALT key does.
35@end menu
36
37@node MS-DOS Input
38@section Keyboard and Mouse on MS-DOS
39
40@cindex Meta (under MS-DOS)
41@cindex Hyper (under MS-DOS)
42@cindex Super (under MS-DOS)
43@vindex dos-super-key
44@vindex dos-hyper-key
45 The PC keyboard maps use the left @key{ALT} key as the @key{META} key.
46You have two choices for emulating the @key{SUPER} and @key{HYPER} keys:
47choose either the right @key{CTRL} key or the right @key{ALT} key by
48setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1
49or 2 respectively. If neither @code{dos-super-key} nor
50@code{dos-hyper-key} is 1, then by default the right @key{ALT} key is
51also mapped to the @key{META} key. However, if the MS-DOS international
52keyboard support program @file{KEYB.COM} is installed, Emacs will
53@emph{not} map the right @key{ALT} to @key{META}, since it is used for
54accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard
55layouts; in this case, you may only use the left @key{ALT} as @key{META}
56key.
57
58@kindex C-j @r{(MS-DOS)}
59@vindex dos-keypad-mode
60 The variable @code{dos-keypad-mode} is a flag variable that controls
61what key codes are returned by keys in the numeric keypad. You can also
62define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the
63following line into your @file{_emacs} file:
64
65@smallexample
66;; Make the Enter key from the Numeric keypad act as C-j.
67(define-key function-key-map [kp-enter] [?\C-j])
68@end smallexample
69
70@kindex DEL @r{(MS-DOS)}
71@kindex BS @r{(MS-DOS)}
72 The key that is called @key{DEL} in Emacs (because that's how it is
73designated on most workstations) is known as @key{BS} (backspace) on a
74PC. That is why the PC-specific terminal initialization remaps the
75@key{BS} key to act as @key{DEL}; the @key{DEL} key is remapped to act
76as @kbd{C-d} for the same reasons.
77
78@kindex C-g @r{(MS-DOS)}
79@kindex C-BREAK @r{(MS-DOS)}
80@cindex quitting on MS-DOS
81 Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit
82character, just like @kbd{C-g}. This is because Emacs cannot detect
83that you have typed @kbd{C-g} until it is ready for more input. As a
84consequence, you cannot use @kbd{C-g} to stop a running command
85(@pxref{Quitting}). By contrast, @kbd{C-@key{BREAK}} @emph{is} detected
86as soon as you type it (as @kbd{C-g} is on other systems), so it can be
87used to stop a running command and for emergency escape
88(@pxref{Emergency Escape}).
89
90@cindex mouse support under MS-DOS
91 Emacs on MS-DOS supports a mouse (on the default terminal only).
92The mouse commands work as documented, including those that use menus
93and the menu bar (@pxref{Menu Bar}). Scroll bars don't work in
94MS-DOS Emacs. PC mice usually have only two buttons; these act as
95@kbd{Mouse-1} and @kbd{Mouse-2}, but if you press both of them
96together, that has the effect of @kbd{Mouse-3}.
97
98@cindex Windows clipboard support
99 Emacs built for MS-DOS supports clipboard operations when it runs on
100Windows. Commands that put text on the kill ring, or yank text from the
101ring, check the Windows clipboard first, just as Emacs does on X Windows
102(@pxref{Mouse Commands}). Only the primary selection and the cut buffer
103are supported by MS-DOS Emacs on Windows; the secondary selection always
104appears as empty.
105
106 Due to the way clipboard access is implemented by Windows, the
107length of text you can put into the clipboard is limited by the amount
108of free DOS memory that is available to Emacs. Usually, up to 620KB of
109text can be put into the clipboard, but this limit depends on the system
110configuration and is lower if you run Emacs as a subprocess of
111another program. If the killed text does not fit, Emacs prints a
112message saying so, and does not put the text into the clipboard.
113
114 Null characters also cannot be put into the Windows clipboard. If the
115killed text includes null characters, Emacs does not put such text into
116the clipboard, and prints in the echo area a message to that effect.
117
118@vindex dos-display-scancodes
119 The variable @code{dos-display-scancodes}, when non-@code{nil},
120directs Emacs to display the ASCII value and the keyboard scan code of
121each keystroke; this feature serves as a complement to the
122@code{view-lossage} command, for debugging.
123
124@node MS-DOS Display
125@section Display on MS-DOS
126@cindex faces under MS-DOS
127@cindex fonts, emulating under MS-DOS
128
129 Display on MS-DOS cannot use font variants, like bold or italic,
130but it does support
131multiple faces, each of which can specify a foreground and a background
132color. Therefore, you can get the full functionality of Emacs packages
133that use fonts (such as @code{font-lock}, Enriched Text mode, and
134others) by defining the relevant faces to use different colors. Use the
135@code{list-colors-display} command (@pxref{Frame Parameters}) and the
136@code{list-faces-display} command (@pxref{Faces}) to see what colors and
137faces are available and what they look like.
138
139 The section @ref{MS-DOS and MULE}, later in this chapter, describes
140how Emacs displays glyphs and characters which aren't supported by the
141native font built into the DOS display.
142
143@cindex frames on MS-DOS
144 Multiple frames (@pxref{Frames}) are supported on MS-DOS, but they all
145overlap, so you only see a single frame at any given moment. That
146single visible frame occupies the entire screen. When you run Emacs
147from MS-Windows DOS box, you can make the visible frame smaller than
148the full screen, but Emacs still cannot display more than a single
149frame at a time.
150
151@cindex frame size under MS-DOS
152@findex mode4350
153@findex mode25
154 The @code{mode4350} command switches the display to 43 or 50
155lines, depending on your hardware; the @code{mode25} command switches
156to the default 80x25 screen size.
157
158 By default, Emacs only knows how to set screen sizes of 80 columns by
15925, 28, 35, 40, 43 or 50 rows. However, if your video adapter has
160special video modes that will switch the display to other sizes, you can
161have Emacs support those too. When you ask Emacs to switch the frame to
162@var{n} rows by @var{m} columns dimensions, it checks if there is a
163variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so,
164uses its value (which must be an integer) as the video mode to switch
165to. (Emacs switches to that video mode by calling the BIOS @code{Set
166Video Mode} function with the value of
167@code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.)
168For example, suppose your adapter will switch to 66x80 dimensions when
169put into video mode 85. Then you can make Emacs support this screen
170size by putting the following into your @file{_emacs} file:
171
172@example
173(setq screen-dimensions-66x80 85)
174@end example
175
176 Since Emacs on MS-DOS can only set the frame size to specific
177supported dimensions, it cannot honor every possible frame resizing
178request. When an unsupported size is requested, Emacs chooses the next
179larger supported size beyond the specified size. For example, if you
180ask for 36x80 frame, you will get 40x80 instead.
181
182 The variables @code{screen-dimensions-@var{n}x@var{m}} are used only
183when they exactly match the specified size; the search for the next
184larger supported size ignores them. In the above example, even if your
185VGA supports 38x80 dimensions and you define a variable
186@code{screen-dimensions-38x80} with a suitable value, you will still get
18740x80 screen when you ask for a 36x80 frame. If you want to get the
18838x80 size in this case, you can do it by setting the variable named
189@code{screen-dimensions-36x80} with the same video mode value as
190@code{screen-dimensions-38x80}.
191
192 Changing frame dimensions on MS-DOS has the effect of changing all the
193other frames to the new dimensions.
194
195@node MS-DOS File Names
196@section File Names on MS-DOS
197@cindex file names under MS-DOS
198@cindex init file, default name under MS-DOS
199
200 MS-DOS normally uses a backslash, @samp{\}, to separate name units
201within a file name, instead of the slash used on other systems. Emacs
202on MS-DOS permits use of either slash or backslash, and also knows
203about drive letters in file names.
204
205 On MS-DOS, file names are case-insensitive and limited to eight
206characters, plus optionally a period and three more characters. Emacs
207knows enough about these limitations to handle file names that were
208meant for other operating systems. For instance, leading dots @samp{.}
209in file names are invalid in MS-DOS, so Emacs transparently converts
210them to underscores @samp{_}; thus your default init file (@pxref{Init
211File}) is called @file{_emacs} on MS-DOS. Excess characters before or
212after the period are generally ignored by MS-DOS itself; thus, if you
213visit the file @file{LongFileName.EvenLongerExtension}, you will
214silently get @file{longfile.eve}, but Emacs will still display the long
215file name on the mode line. Other than that, it's up to you to specify
216file names which are valid under MS-DOS; the transparent conversion as
217described above only works on file names built into Emacs.
218
219@cindex backup file names on MS-DOS
220 The above restrictions on the file names on MS-DOS make it almost
221impossible to construct the name of a backup file (@pxref{Backup
222Names}) without losing some of the original file name characters. For
223example, the name of a backup file for @file{docs.txt} is
224@file{docs.tx~} even if single backup is used.
225
226@cindex file names under Windows 95/NT
227@cindex long file names in DOS box under Windows 95/NT
228 If you run Emacs as a DOS application under Windows 9X, you can
229turn on support for long file names. If you do that, Emacs doesn't
230truncate file names or convert them to lower case; instead, it uses the
231file names that you specify, verbatim. To enable long file name
232support, set the environment variable @code{LFN} to @samp{y} before
233starting Emacs. Unfortunately, Windows NT doesn't allow DOS programs to
234access long file names, so Emacs built for MS-DOS will only see their
235short 8+3 aliases.
236
237@cindex @code{HOME} directory under MS-DOS
238 MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
239that the directory where it is installed is the value of @code{HOME}
240environment variable. That is, if your Emacs binary,
241@file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then
242Emacs acts as if @code{HOME} were set to @samp{c:/utils/emacs}. In
243particular, that is where Emacs looks for the init file @file{_emacs}.
244With this in mind, you can use @samp{~} in file names as an alias for
245the home directory, as you would in Unix. You can also set @code{HOME}
246variable in the environment before starting Emacs; its value will then
247override the above default behavior.
248
249 Emacs on MS-DOS handles the directory name @file{/dev} specially,
250because of a feature in the emulator libraries of DJGPP that pretends
251I/O devices have names in that directory. We recommend that you avoid
252using an actual directory named @file{/dev} on any disk.
253
254@node Text and Binary
255@section Text Files and Binary Files
256@cindex text and binary files on MS-DOS/MS-Windows
257
258 GNU Emacs uses newline characters to separate text lines. This is the
259convention used on Unix, on which GNU Emacs was developed, and on GNU
260systems since they are modeled on Unix.
261
262@cindex end-of-line conversion on MS-DOS/MS-Windows
263 MS-DOS and MS-Windows normally use carriage-return linefeed, a
264two-character sequence, to separate text lines. (Linefeed is the same
265character as newline.) Therefore, convenient editing of typical files
266with Emacs requires conversion of these end-of-line (EOL) sequences.
267And that is what Emacs normally does: it converts carriage-return
268linefeed into newline when reading files, and converts newline into
269carriage-return linefeed when writing files. The same mechanism that
270handles conversion of international character codes does this conversion
271also (@pxref{Coding Systems}).
272
273@cindex cursor location, under MS-DOS
274@cindex point location, under MS-DOS
275 One consequence of this special format-conversion of most files is
276that character positions as reported by Emacs (@pxref{Position Info}) do
277not agree with the file size information known to the operating system.
278
279@vindex file-name-buffer-file-type-alist
280 Some kinds of files should not be converted, because their contents
281are not really text. Therefore, Emacs on MS-DOS distinguishes certain
282files as @dfn{binary files}, and reads and writes them verbatim. (This
283distinction is not part of MS-DOS; it is made by Emacs only.) These
284include executable programs, compressed archives, etc. Emacs uses the
285file name to decide whether to treat a file as binary: the variable
286@code{file-name-buffer-file-type-alist} defines the file-name patterns
287that indicate binary files. Note that if a file name matches one of the
288patterns for binary files in @code{file-name-buffer-file-type-alist},
289Emacs uses the @code{no-conversion} coding system (@pxref{Coding
290Systems}) which turns off @emph{all} coding-system conversions, not only
291the EOL conversion.
292
293 In addition, if Emacs recognizes from a file's contents that it uses
294newline rather than carriage-return linefeed as its line separator, it
295does not perform conversion when reading or writing that file. Thus,
296you can read and edit files from Unix or GNU systems on MS-DOS with no
297special effort, and they will be left with their Unix-style EOLs.
298
299@findex find-file-text
300@findex find-file-binary
301 You can visit a file and specify whether to treat a file as text or
302binary using the commands @code{find-file-text} and
303@code{find-file-binary}. End-of-line conversion is part of the general
304coding system conversion mechanism, so another way to control whether to
305treat a file as text or binary is with the commands for specifying a
306coding system (@pxref{Specify Coding}). For example,
307@kbd{C-x @key{RET} c undecided-unix @key{RET} C-x C-f foobar.txt}
308visits the file @file{foobar.txt} without converting the EOLs.
309
310 The mode line indicates whether end-of-line translation was used for
311the current buffer. Normally a colon appears after the coding system
312letter near the beginning of the mode line. If MS-DOS end-of-line
313translation is in use for the buffer, this character changes to a
314backslash.
315
316@cindex untranslated file system
317@findex add-untranslated-filesystem
318 When you use NFS or Samba to access file systems that reside on
319computers using Unix or GNU systems, Emacs should not perform
320end-of-line translation on any files in these file systems--not even
321when you create a new file. To request this, designate these file
322systems as @dfn{untranslated} file systems by calling the function
323@code{add-untranslated-filesystem}. It takes one argument: the file
324system name, including a drive letter and optionally a directory. For
325example,
326
327@example
328(add-untranslated-filesystem "Z:")
329@end example
330
331@noindent
332designates drive Z as an untranslated file system, and
333
334@example
335(add-untranslated-filesystem "Z:\\foo")
336@end example
337
338@noindent
339designates directory @file{\foo} on drive Z as an untranslated file
340system.
341
342 Most often you would use @code{add-untranslated-filesystem} in your
343@file{_emacs} file, or in @file{site-start.el} so that all the users at
344your site get the benefit of it.
345
346@findex remove-untranslated-filesystem
347 To countermand the effect of @code{add-untranslated-filesystem}, use
348the function @code{remove-untranslated-filesystem}. This function takes
349one argument, which should be a string just like the one that was used
350previously with @code{add-untranslated-filesystem}.
351
352@node MS-DOS Printing
353@section Printing and MS-DOS
354
355 Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and
356@code{ps-print-buffer} (@pxref{Postscript}) can work in MS-DOS by
357sending the output to one of the printer ports, if a Unix-style @code{lpr}
358program is unavailable. A few DOS-specific variables control how this
359works.
360
361@vindex dos-printer
362 If you want to use your local printer, printing on it in the usual DOS
363manner, then set the Lisp variable @code{dos-printer} to the name of the
364printer port---for example, @code{"PRN"}, the usual local printer port
365(that's the default), or @code{"LPT2"} or @code{"COM1"} for a serial
366printer. You can also set @code{dos-printer} to a file name, in which
367case ``printed'' output is actually appended to that file. If you set
368@code{dos-printer} to @code{"NUL"}, printed output is silently
369discarded (sent to the system null device).
370
371 If you set @code{dos-printer} to a file name, it's best to use an
372absolute file name. Emacs changes the working directory according to
373the default directory of the current buffer, so if the file name in
374@code{dos-printer} is relative, you will end up with several such files,
375each one in the directory of the buffer from which the printing was
376done.
377
378@findex print-buffer @r{(MS-DOS)}
379@findex print-region @r{(MS-DOS)}
380@vindex lpr-headers-switches @r{(MS-DOS)}
381 The commands @code{print-buffer} and @code{print-region} call the
382@code{pr} program, or use special switches to the @code{lpr} program, to
383produce headers on each printed page. MS-DOS doesn't normally have
384these programs, so by default, the variable @code{lpr-headers-switches}
385is set so that the requests to print page headers are silently ignored.
386Thus, @code{print-buffer} and @code{print-region} produce the same
387output as @code{lpr-buffer} and @code{lpr-region}, respectively. If you
388do have a suitable @code{pr} program (for example, from GNU Textutils),
389set @code{lpr-headers-switches} to @code{nil}; Emacs will then call
390@code{pr} to produce the page headers, and print the resulting output as
391specified by @code{dos-printer}.
392
393@vindex print-region-function @r{(MS-DOS)}
394@cindex lpr usage under MS-DOS
395@vindex lpr-command @r{(MS-DOS)}
396@vindex lpr-switches @r{(MS-DOS)}
397 Finally, if you do have an @code{lpr} work-alike, you can set
398@code{print-region-function} to @code{nil}. Then Emacs uses @code{lpr}
399for printing, as on other systems. (If the name of the program isn't
400@code{lpr}, set the @code{lpr-command} variable to specify where to find
401it.)
402
403@findex ps-print-buffer @r{(MS-DOS)}
404@findex ps-spool-buffer @r{(MS-DOS)}
405@vindex dos-ps-printer
406@vindex ps-lpr-command @r{(MS-DOS)}
407@vindex ps-lpr-switches @r{(MS-DOS)}
408 A separate variable, @code{dos-ps-printer}, defines how PostScript
409files should be printed. If its value is a string, it is used as the
410name of the device (or file) to which PostScript output is sent, just as
411@code{dos-printer} is used for non-PostScript printing. (These are two
412distinct variables in case you have two printers attached to two
413different ports, and only one of them is a PostScript printer.) If the
414value of @code{dos-ps-printer} is not a string, then the variables
415@code{ps-lpr-command} and @code{ps-lpr-switches} (@pxref{Postscript})
416control how to print PostScript files. Thus, if you have a
417non-PostScript printer, you can set these variables to the name and the
418switches appropriate for a PostScript interpreter program (such as
419Ghostscript).
420
421 For example, to use Ghostscript for printing on an Epson printer
422connected to @samp{LPT2} port, put this on your @file{.emacs} file:
423
424@example
425(setq dos-ps-printer t) ; @r{Anything but a string.}
426(setq ps-lpr-command "c:/gs/gs386")
427(setq ps-lpr-switches '("-q" "-dNOPAUSE"
428 "-sDEVICE=epson"
429 "-r240x72"
430 "-sOutputFile=LPT2"
431 "-Ic:/gs"
432 "-"))
433@end example
434
435@noindent
436(This assumes that Ghostscript is installed in the @file{"c:/gs"}
437directory.)
438
439@node MS-DOS and MULE
440@section International Support on MS-DOS
441@cindex international support @r{(MS-DOS)}
442
443 Emacs on MS-DOS supports the same international character sets as it
444does on Unix and other platforms (@pxref{International}), including
445coding systems for converting between the different character sets.
446However, due to incompatibilities between MS-DOS/MS-Windows and Unix,
447there are several DOS-specific aspects of this support that users should
448be aware of. This section describes these aspects.
449
450@table @kbd
451@item M-x dos-codepage-setup
452Set up Emacs display and coding systems as appropriate for the current
453DOS codepage.
454
455@item M-x codepage-setup
456Create a coding system for a certain DOS codepage.
457@end table
458
459@cindex codepage, MS-DOS
460@cindex DOS codepages
461 MS-DOS is designed to support one character set of 256 characters at
462any given time, but gives you a variety of character sets to choose
463from. The alternative character sets are known as @dfn{DOS codepages}.
464Each codepage includes all 128 ASCII characters, but the other 128
465characters (codes 128 through 255) vary from one codepage to another.
466Each DOS codepage is identified by a 3-digit number, such as 850, 862,
467etc.
468
469 In contrast to X Windows, which lets you use several fonts at the same
470time, MS-DOS doesn't allow use of several codepages in a single session.
471Instead, MS-DOS loads a single codepage at system startup, and you must
472reboot MS-DOS to change it@footnote{Normally, one particular codepage is
473burnt into the display memory, while other codepages can be installed by
474modifying system configuration files, such as @file{CONFIG.SYS}, and
475rebooting.}. Much the same limitation applies when you run DOS
476executables on other systems such as MS-Windows.
477
478@cindex unibyte operation @r{(MS-DOS)}
479 If you invoke Emacs on MS-DOS with the @samp{--unibyte} option
480(@pxref{Initial Options}), Emacs does not perform any conversion of
481non-ASCII characters. Instead, it reads and writes any non-ASCII
482characters verbatim, and sends their 8-bit codes to the display
483verbatim. Thus, unibyte Emacs on MS-DOS supports the current codepage,
484whatever it may be, but cannot even represent any other characters.
485
486@vindex dos-codepage
487 For multibyte operation on MS-DOS, Emacs needs to know which
488characters the chosen DOS codepage can display. So it queries the
489system shortly after startup to get the chosen codepage number, and
490stores the number in the variable @code{dos-codepage}. Some systems
491return the default value 437 for the current codepage, even though the
492actual codepage is different. (This typically happens when you use the
493codepage built into the display hardware.) You can specify a different
494codepage for Emacs to use by setting the variable @code{dos-codepage} in
495your init file.
496
497@cindex language environment, automatic selection on @r{MS-DOS}
498 Multibyte Emacs supports only certain DOS codepages, those that encode
499a single ISO 8859 character set, and it knows which ISO character set
500based on the codepage number. Emacs automatically creates a coding
501system to support reading and writing files that use the current
502codepage, and uses this coding system by default. The name of this
503coding system is @code{cp@var{nnn}}, where @var{nnn} is the codepage
504number.@footnote{The standard Emacs coding systems for ISO 8859 are not
505quite right for the purpose, because typically the DOS codepage does not
506match the standard ISO character codes. For example, the
507letter @samp{@,{c}} (@samp{c} with cedilla) has code 231 in the standard
508Latin-1 character set, but the corresponding DOS codepage 850 uses code
509135 for this glyph.}
510
511@cindex mode line @r{(MS-DOS)}
512 All the @code{cp@var{nnn}} coding systems use the letter @samp{D} (for
513``DOS'') as their mode-line mnemonic. Since both the terminal coding
514system and the default coding system for file I/O are set to the proper
515@code{cp@var{nnn}} coding system at startup, it is normal for the mode
516line on MS-DOS to begin with @samp{-DD\-}. @xref{Mode Line}.
517
518 Since the codepage number also indicates which script you are using,
519Emacs automatically runs @code{set-language-environment} to select the
520language environment for that script (@pxref{Language Environments}).
521
522 If a buffer contains a character belonging to some other ISO 8859
523character set, not the one that the chosen DOS codepage supports, Emacs
524displays it using a sequence of ASCII characters. For example, if the
525current codepage doesn't have a glyph for the letter @samp{@`o} (small
526@samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where
527the braces serve as a visual indication that this is a single character.
528(This may look awkward for some non-Latin characters, such as those from
529Greek or Hebrew alphabets, but it is still readable by a person who
530knows the language.) Even though the character may occupy several
531columns on the screen, it is really still just a single character, and
532all Emacs commands treat it as one.
533
534@vindex dos-unsupported-character-glyph
535 Not all characters in DOS codepages correspond to ISO 8859
536characters---some are used for other purposes, such as box-drawing
537characters and other graphics. Emacs cannot represent these characters
538internally, so when you read a file that uses these characters, they are
539converted into a particular character code, specified by the variable
540@code{dos-unsupported-character-glyph}.
541
542 Emacs supports many other characters sets aside from ISO 8859, but it
543cannot display them on MS-DOS. So if one of these multibyte characters
544appears in a buffer, Emacs on MS-DOS displays a solid box instead of the
545character.
546
547@findex codepage-setup
548 By default, Emacs defines a coding system to support the current
549codepage. To define a coding system for some other codepage (e.g., to
550visit a file written on a DOS machine in another country), use the
551@kbd{M-x codepage-setup} command. It prompts for the 3-digit code of
552the codepage, with completion, then creates the coding system for the
553specified codepage. You can then use the new coding system to read and
554write files, but you must specify it explicitly for the file command
555when you want to use it (@pxref{Specify Coding}).
556
557 These coding systems are also useful for visiting a file encoded using
558a DOS codepage, using Emacs running on some other operating system.
559
560@node MS-DOS Processes
561@section Subprocesses on MS-DOS
562
563@cindex compilation under MS-DOS
564@cindex inferior processes under MS-DOS
565@findex compile @r{(MS-DOS)}
566@findex grep @r{(MS-DOS)}
567 Because MS-DOS is a single-process ``operating system,''
568asynchronous subprocesses are not available. In particular, Shell
569mode and its variants do not work. Most Emacs features that use
570asynchronous subprocesses also don't work on MS-DOS, including
571spelling correction and GUD. When in doubt, try and see; commands that
572don't work print an error message saying that asynchronous processes
573aren't supported.
574
575 Compilation under Emacs with @kbd{M-x compile}, searching files with
576@kbd{M-x grep} and displaying differences between files with @kbd{M-x
577diff} do work, by running the inferior processes synchronously. This
578means you cannot do any more editing until the inferior process
579finishes.
580
581 By contrast, Emacs compiled as native Windows application
582@strong{does} support asynchronous subprocesses. @xref{Windows
583Processes}.
584
585@cindex printing under MS-DOS
586 Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and
587@code{ps-print-buffer} (@pxref{Postscript}), work in MS-DOS by sending
588the output to one of the printer ports. @xref{MS-DOS Printing}.
589
590 When you run a subprocess synchronously on MS-DOS, make sure the
591program terminates and does not try to read keyboard input. If the
592program does not terminate on its own, you will be unable to terminate
593it, because MS-DOS provides no general way to terminate a process.
594Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these
595cases.
596
597 Accessing files on other machines is not supported on MS-DOS. Other
598network-oriented commands such as sending mail, Web browsing, remote
599login, etc., don't work either, unless network access is built into
600MS-DOS with some network redirector.
601
602@cindex directory listing on MS-DOS
603@vindex dired-listing-switches @r{(MS-DOS)}
604 Dired on MS-DOS uses the @code{ls-lisp} package where other
605platforms use the system @code{ls} command. Therefore, Dired on
606MS-DOS supports only some of the possible options you can mention in
607the @code{dired-listing-switches} variable. The options that work are
608@samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S},
609@samp{-s}, @samp{-t}, and @samp{-u}.
610
611@node Windows Processes
612@section Subprocesses on Windows 95 and NT
613
614Emacs compiled as a native Windows application (as opposed to the DOS
615version) includes full support for asynchronous subprocesses.
616In the Windows version, synchronous and asynchronous subprocesses work
617fine on both
618Windows 95 and Windows NT as long as you run only 32-bit Windows
619applications. However, when you run a DOS application in a subprocess,
620you may encounter problems or be unable to run the application at all;
621and if you run two DOS applications at the same time in two
622subprocesses, you may have to reboot your system.
623
624Since the standard command interpreter (and most command line utilities)
625on Windows 95 are DOS applications, these problems are significant when
626using that system. But there's nothing we can do about them; only
627Microsoft can fix them.
628
629If you run just one DOS application subprocess, the subprocess should
630work as expected as long as it is ``well-behaved'' and does not perform
631direct screen access or other unusual actions. If you have a CPU
632monitor application, your machine will appear to be 100% busy even when
633the DOS application is idle, but this is only an artifact of the way CPU
634monitors measure processor load.
635
636You must terminate the DOS application before you start any other DOS
637application in a different subprocess. Emacs is unable to interrupt or
638terminate a DOS subprocess. The only way you can terminate such a
639subprocess is by giving it a command that tells its program to exit.
640
641If you attempt to run two DOS applications at the same time in separate
642subprocesses, the second one that is started will be suspended until the
643first one finishes, even if either or both of them are asynchronous.
644
645If you can go to the first subprocess, and tell it to exit, the second
646subprocess should continue normally. However, if the second subprocess
647is synchronous, Emacs itself will be hung until the first subprocess
648finishes. If it will not finish without user input, then you have no
649choice but to reboot if you are running on Windows 95. If you are
650running on Windows NT, you can use a process viewer application to kill
651the appropriate instance of ntvdm instead (this will terminate both DOS
652subprocesses).
653
654If you have to reboot Windows 95 in this situation, do not use the
655@code{Shutdown} command on the @code{Start} menu; that usually hangs the
656system. Instead, type @kbd{CTL-ALT-@key{DEL}} and then choose
657@code{Shutdown}. That usually works, although it may take a few minutes
658to do its job.
659
660@node Windows System Menu
661@section Using the System Menu on Windows
662
663Emacs compiled as a native Windows application normally turns off the
664Windows feature that tapping the @key{ALT}
665key invokes the Windows menu. The reason is that the @key{ALT} also
666serves as @key{META} in Emacs. When using Emacs, users often press the
667@key{META} key temporarily and then change their minds; if this has the
668effect of bringing up the Windows menu, it alters the meaning of
669subsequent commands. Many users find this frustrating.
670
671@vindex w32-pass-alt-to-system
672You can reenable Windows's default handling of tapping the @key{ALT} key
673by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value.
674