Mercurial > emacs
annotate man/msdog.texi @ 70044:027c07dcdee5
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-225
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 84-85)
- Merge from emacs--devo--0
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 17 Apr 2006 08:36:28 +0000 |
parents | 601830ae280c |
children | 63b105ced679 c156f6a9e7b5 |
rev | line source |
---|---|
24095 | 1 @c This is part of the Emacs manual. |
64890
3723093a21fd
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64742
diff
changeset
|
2 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, |
68639
dc2d5a6655a3
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
68544
diff
changeset
|
3 @c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
24095 | 4 @c See file emacs.texi for copying conditions. |
69898
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
5 @node Emacs and Microsoft Windows, Manifesto, Mac OS, Top |
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
6 @appendix Emacs and Microsoft Windows |
68460
bb56c788af45
(MS-DOS): Rewrite intro to explain how this
Richard M. Stallman <rms@gnu.org>
parents:
64890
diff
changeset
|
7 @cindex Microsoft Windows |
bb56c788af45
(MS-DOS): Rewrite intro to explain how this
Richard M. Stallman <rms@gnu.org>
parents:
64890
diff
changeset
|
8 |
69898
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
9 This section describes peculiarities of using Emacs on Microsoft |
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
10 Windows. Information about Emacs and Microsoft's older MS-DOS |
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
11 ``operating system'' (also known as ``MS-DOG'') is now in a separate |
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
12 manual (@inforef{MS-DOG,, emacs-xtra}). |
24095 | 13 |
69898
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
14 Iif you want to use Emacs on Windows, you would normally build Emacs |
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
15 specifically for Windows. If you do that, the behavior is reasonably |
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
16 similar to what is documented in the rest of the manual, including |
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
17 support for long file names, multiple frames, scroll bars, mouse |
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
18 menus, and subprocesses. However, a few special considerations apply, |
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
19 and they are described here. |
24095 | 20 |
21 @menu | |
69898
601830ae280c
move MS-DOS material to emacs-xtra.texi
Karl Berry <karl@gnu.org>
parents:
68639
diff
changeset
|
22 * Text and Binary:: Text files use CRLF to terminate lines. |
24095 | 23 * Windows Processes:: Running subprocesses on Windows. |
24 * Windows System Menu:: Controlling what the ALT key does. | |
25 @end menu | |
26 | |
27 @node Text and Binary | |
28 @section Text Files and Binary Files | |
29 @cindex text and binary files on MS-DOS/MS-Windows | |
30 | |
31 GNU Emacs uses newline characters to separate text lines. This is the | |
36169
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
32 convention used on GNU and Unix. |
24095 | 33 |
34 @cindex end-of-line conversion on MS-DOS/MS-Windows | |
35 MS-DOS and MS-Windows normally use carriage-return linefeed, a | |
36 two-character sequence, to separate text lines. (Linefeed is the same | |
37 character as newline.) Therefore, convenient editing of typical files | |
38 with Emacs requires conversion of these end-of-line (EOL) sequences. | |
39 And that is what Emacs normally does: it converts carriage-return | |
40 linefeed into newline when reading files, and converts newline into | |
41 carriage-return linefeed when writing files. The same mechanism that | |
42 handles conversion of international character codes does this conversion | |
43 also (@pxref{Coding Systems}). | |
44 | |
29853
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
45 @cindex cursor location, on MS-DOS |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
46 @cindex point location, on MS-DOS |
24095 | 47 One consequence of this special format-conversion of most files is |
48 that character positions as reported by Emacs (@pxref{Position Info}) do | |
49 not agree with the file size information known to the operating system. | |
50 | |
51 In addition, if Emacs recognizes from a file's contents that it uses | |
52 newline rather than carriage-return linefeed as its line separator, it | |
36169
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
53 does not perform EOL conversion when reading or writing that file. |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
54 Thus, you can read and edit files from GNU and Unix systems on MS-DOS |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
55 with no special effort, and they will retain their Unix-style |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
56 end-of-line convention after you edit them. |
24095 | 57 |
29853
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
58 The mode line indicates whether end-of-line translation was used for |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
59 the current buffer. If MS-DOS end-of-line translation is in use for the |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
60 buffer, a backslash @samp{\} is displayed after the coding system |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
61 mnemonic near the beginning of the mode line (@pxref{Mode Line}). If no |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
62 EOL translation was performed, the string @samp{(Unix)} is displayed |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
63 instead of the backslash, to alert you that the file's EOL format is not |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
64 the usual carriage-return linefeed. |
24095 | 65 |
29853
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
66 @cindex DOS-to-Unix conversion of files |
36169
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
67 To visit a file and specify whether it uses DOS-style or Unix-style |
68544
d29761b06e4e
(Text and Binary, MS-DOS and MULE): Fix xrefs.
Richard M. Stallman <rms@gnu.org>
parents:
68460
diff
changeset
|
68 end-of-line, specify a coding system (@pxref{Text Coding}). For |
36169
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
69 example, @kbd{C-x @key{RET} c unix @key{RET} C-x C-f foobar.txt} |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
70 visits the file @file{foobar.txt} without converting the EOLs; if some |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
71 line ends with a carriage-return linefeed pair, Emacs will display |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
72 @samp{^M} at the end of that line. Similarly, you can direct Emacs to |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
73 save a buffer in a specified EOL format with the @kbd{C-x @key{RET} f} |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
74 command. For example, to save a buffer with Unix EOL format, type |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
75 @kbd{C-x @key{RET} f unix @key{RET} C-x C-s}. If you visit a file |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
76 with DOS EOL conversion, then save it with Unix EOL format, that |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
77 effectively converts the file to Unix EOL style, like @code{dos2unix}. |
24095 | 78 |
79 @cindex untranslated file system | |
80 @findex add-untranslated-filesystem | |
81 When you use NFS or Samba to access file systems that reside on | |
36169
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
82 computers using GNU or Unix systems, Emacs should not perform |
56165
920d5b4fe0a2
* msdog.texi (Text and Binary, MS-DOS Printing): Use m-dash.
Jesper Harder <harder@ifa.au.dk>
parents:
52979
diff
changeset
|
83 end-of-line translation on any files in these file systems---not even |
24095 | 84 when you create a new file. To request this, designate these file |
85 systems as @dfn{untranslated} file systems by calling the function | |
86 @code{add-untranslated-filesystem}. It takes one argument: the file | |
87 system name, including a drive letter and optionally a directory. For | |
88 example, | |
89 | |
90 @example | |
91 (add-untranslated-filesystem "Z:") | |
92 @end example | |
93 | |
94 @noindent | |
95 designates drive Z as an untranslated file system, and | |
96 | |
97 @example | |
98 (add-untranslated-filesystem "Z:\\foo") | |
99 @end example | |
100 | |
101 @noindent | |
102 designates directory @file{\foo} on drive Z as an untranslated file | |
103 system. | |
104 | |
105 Most often you would use @code{add-untranslated-filesystem} in your | |
106 @file{_emacs} file, or in @file{site-start.el} so that all the users at | |
107 your site get the benefit of it. | |
108 | |
109 @findex remove-untranslated-filesystem | |
110 To countermand the effect of @code{add-untranslated-filesystem}, use | |
111 the function @code{remove-untranslated-filesystem}. This function takes | |
112 one argument, which should be a string just like the one that was used | |
113 previously with @code{add-untranslated-filesystem}. | |
114 | |
36169
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
115 Designating a file system as untranslated does not affect character |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
116 set conversion, only end-of-line conversion. Essentially, it directs |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
117 Emacs to create new files with the Unix-style convention of using |
86e871a073b6
Delete find-file-text and find-file-binary.
Richard M. Stallman <rms@gnu.org>
parents:
35188
diff
changeset
|
118 newline at the end of a line. @xref{Coding Systems}. |
29853
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
119 |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
120 @vindex file-name-buffer-file-type-alist |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
121 @cindex binary files, on MS-DOS/MS-Windows |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
122 Some kinds of files should not be converted at all, because their |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
123 contents are not really text. Therefore, Emacs on MS-DOS distinguishes |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
124 certain files as @dfn{binary files}. (This distinction is not part of |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
125 MS-DOS; it is made by Emacs only.) Binary files include executable |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
126 programs, compressed archives, etc. Emacs uses the file name to decide |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
127 whether to treat a file as binary: the variable |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
128 @code{file-name-buffer-file-type-alist} defines the file-name patterns |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
129 that indicate binary files. If a file name matches one of the patterns |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
130 for binary files (those whose associations are of the type |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
131 @code{(@var{pattern} . t)}, Emacs reads and writes that file using the |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
132 @code{no-conversion} coding system (@pxref{Coding Systems}) which turns |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
133 off @emph{all} coding-system conversions, not only the EOL conversion. |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
134 @code{file-name-buffer-file-type-alist} also includes file-name patterns |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
135 for files which are known to be DOS-style text files with |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
136 carriage-return linefeed EOL format, such as @file{CONFIG.SYS}; Emacs |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
137 always writes those files with DOS-style EOLs. |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
138 |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
139 If a file which belongs to an untranslated file system matches one of |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
140 the file-name patterns in @code{file-name-buffer-file-type-alist}, the |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
141 EOL conversion is determined by @code{file-name-buffer-file-type-alist}. |
d49e929bbdf6
(Text and Binary): Separate description of EOL
Eli Zaretskii <eliz@gnu.org>
parents:
29107
diff
changeset
|
142 |
24095 | 143 @node Windows Processes |
39142
449f9371ac14
Mention Windows ME and Windows 2000 in the list of supported versions.
Eli Zaretskii <eliz@gnu.org>
parents:
38869
diff
changeset
|
144 @section Subprocesses on Windows 9X/ME and Windows NT/2K |
24095 | 145 |
60110
f1ac3b1b3584
(MS-DOS Keyboard, MS-DOS Mouse): Split from MS-DOS Input node.
Richard M. Stallman <rms@gnu.org>
parents:
57368
diff
changeset
|
146 Emacs compiled as a native Windows application (as opposed to the DOS |
24095 | 147 version) includes full support for asynchronous subprocesses. |
148 In the Windows version, synchronous and asynchronous subprocesses work | |
149 fine on both | |
39142
449f9371ac14
Mention Windows ME and Windows 2000 in the list of supported versions.
Eli Zaretskii <eliz@gnu.org>
parents:
38869
diff
changeset
|
150 Windows 9X and Windows NT/2K as long as you run only 32-bit Windows |
24095 | 151 applications. However, when you run a DOS application in a subprocess, |
152 you may encounter problems or be unable to run the application at all; | |
153 and if you run two DOS applications at the same time in two | |
154 subprocesses, you may have to reboot your system. | |
155 | |
156 Since the standard command interpreter (and most command line utilities) | |
157 on Windows 95 are DOS applications, these problems are significant when | |
158 using that system. But there's nothing we can do about them; only | |
159 Microsoft can fix them. | |
160 | |
161 If you run just one DOS application subprocess, the subprocess should | |
162 work as expected as long as it is ``well-behaved'' and does not perform | |
163 direct screen access or other unusual actions. If you have a CPU | |
164 monitor application, your machine will appear to be 100% busy even when | |
165 the DOS application is idle, but this is only an artifact of the way CPU | |
166 monitors measure processor load. | |
167 | |
168 You must terminate the DOS application before you start any other DOS | |
169 application in a different subprocess. Emacs is unable to interrupt or | |
170 terminate a DOS subprocess. The only way you can terminate such a | |
171 subprocess is by giving it a command that tells its program to exit. | |
172 | |
173 If you attempt to run two DOS applications at the same time in separate | |
174 subprocesses, the second one that is started will be suspended until the | |
175 first one finishes, even if either or both of them are asynchronous. | |
176 | |
177 If you can go to the first subprocess, and tell it to exit, the second | |
178 subprocess should continue normally. However, if the second subprocess | |
179 is synchronous, Emacs itself will be hung until the first subprocess | |
180 finishes. If it will not finish without user input, then you have no | |
39142
449f9371ac14
Mention Windows ME and Windows 2000 in the list of supported versions.
Eli Zaretskii <eliz@gnu.org>
parents:
38869
diff
changeset
|
181 choice but to reboot if you are running on Windows 9X. If you are |
449f9371ac14
Mention Windows ME and Windows 2000 in the list of supported versions.
Eli Zaretskii <eliz@gnu.org>
parents:
38869
diff
changeset
|
182 running on Windows NT/2K, you can use a process viewer application to kill |
24095 | 183 the appropriate instance of ntvdm instead (this will terminate both DOS |
184 subprocesses). | |
185 | |
39142
449f9371ac14
Mention Windows ME and Windows 2000 in the list of supported versions.
Eli Zaretskii <eliz@gnu.org>
parents:
38869
diff
changeset
|
186 If you have to reboot Windows 9X in this situation, do not use the |
24095 | 187 @code{Shutdown} command on the @code{Start} menu; that usually hangs the |
188 system. Instead, type @kbd{CTL-ALT-@key{DEL}} and then choose | |
189 @code{Shutdown}. That usually works, although it may take a few minutes | |
190 to do its job. | |
191 | |
192 @node Windows System Menu | |
193 @section Using the System Menu on Windows | |
194 | |
195 Emacs compiled as a native Windows application normally turns off the | |
196 Windows feature that tapping the @key{ALT} | |
197 key invokes the Windows menu. The reason is that the @key{ALT} also | |
198 serves as @key{META} in Emacs. When using Emacs, users often press the | |
199 @key{META} key temporarily and then change their minds; if this has the | |
200 effect of bringing up the Windows menu, it alters the meaning of | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
44696
diff
changeset
|
201 subsequent commands. Many users find this frustrating. |
24095 | 202 |
203 @vindex w32-pass-alt-to-system | |
57368 | 204 You can re-enable Windows' default handling of tapping the @key{ALT} key |
24095 | 205 by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value. |
206 | |
52401 | 207 @ignore |
208 arch-tag: f39d2590-5dcc-4318-88d9-0eb73ca10fa2 | |
209 @end ignore |