aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Innes1999-01-17 19:08:32 +0000
committerAndrew Innes1999-01-17 19:08:32 +0000
commit9d9d68ed763748eabb342fe878a9de1fa74943fc (patch)
tree2eade38a98dcd4e6c989e1bf755db586c215bb23
parentca2565b0593d54f958c3737740643b619b0259bc (diff)
downloademacs-9d9d68ed763748eabb342fe878a9de1fa74943fc.tar.gz
emacs-9d9d68ed763748eabb342fe878a9de1fa74943fc.zip
(MS-DOS Printing): Rewrite section.
-rw-r--r--man/msdog.texi126
1 files changed, 81 insertions, 45 deletions
diff --git a/man/msdog.texi b/man/msdog.texi
index 624e9b3d791..a6ffcb848ec 100644
--- a/man/msdog.texi
+++ b/man/msdog.texi
@@ -353,89 +353,125 @@ previously with @code{add-untranslated-filesystem}.
353@section Printing and MS-DOS 353@section Printing and MS-DOS
354 354
355 Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and 355 Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and
356@code{ps-print-buffer} (@pxref{Postscript}) can work in MS-DOS by 356@code{ps-print-buffer} (@pxref{Postscript}) can work in MS-DOS and
357sending the output to one of the printer ports, if a Unix-style @code{lpr} 357MS-Windows by sending the output to one of the printer ports, if a
358program is unavailable. A few DOS-specific variables control how this 358Unix-style @code{lpr} program is unavailable. This behaviour is
359works. 359controlled by the same variables that control printing with @code{lpr}
360 360on Unix (@pxref{Hardcopy}, @pxref{Postscript Variables}), but the
361@vindex dos-printer 361defaults for these variables on MS-DOS and MS-Windows are not the same
362as the defaults on Unix.
363
364@vindex printer-name
362 If you want to use your local printer, printing on it in the usual DOS 365 If you want to use your local printer, printing on it in the usual DOS
363manner, then set the Lisp variable @code{dos-printer} to the name of the 366manner, then set the Lisp variable @code{lpr-command} to @code{""} (its
364printer port---for example, @code{"PRN"}, the usual local printer port 367default value) and @code{printer-name} to the name of the printer
365(that's the default), or @code{"LPT2"} or @code{"COM1"} for a serial 368port---for example, @code{"PRN"}, the usual local printer port (that's
366printer. You can also set @code{dos-printer} to a file name, in which 369the default), or @code{"LPT2"}, or @code{"COM1"} for a serial printer.
367case ``printed'' output is actually appended to that file. If you set 370You can also set @code{printer-name} to a file name, in which case
368@code{dos-printer} to @code{"NUL"}, printed output is silently 371``printed'' output is actually appended to that file. If you set
372@code{printer-name} to @code{"NUL"}, printed output is silently
369discarded (sent to the system null device). 373discarded (sent to the system null device).
370 374
371 If you set @code{dos-printer} to a file name, it's best to use an 375 On MS-Windows, when the Windows network software is installed, you can
376also use a printer shared by another machine by setting
377@code{printer-name} to the UNC share name for that printer--for example,
378@code{"//joes_pc/hp4si"}. (It doesn't matter whether you use forward
379slashes or backslashes here.) To find out the names of shared printers,
380run the command @samp{net view} at a DOS command prompt to obtain a list
381of servers, and @samp{net view server-name} to see the names of printers
382(and directories) shared by that server.
383
384 If you set @code{printer-name} to a file name, it's best to use an
372absolute file name. Emacs changes the working directory according to 385absolute file name. Emacs changes the working directory according to
373the default directory of the current buffer, so if the file name in 386the default directory of the current buffer, so if the file name in
374@code{dos-printer} is relative, you will end up with several such files, 387@code{printer-name} is relative, you will end up with several such
375each one in the directory of the buffer from which the printing was 388files, each one in the directory of the buffer from which the printing
376done. 389was done.
377 390
378@findex print-buffer @r{(MS-DOS)} 391@findex print-buffer @r{(MS-DOS)}
379@findex print-region @r{(MS-DOS)} 392@findex print-region @r{(MS-DOS)}
380@vindex lpr-headers-switches @r{(MS-DOS)} 393@vindex lpr-headers-switches @r{(MS-DOS)}
381 The commands @code{print-buffer} and @code{print-region} call the 394 The commands @code{print-buffer} and @code{print-region} call the
382@code{pr} program, or use special switches to the @code{lpr} program, to 395@code{pr} program, or use special switches to the @code{lpr} program, to
383produce headers on each printed page. MS-DOS doesn't normally have 396produce headers on each printed page. MS-DOS and MS-Windows don't
384these programs, so by default, the variable @code{lpr-headers-switches} 397normally have these programs, so by default, the variable
385is set so that the requests to print page headers are silently ignored. 398@code{lpr-headers-switches} is set so that the requests to print page
386Thus, @code{print-buffer} and @code{print-region} produce the same 399headers are silently ignored. Thus, @code{print-buffer} and
387output as @code{lpr-buffer} and @code{lpr-region}, respectively. If you 400@code{print-region} produce the same output as @code{lpr-buffer} and
388do have a suitable @code{pr} program (for example, from GNU Textutils), 401@code{lpr-region}, respectively. If you do have a suitable @code{pr}
389set @code{lpr-headers-switches} to @code{nil}; Emacs will then call 402program (for example, from GNU Textutils), set
403@code{lpr-headers-switches} to @code{nil}; Emacs will then call
390@code{pr} to produce the page headers, and print the resulting output as 404@code{pr} to produce the page headers, and print the resulting output as
391specified by @code{dos-printer}. 405specified by @code{printer-name}.
392 406
393@vindex print-region-function @r{(MS-DOS)} 407@vindex print-region-function @r{(MS-DOS)}
394@cindex lpr usage under MS-DOS 408@cindex lpr usage under MS-DOS
395@vindex lpr-command @r{(MS-DOS)} 409@vindex lpr-command @r{(MS-DOS)}
396@vindex lpr-switches @r{(MS-DOS)} 410@vindex lpr-switches @r{(MS-DOS)}
397 Finally, if you do have an @code{lpr} work-alike, you can set 411 Finally, if you do have an @code{lpr} work-alike, you can set the
398@code{print-region-function} to @code{nil}. Then Emacs uses @code{lpr} 412variable @code{lpr-command} to @code{"lpr"}. Then Emacs will use
399for printing, as on other systems. (If the name of the program isn't 413@code{lpr} for printing, as on other systems. (If the name of the
400@code{lpr}, set the @code{lpr-command} variable to specify where to find 414program isn't @code{lpr}, set @code{lpr-command} to specify where to
401it.) 415find it.) The variable @code{lpr-switches} has its standard meaning
416when @code{lpr-command} is not @code{""}. If the variable
417@code{printer-name} has a string value, it is used as the value for the
418@code{-P} option to @code{lpr}, as on Unix.
402 419
403@findex ps-print-buffer @r{(MS-DOS)} 420@findex ps-print-buffer @r{(MS-DOS)}
404@findex ps-spool-buffer @r{(MS-DOS)} 421@findex ps-spool-buffer @r{(MS-DOS)}
405@vindex dos-ps-printer 422@vindex ps-printer-name
406@vindex ps-lpr-command @r{(MS-DOS)} 423@vindex ps-lpr-command @r{(MS-DOS)}
407@vindex ps-lpr-switches @r{(MS-DOS)} 424@vindex ps-lpr-switches @r{(MS-DOS)}
408 A separate variable, @code{dos-ps-printer}, defines how PostScript 425 A parallel set of variables, @code{ps-lpr-command},
409files should be printed. If its value is a string, it is used as the 426@code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{Postscript
410name of the device (or file) to which PostScript output is sent, just as 427variables}), defines how PostScript files should be printed. These
411@code{dos-printer} is used for non-PostScript printing. (These are two 428variables are used in the same way as the corresponding variables
412distinct variables in case you have two printers attached to two 429described above for non-PostScript printing. Thus, the value of
413different ports, and only one of them is a PostScript printer.) If the 430@code{ps-printer-name} is used as the name of the device (or file) to
414value of @code{dos-ps-printer} is not a string, then the variables 431which PostScript output is sent, just as @code{printer-name} is used for
415@code{ps-lpr-command} and @code{ps-lpr-switches} (@pxref{Postscript}) 432non-PostScript printing. (There are two distinct sets of variables in
416control how to print PostScript files. Thus, if you have a 433case you have two printers attached to two different ports, and only one
417non-PostScript printer, you can set these variables to the name and the 434of them is a PostScript printer.)
418switches appropriate for a PostScript interpreter program (such as 435
419Ghostscript). 436 The default value of the variable @code{ps-lpr-command} is @code{""},
437which causes PostScript output to be sent to the printer port specified
438by @code{ps-printer-name}, but @code{ps-lpr-command} can also be set to
439the name of a program which will accept PostScript files. Thus, if you
440have a non-PostScript printer, you can set this variable to the name of
441a PostScript interpreter program (such as Ghostscript). Any switches
442that need to be passed to the interpreter program are specified using
443@code{ps-lpr-switches}. (If the value of @code{ps-printer-name} is a
444string, it will be added to the list of switches as the value for the
445@code{-P} option. This is probably only useful if you are using
446@code{lpr}, so when using an interpreter typically you would set
447@code{ps-printer-name} to something other than a string so it is
448ignored.)
420 449
421 For example, to use Ghostscript for printing on an Epson printer 450 For example, to use Ghostscript for printing on an Epson printer
422connected to @samp{LPT2} port, put this on your @file{.emacs} file: 451connected to @samp{LPT2} port, put this on your @file{.emacs} file:
423 452
424@example 453@example
425(setq dos-ps-printer t) ; @r{Anything but a string.} 454(setq ps-printer-name t) ; Ghostscript doesn't understand -P
426(setq ps-lpr-command "c:/gs/gs386") 455(setq ps-lpr-command "c:/gs/gs386")
427(setq ps-lpr-switches '("-q" "-dNOPAUSE" 456(setq ps-lpr-switches '("-q" "-dNOPAUSE"
428 "-sDEVICE=epson" 457 "-sDEVICE=epson"
429 "-r240x72" 458 "-r240x72"
430 "-sOutputFile=LPT2" 459 "-sOutputFile=LPT2"
431 "-Ic:/gs" 460 "-Ic:/gs"))
432 "-"))
433@end example 461@end example
434 462
435@noindent 463@noindent
436(This assumes that Ghostscript is installed in the @file{"c:/gs"} 464(This assumes that Ghostscript is installed in the @file{"c:/gs"}
437directory.) 465directory.)
438 466
467@vindex dos-printer
468@vindex dos-ps-printer
469 For backwards compatibility, the value of @code{dos-printer}
470(@code{dos-ps-printer}), if it has a value, overrides the value of
471@code{printer-name} (@code{ps-printer-name}), on MS-DOS and MS-Windows
472only.
473
474
439@node MS-DOS and MULE 475@node MS-DOS and MULE
440@section International Support on MS-DOS 476@section International Support on MS-DOS
441@cindex international support @r{(MS-DOS)} 477@cindex international support @r{(MS-DOS)}