annotate man/msdog.texi @ 26201:097072728e80

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