@c This is part of the Emacs manual.
-@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012
@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Microsoft Windows, Manifesto, Mac OS / GNUstep, Top
* Windows Fonts:: Specifying fonts on MS-Windows.
* Windows Misc:: Miscellaneous Windows features.
@ifnottex
-* MS-DOS:: Using Emacs on MS-DOS (otherwise known as @dfn{MS-DOG}).
+* MS-DOS:: Using Emacs on MS-DOS.
@end ifnottex
@end menu
the program that invoked @command{emacsclient}.
@end enumerate
+@cindex emacsclient, on MS-Windows
+Note that, due to limitations of MS-Windows, Emacs cannot have both
+GUI and text-mode frames in the same session. It also cannot open
+text-mode frames on more than a single @dfn{Command Prompt} window,
+because each Windows program can have only one console at any given
+time. For these reasons, if you invoke @command{emacsclient} with the
+@option{-c} option, and the Emacs server runs in a text-mode session,
+Emacs will always create a new text-mode frame in the same
+@dfn{Command Prompt} window where it was started; a GUI frame will be
+created only if the server runs in a GUI session. Similarly, if you
+invoke @command{emacsclient} with the @option{-t} option, Emacs will
+create a GUI frame if the server runs in a GUI session, or a text-mode
+frame when the session runs in text mode in a @dfn{Command Prompt}
+window. @xref{emacsclient Options}.
+
@node Text and Binary
@section Text Files and Binary Files
@cindex text and binary files on MS-DOS/MS-Windows
command. For example, to save a buffer with Unix EOL format, type
@kbd{C-x @key{RET} f unix @key{RET} C-x C-s}. If you visit a file
with DOS EOL conversion, then save it with Unix EOL format, that
-effectively converts the file to Unix EOL style, like @code{dos2unix}.
+effectively converts the file to Unix EOL style, like the
+@code{dos2unix} program.
@cindex untranslated file system
@findex add-untranslated-filesystem
carriage-return linefeed EOL format, such as @file{CONFIG.SYS}; Emacs
always writes those files with Windows-style EOLs.
- If a file which belongs to an untranslated file system matches one of
+ If a file that belongs to an untranslated file system matches one of
the file-name patterns in @code{file-name-buffer-file-type-alist}, the
EOL conversion is determined by @code{file-name-buffer-file-type-alist}.
@cindex Dired, and MS-Windows/MS-DOS
@cindex @code{ls} emulation
- Dired normally uses the external program @code{ls} (or its close
-work-alike) to produce the directory listing displayed in Dired
+ Dired normally uses the external program @code{ls}
+to produce the directory listing displayed in Dired
buffers (@pxref{Dired}). However, MS-Windows and MS-DOS systems don't
come with such a program, although several ports of @sc{gnu} @code{ls}
are available. Therefore, Emacs on those systems @emph{emulates}
The @code{ls} emulation supports many of the @code{ls} switches, but
it doesn't support all of them. Here's the list of the switches it
does support: @option{-A}, @option{-a}, @option{-B}, @option{-C},
-@option{-c}, @option{-i}, @option{-G}, @option{-g}, @option{-R},
-@option{-r}, @option{-S}, @option{-s}, @option{-t}, @option{-U},
+@option{-c}, @option{-G}, @option{-g}, @option{-h}, @option{-i}, @option{-n},
+@option{-R}, @option{-r}, @option{-S}, @option{-s}, @option{-t}, @option{-U},
@option{-u}, and @option{-X}. The @option{-F} switch is partially
supported (it appends the character that classifies the file, but does
not prevent symlink following).
attributes are displayed.
@vindex ls-lisp-emulation
- The variable @code{ls-lisp-emulation} controls the flavour of the
+ The variable @code{ls-lisp-emulation} controls the flavor of the
@code{ls} emulation by setting the defaults for the 3 options
described above: @code{ls-lisp-ignore-case},
@code{ls-lisp-dirs-first}, and @code{ls-lisp-verbosity}. The value of
You can override this default value of @code{HOME} by explicitly
setting the environment variable @env{HOME} to point to any directory
on your system. @env{HOME} can be set either from the command shell
-prompt or from the @samp{My Computer}s @samp{Properties} dialog.
-@code{HOME} can also be set in the system registry, for details see
-@ref{MS-Windows Registry}.
+prompt or from @samp{Properties} dialog of @samp{My Computer}.
+@code{HOME} can also be set in the system registry,
+@pxref{MS-Windows Registry}.
For compatibility with older versions of Emacs@footnote{
Older versions of Emacs didn't check the application data directory.
Whatever the final place is, Emacs sets the internal value of the
@env{HOME} environment variable to point to it, and it will use that
location for other files and directories it normally looks for or
-creates in the user's home directory.
+creates in your home directory.
- You can always find out where Emacs thinks is your home directory's
+ You can always find out what Emacs thinks is your home directory's
location by typing @kbd{C-x d ~/ @key{RET}}. This should present the
list of files in the home directory, and show its full name on the
first line. Likewise, to visit your init file, type @kbd{C-x C-f
@cindex @file{_emacs} init file, MS-Windows
Because MS-DOS does not allow file names with leading dots, and
-because older Windows systems made it hard to create files with such
-names, the Windows port of Emacs supports an alternative name
-@file{_emacs} as a fallback, if such a file exists in the home
-directory, whereas @file{.emacs} does not.
+older Windows systems made it hard to create files with such names,
+the Windows port of Emacs supports an init file name @file{_emacs}, if
+such a file exists in the home directory and @file{.emacs} does not.
+This name is considered obsolete.
@node Windows Keyboard
@section Keyboard Usage on MS-Windows
@cindex @kbd{M-@key{TAB}} vs @kbd{Alt-@key{TAB}} (MS-Windows)
@cindex @kbd{Alt-@key{TAB}} vs @kbd{M-@key{TAB}} (MS-Windows)
For example, @code{(w32-register-hot-key [M-tab])} lets you use
-@kbd{M-TAB} normally in Emacs, for instance, to complete the word or
+@kbd{M-TAB} normally in Emacs; for instance, to complete the word or
symbol at point at top level, or to complete the current search string
against previously sought strings during incremental search.
Windows menu, it alters the meaning of subsequent commands. Many
users find this frustrating.
- You can re-enable Windows' default handling of tapping the @key{ALT}
+ You can re-enable Windows's default handling of tapping the @key{ALT}
key by setting @code{w32-pass-alt-to-system} to a non-@code{nil}
value.
its normal effect: for example, @kbd{@key{Lwindow}} opens the
@code{Start} menu, etc.@footnote{
Some combinations of the ``Windows'' keys with other keys are caught
-by Windows at low level in a way that Emacs currently cannot prevent.
+by Windows at a low level in a way that Emacs currently cannot prevent.
For example, @kbd{@key{Lwindow} r} always pops up the Windows
@samp{Run} dialog. Customizing the value of
@code{w32-phantom-key-code} might help in some cases, though.}
@cindex mouse, and MS-Windows
This section describes the Windows-specific variables related to
-mouse.
+the mouse.
@vindex w32-mouse-button-tolerance
@cindex simulation of middle mouse button
@vindex w32-quote-process-args
The variable @code{w32-quote-process-args} controls how Emacs quotes
the process arguments. Non-@code{nil} means quote with the @code{"}
-character. If the value is a character, use that character to escape
-any quote characters that appear; otherwise chose a suitable escape
+character. If the value is a character, Emacs uses that character to escape
+any quote characters that appear; otherwise it chooses a suitable escape
character based on the type of the program.
@ifnottex
variables control printing on all systems, but in some cases they have
different default values on MS-DOS and MS-Windows.
- Emacs on Windows automatically determines your default printer and
-sets the variable @code{printer-name} to that printer's name. But in
-some rare cases this can fail, or you may wish to use a different
+ Emacs on MS Windows attempts to determine your default printer
+automatically (using the function @code{default-printer-name}).
+But in some rare cases this can fail, or you may wish to use a different
printer from within Emacs. The rest of this section explains how to
tell Emacs which printer to use.
If you want to use your local printer, then set the Lisp variable
@code{lpr-command} to @code{""} (its default value on Windows) and
@code{printer-name} to the name of the printer port---for example,
-@code{"PRN"}, the usual local printer port or @code{"LPT2"}, or
+@code{"PRN"}, the usual local printer port, or @code{"LPT2"}, or
@code{"COM1"} for a serial printer. You can also set
@code{printer-name} to a file name, in which case ``printed'' output
is actually appended to that file. If you set @code{printer-name} to
obtain a list of servers, and @samp{net view @var{server-name}} to see
the names of printers (and directories) shared by that server.
Alternatively, click the @samp{Network Neighborhood} icon on your
-desktop, and look for machines which share their printers via the
+desktop, and look for machines that share their printers via the
network.
@cindex @samp{net use}, and printing on MS-Windows
Finally, if you do have an @code{lpr} work-alike, you can set the
variable @code{lpr-command} to @code{"lpr"}. Then Emacs will use
@code{lpr} for printing, as on other systems. (If the name of the
-program isn't @code{lpr}, set @code{lpr-command} to specify where to
-find it.) The variable @code{lpr-switches} has its standard meaning
+program isn't @code{lpr}, set @code{lpr-command} to the appropriate value.)
+The variable @code{lpr-switches} has its standard meaning
when @code{lpr-command} is not @code{""}. If the variable
@code{printer-name} has a string value, it is used as the value for the
@code{-P} option to @code{lpr}, as on Unix.
@cindex Ghostscript, use for PostScript printing
The default value of the variable @code{ps-lpr-command} is @code{""},
which causes PostScript output to be sent to the printer port specified
-by @code{ps-printer-name}, but @code{ps-lpr-command} can also be set to
+by @code{ps-printer-name}; but @code{ps-lpr-command} can also be set to
the name of a program which will accept PostScript files. Thus, if you
have a non-PostScript printer, you can set this variable to the name of
a PostScript interpreter program (such as Ghostscript). Any switches
The old XLFD based format is also supported for backwards compatibility.
- Emacs 23 supports a number of backends. Currently, the @code{gdi}
-and @code{uniscribe} font backends are supported on Windows. The
-@code{gdi} font backend is available on all versions of Windows, and
-supports all fonts that are natively supported by Windows. The
+@cindex font backend selection (MS-Windows)
+ Emacs 23 and later supports a number of font backends. Currently,
+the @code{gdi} and @code{uniscribe} backends are supported on Windows.
+The @code{gdi} font backend is available on all versions of Windows,
+and supports all fonts that are natively supported by Windows. The
@code{uniscribe} font backend is available on Windows 2000 and later,
-and supports Truetype and Opentype fonts. Some languages requiring
-complex layout can only be properly supported by the uniscribe
+and supports TrueType and OpenType fonts. Some languages requiring
+complex layout can only be properly supported by the Uniscribe
backend. By default, both backends are enabled if supported, with
-@code{uniscribe} taking priority over @code{gdi}.
+@code{uniscribe} taking priority over @code{gdi}. To override that
+and use the GDI backend even if Uniscribe is available, invoke Emacs
+with the @kbd{-xrm Emacs.fontBackend:gdi} command-line argument, or
+add a @code{Emacs.fontBackend} resource with the value @code{gdi} in
+the Registry under either the
+@samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs} or the
+@samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs} key (@pxref{Resources}).
@cindex font properties (MS Windows)
@noindent
@vindex w32-charset-info-alist
@item registry
Specifies the character set registry that the font is
-expected to cover. Most Truetype and Opentype fonts will be unicode fonts
+expected to cover. Most TrueType and OpenType fonts will be Unicode fonts
that cover several national character sets, but you can narrow down the
selection of fonts to those that support a particular character set by
using a specific registry from @code{w32-charset-info-alist} here.
@table @code
@cindex font scripts (MS Windows)
-@cindex font unicode subranges (MS Windows)
+@cindex font Unicode subranges (MS Windows)
@item script
-Specifies a unicode subrange the font should support.
+Specifies a Unicode subrange the font should support.
The following scripts are recognized on Windows: @code{latin}, @code{greek},
@code{coptic}, @code{cyrillic}, @code{armenian}, @code{hebrew}, @code{arabic},
determines whether to make the system caret visible. The default when
no screen reader software is in use is @code{nil}, which means Emacs
draws its own cursor to indicate the position of point. A
-non-@code{nil} value means Emacs will indicate point location by the
+non-@code{nil} value means Emacs will indicate point location with the
system caret; this facilitates use of screen reader software, and is
the default when such software is detected when running Emacs.
When this variable is non-@code{nil}, other variables affecting the