* Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS.
* Display: MS-DOS Display. Fonts, frames and display size on MS-DOS.
* Files: MS-DOS File Names. File name conventions on MS-DOS.
-* Printing: MS-DOS Printing. How to specify the printer on MS-DOS.
+* Printing: MS-DOS Printing. Printing specifics on MS-DOS.
* I18N: MS-DOS and MULE. Support for internationalization on MS-DOS.
* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.
@end menu
@cindex file names under MS-DOS
@cindex init file, default name under MS-DOS
- MS-DOS normally uses a backslash, @samp{\}, to separate name units
-within a file name, instead of the slash used on other systems. Emacs
-on MS-DOS permits use of either slash or backslash, and also knows
-about drive letters in file names.
-
On MS-DOS, file names are case-insensitive and limited to eight
characters, plus optionally a period and three more characters. Emacs
knows enough about these limitations to handle file names that were
@section Printing and MS-DOS
Printing commands, such as @code{lpr-buffer}
-(@pxref{Printing,,,emacs, the Emacs Manual }) and
+(@pxref{Printing,,,emacs, the Emacs Manual}) and
@code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual})
-can work in MS-DOS and MS-Windows by sending the output to one of the
-printer ports, if a Posix-style @code{lpr} program is unavailable.
-The same Emacs variables control printing on all systems, but in some
-cases they have different default values on MS-DOS and MS-Windows.
-
-@vindex printer-name @r{(MS-DOS)}
- If you want to use your local printer, printing on it in the usual DOS
-manner, then set the Lisp variable @code{lpr-command} to @code{""} (its
-default value) and @code{printer-name} to the name of the printer
-port---for example, @code{"PRN"}, the usual local printer port (that's
-the default), 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 @code{"NUL"}, printed output is silently
-discarded (sent to the system null device).
-
- On MS-Windows, when the Windows network software is installed, you can
-also use a printer shared by another machine by setting
-@code{printer-name} to the UNC share name for that printer---for example,
-@code{"//joes_pc/hp4si"}. (It doesn't matter whether you use forward
-slashes or backslashes here.) To find out the names of shared printers,
-run the command @samp{net view} at a DOS command prompt 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 network.
-
-@cindex @samp{net use}, and printing on MS-Windows
-@cindex networked printers (MS-Windows)
- If the printer doesn't appear in the output of @samp{net view}, or
-if setting @code{printer-name} to the UNC share name doesn't produce a
-hardcopy on that printer, you can use the @samp{net use} command to
-connect a local print port such as @code{"LPT2"} to the networked
-printer. For example, typing @kbd{net use LPT2:
-\\joes_pc\hp4si}@footnote{
-Note that the @samp{net use} command requires the UNC share name to be
-typed with the Windows-style backslashes, while the value of
-@code{printer-name} can be set with either forward- or backslashes.}
-causes Windows to @dfn{capture} the LPT2 port and redirect the printed
-material to the printer connected to the machine @code{joes_pc}.
-After this command, setting @code{printer-name} to @code{"LPT2"}
-should produce the hardcopy on the networked printer.
-
- With some varieties of Windows network software, you can instruct
-Windows to capture a specific printer port such as @code{"LPT2"}, and
-redirect it to a networked printer via the @w{@code{Control
-Panel->Printers}} applet instead of @samp{net use}.
+can work on MS-DOS by sending the output to one of the printer ports,
+if a Posix-style @code{lpr} program is unavailable. The same Emacs
+variables control printing on all systems, but in some cases they have
+different default values on MS-DOS.
+
+@xref{MS-Windows Printing,,,emacs, the Emacs Manual}, for details.
Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even
though they are connected to a Windows machine which uses a different
codepage 850 encoding. You may need to create the @code{cp@var{nnn}}
coding system with @kbd{M-x codepage-setup}.
- If you set @code{printer-name} to a file name, it's best to use an
-absolute file name. Emacs changes the working directory according to
-the default directory of the current buffer, so if the file name in
-@code{printer-name} is relative, you will end up with several such
-files, each one in the directory of the buffer from which the printing
-was done.
-
-@findex print-buffer @r{(MS-DOS)}
-@findex print-region @r{(MS-DOS)}
-@vindex lpr-headers-switches @r{(MS-DOS)}
- The commands @code{print-buffer} and @code{print-region} call the
-@code{pr} program, or use special switches to the @code{lpr} program, to
-produce headers on each printed page. MS-DOS and MS-Windows don't
-normally have these programs, so by default, the variable
-@code{lpr-headers-switches} is set so that the requests to print page
-headers are silently ignored. Thus, @code{print-buffer} and
-@code{print-region} produce the same output as @code{lpr-buffer} and
-@code{lpr-region}, respectively. If you do have a suitable @code{pr}
-program (for example, from GNU Textutils), set
-@code{lpr-headers-switches} to @code{nil}; Emacs will then call
-@code{pr} to produce the page headers, and print the resulting output as
-specified by @code{printer-name}.
-
-@vindex print-region-function @r{(MS-DOS)}
-@cindex lpr usage under MS-DOS
-@vindex lpr-command @r{(MS-DOS)}
-@vindex lpr-switches @r{(MS-DOS)}
- 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
-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.
-
-@findex ps-print-buffer @r{(MS-DOS)}
-@findex ps-spool-buffer @r{(MS-DOS)}
-@vindex ps-printer-name @r{(MS-DOS)}
-@vindex ps-lpr-command @r{(MS-DOS)}
-@vindex ps-lpr-switches @r{(MS-DOS)}
- A parallel set of variables, @code{ps-lpr-command},
-@code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{PostScript
-Variables,,,emacs, the Emacs Manual}), defines how PostScript files
-should be printed. These variables are used in the same way as the
-corresponding variables described above for non-PostScript printing.
-Thus, the value of @code{ps-printer-name} is used as the name of the
-device (or file) to which PostScript output is sent, just as
-@code{printer-name} is used for non-PostScript printing. (There are
-two distinct sets of variables in case you have two printers attached
-to two different ports, and only one of them is a PostScript printer.)
-
- 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
-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
-that need to be passed to the interpreter program are specified using
-@code{ps-lpr-switches}. (If the value of @code{ps-printer-name} is a
-string, it will be added to the list of switches as the value for the
-@code{-P} option. This is probably only useful if you are using
-@code{lpr}, so when using an interpreter typically you would set
-@code{ps-printer-name} to something other than a string so it is
-ignored.)
-
- For example, to use Ghostscript for printing on an Epson printer
-connected to the @samp{LPT2} port, put this in your @file{_emacs} file:
-
-@example
-(setq ps-printer-name t) ; Ghostscript doesn't understand -P
-(setq ps-lpr-command "c:/gs/gs386")
-(setq ps-lpr-switches '("-q" "-dNOPAUSE"
- "-sDEVICE=epson"
- "-r240x72"
- "-sOutputFile=LPT2"
- "-Ic:/gs"))
-@end example
-
-@noindent
-(This assumes that Ghostscript is installed in the @file{"c:/gs"}
-directory.)
-
@vindex dos-printer
@vindex dos-ps-printer
For backwards compatibility, the value of @code{dos-printer}
(@code{dos-ps-printer}), if it has a value, overrides the value of
-@code{printer-name} (@code{ps-printer-name}), on MS-DOS and MS-Windows
-only.
+@code{printer-name} (@code{ps-printer-name}), on MS-DOS.
@node MS-DOS and MULE