Variable: pr-txt-printer-alist

pr-txt-printer-alist is a customizable variable defined in printing.el.gz.

Value

((default "lpr" nil nil))

Documentation

Specify an alist of all text printers (text printer database).

The alist element has the form:

   (SYMBOL COMMAND SWITCHES NAME)

Where:

SYMBOL It's a symbol to identify a text printer. It's for
setting option pr-txt-name(var)/pr-txt-name(fun) and for menu selection.
Examples:
prt_06a
my_printer

COMMAND Name of the program for printing a text file. On MS-DOS and
MS-Windows systems, if the value is an empty string, then Emacs
will write directly to the printer port given by NAME (see text
below), that is, the NAME should be something like "PRN" or
"LPT1:".
If NAME is something like "\\\\\\\\host\\\\share-name" then
COMMAND shouldn't be an empty string.
The programs print and nprint (the standard print programs
on Windows NT and Novell Netware respectively) are handled
specially, using NAME as the destination for output; any other
program is treated like lpr except that an explicit filename
is given as the last argument.
If COMMAND is nil, it's used the default printing program:
print for Windows system, lp for lp system and lpr for
all other systems. See also pr-path-alist.
Examples:
"print"
"lpr"
"lp"

SWITCHES List of sexp's to pass as extra options for text printer
program. It is recommended to set NAME (see text below)
instead of including an explicit switch on this list.
Example:
. for lpr
("-#3" "-l")
nil

NAME A string that specifies a text printer name.
On Unix-like systems, a string value should be a name
understood by lpr's -P option (or lp's -d option).
On MS-DOS and MS-Windows systems, it is the name of a printer
device or port. Typical non-default settings would be "LPT1:"
to "LPT3:" for parallel printers, or "COM1" to "COM4" or
"AUX" for serial printers, or "\\\\\\\\hostname\\\\printer"
(or "/D:\\\\\\\\hostname\\\\printer") for a shared network
printer. You can also set it to a name of a file, in which
case the output gets appended to that file. If you want to
discard the printed output, set this to "NUL".
Examples:
. for print.exe
"/D:\\\\\\\\host\\\\share-name"
"LPT1:"
"PRN"

. for lpr or lp
"share-name"

This variable should be modified by customization engine. If this variable is modified by other means (for example, a Lisp function), use pr-update-menus function (see it for documentation) to update text printer menu.

Examples:

* On GNU or Unix system:

    ((prt_06a "lpr" nil "prt_06a")
     (prt_07c nil nil "prt_07c")
     )

* On Windows system:

    ((prt_06a "print" nil "/D:\\\\\\\\printers\\\\prt_06a")
     (prt_07c nil nil "/D:\\\\\\\\printers\\\\prt_07c")
     (PRN "" nil "PRN")
     (standard "redpr.exe" nil "")
     )

Useful links:

* Information about the print command (print.exe)
  https://www.computerhope.com/printhlp.htm

* RedMon - Redirection Port Monitor (redpr.exe)
  http://www.ghostgum.com.au/software/redmon.htm

* Redirection Port Monitor (redpr.exe on-line help)
  https://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm

* UNIX man pages: lpr (or type man lpr)
  https://linux.die.net/man/1/lpr-cups

* UNIX man pages: lp (or type man lp)
  https://linux.die.net/man/1/lp

Source Code

;; Defined in /usr/src/emacs/lisp/printing.el.gz
(defcustom pr-txt-printer-alist
  (list (list 'default lpr-command nil
	      (cond ((boundp 'printer-name) printer-name)
		    (lpr-windows-system "PRN")
		    (t nil)
		    )))
  ;; Examples:
  ;; * On GNU or Unix system:
  ;;    '((prt_06a "lpr" nil "prt_06a")
  ;;      (prt_07c nil   nil "prt_07c")
  ;;      )
  ;; * On Windows system:
  ;;    '((prt_06a  "print"     nil "/D:\\\\printers\\prt_06a")
  ;;      (prt_07c  nil         nil "/D:\\\\printers\\prt_07c")
  ;;      (PRN      ""          nil "PRN")
  ;;      (standard "redpr.exe" nil "")
  ;;      )
  "Specify an alist of all text printers (text printer database).

The alist element has the form:

   (SYMBOL COMMAND SWITCHES NAME)

Where:

SYMBOL		It's a symbol to identify a text printer.  It's for
		setting option `pr-txt-name' and for menu selection.
		Examples:
			prt_06a
			my_printer

COMMAND		Name of the program for printing a text file.  On MS-DOS and
		MS-Windows systems, if the value is an empty string, then Emacs
		will write directly to the printer port given by NAME (see text
		below), that is, the NAME should be something like \"PRN\" or
		\"LPT1:\".
		If NAME is something like \"\\\\\\\\host\\\\share-name\" then
		COMMAND shouldn't be an empty string.
		The programs `print' and `nprint' (the standard print programs
		on Windows NT and Novell Netware respectively) are handled
		specially, using NAME as the destination for output; any other
		program is treated like `lpr' except that an explicit filename
		is given as the last argument.
		If COMMAND is nil, it's used the default printing program:
		`print' for Windows system, `lp' for lp system and `lpr' for
		all other systems.  See also `pr-path-alist'.
		Examples:
			\"print\"
			\"lpr\"
			\"lp\"

SWITCHES	List of sexp's to pass as extra options for text printer
		program.  It is recommended to set NAME (see text below)
		instead of including an explicit switch on this list.
		Example:
		   . for lpr
			(\"-#3\" \"-l\")
			nil

NAME		A string that specifies a text printer name.
		On Unix-like systems, a string value should be a name
		understood by lpr's -P option (or lp's -d option).
		On MS-DOS and MS-Windows systems, it is the name of a printer
		device or port.  Typical non-default settings would be \"LPT1:\"
		to \"LPT3:\" for parallel printers, or \"COM1\" to \"COM4\" or
		\"AUX\" for serial printers, or \"\\\\\\\\hostname\\\\printer\"
		(or \"/D:\\\\\\\\hostname\\\\printer\") for a shared network
		printer.  You can also set it to a name of a file, in which
		case the output gets appended to that file.  If you want to
		discard the printed output, set this to \"NUL\".
		Examples:
		   . for print.exe
			\"/D:\\\\\\\\host\\\\share-name\"
			\"LPT1:\"
			\"PRN\"

		   . for lpr or lp
			\"share-name\"

This variable should be modified by customization engine.  If this variable is
modified by other means (for example, a Lisp function), use `pr-update-menus'
function (see it for documentation) to update text printer menu.

Examples:

* On GNU or Unix system:

    ((prt_06a \"lpr\" nil \"prt_06a\")
     (prt_07c nil   nil \"prt_07c\")
     )

* On Windows system:

    ((prt_06a  \"print\"     nil \"/D:\\\\\\\\printers\\\\prt_06a\")
     (prt_07c  nil         nil \"/D:\\\\\\\\printers\\\\prt_07c\")
     (PRN      \"\"          nil \"PRN\")
     (standard \"redpr.exe\" nil \"\")
     )

Useful links:

* Information about the print command (print.exe)
  `https://www.computerhope.com/printhlp.htm'

* RedMon - Redirection Port Monitor (redpr.exe)
  `http://www.ghostgum.com.au/software/redmon.htm'

* Redirection Port Monitor (redpr.exe on-line help)
  `https://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm'

* UNIX man pages: lpr (or type `man lpr')
  `https://linux.die.net/man/1/lpr-cups'

* UNIX man pages: lp (or type `man lp')
  `https://linux.die.net/man/1/lp'"
  :type '(repeat
	  (list :tag "Text Printer"
		(symbol :tag "Printer Symbol Name")
		(string :tag "Printer Command")
		(repeat :tag "Printer Switches"
			(sexp :tag "Switch" :value ""))
		(choice :menu-tag "Printer Name"
			:tag "Printer Name"
			(const :tag "None" nil)
			string)))
  :set 'pr-alist-custom-set)