1 |
;;; printing.el --- printing utilities |
;;; printing.el --- printing utilities |
2 |
|
|
3 |
;; Copyright (C) 2000, 2001, 2002, 2003, 2004 |
;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 |
4 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
7 |
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
8 |
;; Time-stamp: <2004/11/21 20:56:53 vinicius> |
;; Time-stamp: <2005/06/11 19:51:32 vinicius> |
9 |
;; Keywords: wp, print, PostScript |
;; Keywords: wp, print, PostScript |
10 |
;; Version: 6.8.3 |
;; Version: 6.8.4 |
11 |
;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ |
;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ |
12 |
|
|
13 |
(defconst pr-version "6.8.3" |
(defconst pr-version "6.8.4" |
14 |
"printing.el, v 6.8.3 <2004/11/17 vinicius> |
"printing.el, v 6.8.4 <2005/06/11 vinicius> |
15 |
|
|
16 |
Please send all bug fixes and enhancements to |
Please send all bug fixes and enhancements to |
17 |
Vinicius Jose Latorre <viniciusjl@ig.com.br> |
Vinicius Jose Latorre <viniciusjl@ig.com.br> |
143 |
;; One way to set variables is by calling `pr-customize', customize all |
;; One way to set variables is by calling `pr-customize', customize all |
144 |
;; variables and save the customization by future sessions (see Options |
;; variables and save the customization by future sessions (see Options |
145 |
;; section). Other way is by coding your settings on Emacs init file (that is, |
;; section). Other way is by coding your settings on Emacs init file (that is, |
146 |
;; .emacs file), see below for a first setting template that it should be |
;; ~/.emacs file), see below for a first setting template that it should be |
147 |
;; inserted on your ~/.emacs file (or c:/_emacs, if you're using Windows 9x/NT |
;; inserted on your ~/.emacs file (or c:/_emacs, if you're using Windows 9x/NT |
148 |
;; or MS-DOS): |
;; or MS-DOS): |
149 |
;; |
;; |
259 |
;; PostScript printer. So, please, don't include this printer in |
;; PostScript printer. So, please, don't include this printer in |
260 |
;; `pr-txt-printer-alist' (which see). |
;; `pr-txt-printer-alist' (which see). |
261 |
;; |
;; |
262 |
;; 5. Use gsprint instead of ghostscript to print monochrome PostScript files |
;; 5. You can use gsprint instead of ghostscript to print monochrome PostScript |
263 |
;; in Windows. The gsprint utility is faster than ghostscript to print |
;; files in Windows. The gsprint utility documentation says that it is more |
264 |
;; monochrome PostScript. |
;; efficient than ghostscript to print monochrome PostScript. |
265 |
;; |
;; |
266 |
;; To print non-monochrome PostScript file, the efficiency of ghostscript |
;; To print non-monochrome PostScript file, the efficiency of ghostscript |
267 |
;; is similar to gsprint. |
;; is similar to gsprint. |
271 |
;; For more information about gsprint see |
;; For more information about gsprint see |
272 |
;; `http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. |
;; `http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. |
273 |
;; |
;; |
274 |
|
;; As an example of gsprint declaration: |
275 |
|
;; |
276 |
|
;; (setq pr-ps-printer-alist |
277 |
|
;; '((A "gsprint" ("-all" "-twoup") "-printer " "my-b/w-printer-name") |
278 |
|
;; (B "gsprint" ("-all" "-twoup") nil "-printer my-b/w-printer-name") |
279 |
|
;; ;; some other printer declaration |
280 |
|
;; )) |
281 |
|
;; |
282 |
|
;; The example above declares that printer A prints all pages (-all) and two |
283 |
|
;; pages per sheet (-twoup). The printer B declaration does the same as the |
284 |
|
;; printer A declaration, the only difference is the printer name selection. |
285 |
|
;; |
286 |
|
;; There are other command line options like: |
287 |
|
;; |
288 |
|
;; -mono Render in monochrome as 1bit/pixel (only black and white). |
289 |
|
;; -grey Render in greyscale as 8bits/pixel. |
290 |
|
;; -color Render in color as 24bits/pixel. |
291 |
|
;; |
292 |
|
;; The default is `-mono'. So, printer A and B in the example above are |
293 |
|
;; using implicitly the `-mono' option. Note that in `-mono' no gray tone |
294 |
|
;; or color is printed, this includes the zebra stripes, that is, in `-mono' |
295 |
|
;; the zebra stripes are not printed. |
296 |
|
;; |
297 |
|
;; See also documentation for `pr-ps-printer-alist'. |
298 |
|
;; |
299 |
;; |
;; |
300 |
;; Using `printing' |
;; Using `printing' |
301 |
;; ---------------- |
;; ---------------- |
304 |
;; using Windows 9x/NT or MS-DOS): |
;; using Windows 9x/NT or MS-DOS): |
305 |
;; |
;; |
306 |
;; (require 'printing) |
;; (require 'printing) |
307 |
|
;; ;; ...some user settings... |
308 |
|
;; (pr-update-menus t) |
309 |
;; |
;; |
310 |
;; When `printing' is loaded: |
;; During `pr-update-menus' evaluation: |
311 |
;; * On Emacs 20: |
;; * On Emacs 20: |
312 |
;; it replaces the Tools/Print menu by Tools/Printing menu. |
;; it replaces the Tools/Print menu by Tools/Printing menu. |
313 |
;; * On Emacs 21: |
;; * On Emacs 21: |
912 |
;; (lps_06b "print" nil nil "\\\\printers\\lps_06b") |
;; (lps_06b "print" nil nil "\\\\printers\\lps_06b") |
913 |
;; (lps_07c "print" nil "" "/D:\\\\printers\\lps_07c") |
;; (lps_07c "print" nil "" "/D:\\\\printers\\lps_07c") |
914 |
;; (lps_08c nil nil nil "\\\\printers\\lps_08c") |
;; (lps_08c nil nil nil "\\\\printers\\lps_08c") |
915 |
|
;; (b/w "gsprint" ("-all" "-twoup") "-printer " "b/w-pr-name") |
916 |
;; (LPT1 "" nil "" "LPT1:") |
;; (LPT1 "" nil "" "LPT1:") |
917 |
;; (PRN "" nil "" "PRN") |
;; (PRN "" nil "" "PRN") |
918 |
;; (standard "redpr.exe" nil "" "") |
;; (standard "redpr.exe" nil "" "") |
951 |
;; |
;; |
952 |
;; `pr-update-menus' Update utility, PostScript and text printer menus. |
;; `pr-update-menus' Update utility, PostScript and text printer menus. |
953 |
;; |
;; |
954 |
|
;; `pr-menu-bind' Install `printing' menu in the menubar. |
955 |
|
;; |
956 |
|
;; |
957 |
;; Below are some URL where you can find good utilities. |
;; Below are some URL where you can find good utilities. |
958 |
;; |
;; |
959 |
;; * For `printing' package: |
;; * For `printing' package: |
965 |
;; |
;; |
966 |
;; gs, gv `http://www.gnu.org/software/ghostscript/ghostscript.html' |
;; gs, gv `http://www.gnu.org/software/ghostscript/ghostscript.html' |
967 |
;; enscript `http://people.ssh.fi/mtr/genscript/' |
;; enscript `http://people.ssh.fi/mtr/genscript/' |
968 |
;; psnup `http://www.dcs.ed.ac.uk/home/ajcd/psutils/index.html' |
;; psnup `http://www.knackered.org/angus/psutils/' |
969 |
;; mpage `http://www.mesa.nl/pub/mpage/' |
;; mpage `http://www.mesa.nl/pub/mpage/' |
970 |
;; |
;; |
971 |
;; * For Windows system: |
;; * For Windows system: |
974 |
;; `http://www.gnu.org/software/ghostscript/ghostscript.html' |
;; `http://www.gnu.org/software/ghostscript/ghostscript.html' |
975 |
;; gsprint `http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. |
;; gsprint `http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. |
976 |
;; enscript `http://people.ssh.fi/mtr/genscript/' |
;; enscript `http://people.ssh.fi/mtr/genscript/' |
977 |
;; psnup `http://www.dcs.ed.ac.uk/home/ajcd/psutils/index.html' |
;; psnup `http://gnuwin32.sourceforge.net/packages/psutils.htm' |
978 |
;; redmon `http://www.cs.wisc.edu/~ghost/redmon/' |
;; redmon `http://www.cs.wisc.edu/~ghost/redmon/' |
979 |
;; |
;; |
980 |
;; |
;; |
1431 |
(prt_07c nil nil \"/D:\\\\\\\\printers\\\\prt_07c\") |
(prt_07c nil nil \"/D:\\\\\\\\printers\\\\prt_07c\") |
1432 |
(PRN \"\" nil \"PRN\") |
(PRN \"\" nil \"PRN\") |
1433 |
(standard \"redpr.exe\" nil \"\") |
(standard \"redpr.exe\" nil \"\") |
1434 |
)" |
) |
1435 |
|
|
1436 |
|
Useful links: |
1437 |
|
|
1438 |
|
* Information about the print command (print.exe) |
1439 |
|
`http://www.computerhope.com/printhlp.htm' |
1440 |
|
|
1441 |
|
* RedMon - Redirection Port Monitor (redpr.exe) |
1442 |
|
`http://www.cs.wisc.edu/~ghost/redmon/index.htm' |
1443 |
|
|
1444 |
|
* Redirection Port Monitor (redpr.exe on-line help) |
1445 |
|
`http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm' |
1446 |
|
|
1447 |
|
* UNIX man pages: lpr (or type `man lpr') |
1448 |
|
`http://bama.ua.edu/cgi-bin/man-cgi?lpr' |
1449 |
|
`http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lpr' |
1450 |
|
|
1451 |
|
* UNIX man pages: lp (or type `man lp') |
1452 |
|
`http://bama.ua.edu/cgi-bin/man-cgi?lp' |
1453 |
|
`http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lp' |
1454 |
|
" |
1455 |
:type '(repeat |
:type '(repeat |
1456 |
(list :tag "Text Printer" |
(list :tag "Text Printer" |
1457 |
(symbol :tag "Printer Symbol Name") |
(symbol :tag "Printer Symbol Name") |
1499 |
;; (lps_06b "print" nil nil "\\\\printers\\lps_06b") |
;; (lps_06b "print" nil nil "\\\\printers\\lps_06b") |
1500 |
;; (lps_07c "print" nil "" "/D:\\\\printers\\lps_07c") |
;; (lps_07c "print" nil "" "/D:\\\\printers\\lps_07c") |
1501 |
;; (lps_08c nil nil nil "\\\\printers\\lps_08c") |
;; (lps_08c nil nil nil "\\\\printers\\lps_08c") |
1502 |
|
;; (b/w "gsprint" ("-all" "-twoup") "-printer " "b/w-pr-name") |
1503 |
;; (LPT1 "" nil "" "LPT1:") |
;; (LPT1 "" nil "" "LPT1:") |
1504 |
;; (PRN "" nil "" "PRN") |
;; (PRN "" nil "" "PRN") |
1505 |
;; (standard "redpr.exe" nil "" "") |
;; (standard "redpr.exe" nil "" "") |
1538 |
\"lpr\" |
\"lpr\" |
1539 |
\"lp\" |
\"lp\" |
1540 |
\"cp\" |
\"cp\" |
1541 |
|
\"gsprint\" |
1542 |
|
|
1543 |
SWITCHES List of sexp's to pass as extra options for PostScript printer |
SWITCHES List of sexp's to pass as extra options for PostScript printer |
1544 |
program. It is recommended to set NAME (see text below) |
program. It is recommended to set NAME (see text below) |
1548 |
'(\"-#3\" \"-l\") |
'(\"-#3\" \"-l\") |
1549 |
nil |
nil |
1550 |
|
|
1551 |
|
. for gsprint.exe |
1552 |
|
'(\"-all\" \"-twoup\") |
1553 |
|
|
1554 |
PRINTER-SWITCH A string that specifies PostScript printer name switch. If |
PRINTER-SWITCH A string that specifies PostScript printer name switch. If |
1555 |
it's necessary to have a space between PRINTER-SWITCH and NAME, |
it's necessary to have a space between PRINTER-SWITCH and NAME, |
1556 |
it should be inserted at the end of PRINTER-SWITCH string. |
it should be inserted at the end of PRINTER-SWITCH string. |
1567 |
. for print.exe |
. for print.exe |
1568 |
\"/D:\" |
\"/D:\" |
1569 |
|
|
1570 |
|
. for gsprint.exe |
1571 |
|
\"-printer \" |
1572 |
|
|
1573 |
NAME A string that specifies a PostScript printer name. |
NAME A string that specifies a PostScript printer name. |
1574 |
On Unix-like systems, a string value should be a name |
On Unix-like systems, a string value should be a name |
1575 |
understood by lpr's -P option (or lp's -d option). |
understood by lpr's -P option (or lp's -d option). |
1585 |
. for cp.exe |
. for cp.exe |
1586 |
\"\\\\\\\\host\\\\share-name\" |
\"\\\\\\\\host\\\\share-name\" |
1587 |
|
|
1588 |
. for print.exe |
. for print.exe or gsprint.exe |
1589 |
\"/D:\\\\\\\\host\\\\share-name\" |
\"/D:\\\\\\\\host\\\\share-name\" |
1590 |
\"\\\\\\\\host\\\\share-name\" |
\"\\\\\\\\host\\\\share-name\" |
1591 |
\"LPT1:\" |
\"LPT1:\" |
1634 |
(lps_06b \"print\" nil nil \"\\\\\\\\printers\\\\lps_06b\") |
(lps_06b \"print\" nil nil \"\\\\\\\\printers\\\\lps_06b\") |
1635 |
(lps_07c \"print\" nil \"\" \"/D:\\\\\\\\printers\\\\lps_07c\") |
(lps_07c \"print\" nil \"\" \"/D:\\\\\\\\printers\\\\lps_07c\") |
1636 |
(lps_08c nil nil nil \"\\\\\\\\printers\\\\lps_08c\") |
(lps_08c nil nil nil \"\\\\\\\\printers\\\\lps_08c\") |
1637 |
|
(b/w1 \"gsprint\" (\"-all\" \"-twoup\") \"-printer \" \"b/w-pr-name\") |
1638 |
|
(b/w2 \"gsprint\" (\"-all\" \"-twoup\") nil \"-printer \\\\\\\\printers\\\\lps_06a\") |
1639 |
(LPT1 \"\" nil \"\" \"LPT1:\") |
(LPT1 \"\" nil \"\" \"LPT1:\") |
1640 |
(PRN \"\" nil \"\" \"PRN\") |
(PRN \"\" nil \"\" \"PRN\") |
1641 |
(standard \"redpr.exe\" nil \"\" \"\") |
(standard \"redpr.exe\" nil \"\" \"\") |
1642 |
)" |
) |
1643 |
|
|
1644 |
|
|
1645 |
|
gsprint: |
1646 |
|
|
1647 |
|
You can use gsprint instead of ghostscript to print monochrome PostScript files |
1648 |
|
in Windows. The gsprint utility documentation says that it is more efficient |
1649 |
|
than ghostscript to print monochrome PostScript. |
1650 |
|
|
1651 |
|
To print non-monochrome PostScript file, the efficiency of ghostscript is |
1652 |
|
similar to gsprint. |
1653 |
|
|
1654 |
|
Also the gsprint utility comes together with gsview distribution. |
1655 |
|
|
1656 |
|
As an example of gsprint declaration: |
1657 |
|
|
1658 |
|
(setq pr-ps-printer-alist |
1659 |
|
'((A \"gsprint\" (\"-all\" \"-twoup\") \"-printer \" \"lps_015\") |
1660 |
|
(B \"gsprint\" (\"-all\" \"-twoup\") nil \"-printer lps_015\") |
1661 |
|
;; some other printer declaration |
1662 |
|
)) |
1663 |
|
|
1664 |
|
The example above declares that printer A prints all pages (-all) and two pages |
1665 |
|
per sheet (-twoup). The printer B declaration does the same as the printer A |
1666 |
|
declaration, the only difference is the printer name selection. |
1667 |
|
|
1668 |
|
There are other command line options like: |
1669 |
|
|
1670 |
|
-mono Render in monochrome as 1bit/pixel (only black and white). |
1671 |
|
-grey Render in greyscale as 8bits/pixel. |
1672 |
|
-color Render in color as 24bits/pixel. |
1673 |
|
|
1674 |
|
The default is `-mono'. So, printer A and B in the example above are using |
1675 |
|
implicitly the `-mono' option. Note that in `-mono' no gray tone or color is |
1676 |
|
printed, this includes the zebra stripes, that is, in `-mono' the zebra stripes |
1677 |
|
are not printed. |
1678 |
|
|
1679 |
|
|
1680 |
|
Useful links: |
1681 |
|
|
1682 |
|
* GSPRINT - Ghostscript print to Windows printer |
1683 |
|
`http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm' |
1684 |
|
|
1685 |
|
* Introduction to Ghostscript |
1686 |
|
`http://www.cs.wisc.edu/~ghost/doc/intro.htm' |
1687 |
|
|
1688 |
|
* How to use Ghostscript |
1689 |
|
`http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' |
1690 |
|
|
1691 |
|
* Information about the print command (print.exe) |
1692 |
|
`http://www.computerhope.com/printhlp.htm' |
1693 |
|
|
1694 |
|
* RedMon - Redirection Port Monitor (redpr.exe) |
1695 |
|
`http://www.cs.wisc.edu/~ghost/redmon/index.htm' |
1696 |
|
|
1697 |
|
* Redirection Port Monitor (redpr.exe on-line help) |
1698 |
|
`http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm' |
1699 |
|
|
1700 |
|
* UNIX man pages: lpr (or type `man lpr') |
1701 |
|
`http://bama.ua.edu/cgi-bin/man-cgi?lpr' |
1702 |
|
`http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lpr' |
1703 |
|
|
1704 |
|
* UNIX man pages: lp (or type `man lp') |
1705 |
|
`http://bama.ua.edu/cgi-bin/man-cgi?lp' |
1706 |
|
`http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lp' |
1707 |
|
|
1708 |
|
* GNU utilities for Win32 (cp.exe) |
1709 |
|
`http://unxutils.sourceforge.net/' |
1710 |
|
" |
1711 |
:type '(repeat |
:type '(repeat |
1712 |
(list |
(list |
1713 |
:tag "PostScript Printer" |
:tag "PostScript Printer" |
1803 |
"gv") |
"gv") |
1804 |
"*Specify path and name of the gsview/gv utility. |
"*Specify path and name of the gsview/gv utility. |
1805 |
|
|
1806 |
See also `pr-path-alist'." |
See also `pr-path-alist'. |
1807 |
|
|
1808 |
|
Useful links: |
1809 |
|
|
1810 |
|
* GNU gv manual |
1811 |
|
`http://www.gnu.org/software/gv/manual/gv.html' |
1812 |
|
|
1813 |
|
* GSview Help |
1814 |
|
`http://www.cs.wisc.edu/~ghost/gsview/gsviewen.htm' |
1815 |
|
|
1816 |
|
* GSview Help - Common Problems |
1817 |
|
`http://www.cs.wisc.edu/~ghost/gsview/gsviewen.htm#Common_Problems' |
1818 |
|
|
1819 |
|
* GSview Readme (compilation & installation) |
1820 |
|
`http://www.cs.wisc.edu/~ghost/gsview/Readme.htm' |
1821 |
|
|
1822 |
|
* GSview (main site) |
1823 |
|
`http://www.cs.wisc.edu/~ghost/gsview/index.htm' |
1824 |
|
|
1825 |
|
* Ghostscript, Ghostview and GSview |
1826 |
|
`http://www.cs.wisc.edu/~ghost/' |
1827 |
|
|
1828 |
|
* Ghostview |
1829 |
|
`http://www.cs.wisc.edu/~ghost/gv/index.htm' |
1830 |
|
|
1831 |
|
* gv 3.5, June 1997 |
1832 |
|
`http://www.cs.wisc.edu/~ghost/gv/gv_doc/gv.html' |
1833 |
|
|
1834 |
|
* MacGSView (MacOS) |
1835 |
|
`http://www.cs.wisc.edu/~ghost/macos/index.htm' |
1836 |
|
" |
1837 |
:type '(string :tag "Ghostview Utility") |
:type '(string :tag "Ghostview Utility") |
1838 |
:version "20" |
:version "20" |
1839 |
:group 'printing) |
:group 'printing) |
1845 |
"gs") |
"gs") |
1846 |
"*Specify path and name of the ghostscript utility. |
"*Specify path and name of the ghostscript utility. |
1847 |
|
|
1848 |
See also `pr-path-alist'." |
See also `pr-path-alist'. |
1849 |
|
|
1850 |
|
Useful links: |
1851 |
|
|
1852 |
|
* Ghostscript, Ghostview and GSview |
1853 |
|
`http://www.cs.wisc.edu/~ghost/' |
1854 |
|
|
1855 |
|
* Introduction to Ghostscript |
1856 |
|
`http://www.cs.wisc.edu/~ghost/doc/intro.htm' |
1857 |
|
|
1858 |
|
* How to use Ghostscript |
1859 |
|
`http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' |
1860 |
|
|
1861 |
|
* Printer compatibility |
1862 |
|
`http://www.cs.wisc.edu/~ghost/doc/printer.htm' |
1863 |
|
" |
1864 |
:type '(string :tag "Ghostscript Utility") |
:type '(string :tag "Ghostscript Utility") |
1865 |
:version "20" |
:version "20" |
1866 |
:group 'printing) |
:group 'printing) |
1891 |
- for full documentation, see in a browser the file |
- for full documentation, see in a browser the file |
1892 |
c:/gstools/gs5.50/index.html, that is, the file index.html which is |
c:/gstools/gs5.50/index.html, that is, the file index.html which is |
1893 |
located in the same directory as gswin32.exe. |
located in the same directory as gswin32.exe. |
1894 |
- for brief documentation, type: gswin32.exe -h" |
- for brief documentation, type: gswin32.exe -h |
1895 |
|
|
1896 |
|
Useful links: |
1897 |
|
|
1898 |
|
* Introduction to Ghostscript |
1899 |
|
`http://www.cs.wisc.edu/~ghost/doc/intro.htm' |
1900 |
|
|
1901 |
|
* How to use Ghostscript |
1902 |
|
`http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' |
1903 |
|
|
1904 |
|
* Printer compatibility |
1905 |
|
`http://www.cs.wisc.edu/~ghost/doc/printer.htm' |
1906 |
|
" |
1907 |
:type '(repeat (string :tag "Ghostscript Switch")) |
:type '(repeat (string :tag "Ghostscript Switch")) |
1908 |
:version "20" |
:version "20" |
1909 |
:group 'printing) |
:group 'printing) |
2370 |
|
|
2371 |
'((psnup \"c:/psutils/psnup\" (\"-q\") \"-P%s\" \"-%d\" \"-l\" nil nil \" \" |
'((psnup \"c:/psutils/psnup\" (\"-q\") \"-P%s\" \"-%d\" \"-l\" nil nil \" \" |
2372 |
nil (pr-file-duplex . nil) (pr-file-tumble . nil)) |
nil (pr-file-duplex . nil) (pr-file-tumble . nil)) |
2373 |
)" |
) |
2374 |
|
|
2375 |
|
Useful links: |
2376 |
|
|
2377 |
|
* mpage download (GNU or Unix) |
2378 |
|
`http://www.mesa.nl/pub/mpage/' |
2379 |
|
|
2380 |
|
* mpage documentation (GNU or Unix - or type `man mpage') |
2381 |
|
`http://www.cs.umd.edu/faq/guides/manual_unix/node48.html' |
2382 |
|
`http://www.rt.com/man/mpage.1.html' |
2383 |
|
|
2384 |
|
* psnup (Windows, GNU or Unix) |
2385 |
|
`http://www.knackered.org/angus/psutils/' |
2386 |
|
`http://gershwin.ens.fr/vdaniel/Doc-Locale/Outils-Gnu-Linux/PsUtils/' |
2387 |
|
|
2388 |
|
* psnup (PsUtils for Windows) |
2389 |
|
`http://gnuwin32.sourceforge.net/packages/psutils.htm' |
2390 |
|
|
2391 |
|
* psnup documentation (GNU or Unix - or type `man psnup') |
2392 |
|
`http://linux.about.com/library/cmd/blcmdl1_psnup.htm' |
2393 |
|
`http://amath.colorado.edu/computing/software/man/psnup.html' |
2394 |
|
|
2395 |
|
* GNU Enscript (Windows, GNU or Unix) |
2396 |
|
`http://people.ssh.com/mtr/genscript/' |
2397 |
|
|
2398 |
|
* GNU Enscript documentation (Windows, GNU or Unix) |
2399 |
|
`http://people.ssh.com/mtr/genscript/enscript.man.html' |
2400 |
|
(on GNU or Unix, type `man enscript') |
2401 |
|
" |
2402 |
:type '(repeat |
:type '(repeat |
2403 |
(list :tag "PS File Utility" |
(list :tag "PS File Utility" |
2404 |
(symbol :tag "Utility Symbol") |
(symbol :tag "Utility Symbol") |
3059 |
))) |
))) |
3060 |
|
|
3061 |
|
|
3062 |
(cond |
(defvar pr-menu-print-item "print" |
3063 |
((featurep 'xemacs) ; XEmacs |
"Non-nil means that menu binding was not done. |
|
;; Menu binding |
|
|
(pr-xemacs-global-menubar |
|
|
(pr-x-add-submenu nil (cons "Printing" pr-menu-spec) "Apps"))) |
|
3064 |
|
|
3065 |
|
Used by `pr-menu-bind' and `pr-update-menus'.") |
3066 |
|
|
3067 |
(t ; GNU Emacs |
|
3068 |
;; Menu binding |
(defun pr-menu-bind () |
3069 |
(require 'easymenu) |
"Install `printing' menu in the menubar. |
3070 |
;; Replace existing "print" item by "Printing" item. |
|
3071 |
;; If you're changing this file, you'll load it a second, |
On Emacs 20, it replaces the Tools/Print menu by Tools/Printing menu. |
3072 |
;; third... time, but "print" item exists only in the first load. |
|
3073 |
(defvar pr-menu-print-item "print") |
On Emacs 21 and 22, it replaces the File/Print* menu entries by File/Print |
3074 |
|
menu. |
3075 |
|
|
3076 |
|
Calls `pr-update-menus' to adjust menus." |
3077 |
|
(interactive) |
3078 |
(cond |
(cond |
3079 |
;; Emacs 20 |
((featurep 'xemacs) ; XEmacs |
3080 |
((string< emacs-version "21.") |
;; Menu binding |
3081 |
(easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item) |
(pr-xemacs-global-menubar |
3082 |
(when pr-menu-print-item |
(pr-x-add-submenu nil (cons "Printing" pr-menu-spec) "Apps")) |
3083 |
(easy-menu-remove-item nil '("tools") pr-menu-print-item) |
(setq pr-menu-print-item nil)) |
3084 |
(setq pr-menu-print-item nil |
|
3085 |
pr-menu-bar (vector 'menu-bar 'tools |
|
3086 |
(pr-get-symbol "Printing"))))) |
(t ; GNU Emacs |
3087 |
;; Emacs 21 |
;; Menu binding |
3088 |
(pr-menu-print-item |
(require 'easymenu) |
3089 |
(easy-menu-change '("file") "Print" pr-menu-spec "print-buffer") |
;; Replace existing "print" item by "Printing" item. |
3090 |
(let ((items '("print-buffer" "print-region" |
;; If you're changing this file, you'll load it a second, |
3091 |
"ps-print-buffer-faces" "ps-print-region-faces" |
;; third... time, but "print" item exists only in the first load. |
3092 |
"ps-print-buffer" "ps-print-region"))) |
(cond |
3093 |
(while items |
;; Emacs 20 |
3094 |
(easy-menu-remove-item nil '("file") (car items)) |
((string< emacs-version "21.") |
3095 |
(setq items (cdr items))) |
(easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item) |
3096 |
(setq pr-menu-print-item nil |
(when pr-menu-print-item |
3097 |
pr-menu-bar (vector 'menu-bar 'file |
(easy-menu-remove-item nil '("tools") pr-menu-print-item) |
3098 |
(pr-get-symbol "Print"))))) |
(setq pr-menu-print-item nil |
3099 |
(t |
pr-menu-bar (vector 'menu-bar 'tools |
3100 |
(easy-menu-change '("file") "Print" pr-menu-spec))))) |
(pr-get-symbol "Printing"))))) |
3101 |
|
;; Emacs 21 & 22 |
3102 |
|
(t |
3103 |
|
(let* ((has-file (lookup-key global-map (vector 'menu-bar 'file))) |
3104 |
|
(item-file (if has-file '("file") '("files")))) |
3105 |
|
(cond |
3106 |
|
(pr-menu-print-item |
3107 |
|
(easy-menu-change item-file "Print" pr-menu-spec "print-buffer") |
3108 |
|
(let ((items '("print-buffer" "print-region" |
3109 |
|
"ps-print-buffer-faces" "ps-print-region-faces" |
3110 |
|
"ps-print-buffer" "ps-print-region"))) |
3111 |
|
(while items |
3112 |
|
(easy-menu-remove-item nil item-file (car items)) |
3113 |
|
(setq items (cdr items))) |
3114 |
|
(setq pr-menu-print-item nil |
3115 |
|
pr-menu-bar (vector 'menu-bar |
3116 |
|
(if has-file 'file 'files) |
3117 |
|
(pr-get-symbol "Print"))))) |
3118 |
|
(t |
3119 |
|
(easy-menu-change item-file "Print" pr-menu-spec)))))))) |
3120 |
|
(pr-update-menus t)) |
3121 |
|
|
3122 |
|
|
3123 |
;; Key binding |
;; Key binding |
4948 |
otherwise, update PostScript printer menu iff `pr-ps-printer-menu-modified' is |
otherwise, update PostScript printer menu iff `pr-ps-printer-menu-modified' is |
4949 |
non-nil, update text printer menu iff `pr-txt-printer-menu-modified' is |
non-nil, update text printer menu iff `pr-txt-printer-menu-modified' is |
4950 |
non-nil, and update PostScript File menus iff `pr-ps-utility-menu-modified' is |
non-nil, and update PostScript File menus iff `pr-ps-utility-menu-modified' is |
4951 |
non-nil." |
non-nil. |
4952 |
|
|
4953 |
|
If menu binding was not done, calls `pr-menu-bind'." |
4954 |
(interactive "P") |
(interactive "P") |
4955 |
(pr-update-var 'pr-ps-name pr-ps-printer-alist) |
(if pr-menu-print-item ; since v6.8.4 |
4956 |
(pr-update-var 'pr-txt-name pr-txt-printer-alist) |
;; There was no menu binding yet, so do it now! |
4957 |
(pr-update-var 'pr-ps-utility pr-ps-utility-alist) |
;; This is a hack to be compatible with old versions of printing. |
4958 |
(pr-do-update-menus force)) |
;; So, user does not need to change printing calling in init files. |
4959 |
|
(pr-menu-bind) |
4960 |
|
;; Here menu binding is ok. |
4961 |
|
(pr-update-var 'pr-ps-name pr-ps-printer-alist) |
4962 |
|
(pr-update-var 'pr-txt-name pr-txt-printer-alist) |
4963 |
|
(pr-update-var 'pr-ps-utility pr-ps-utility-alist) |
4964 |
|
(pr-do-update-menus force))) |
4965 |
|
|
4966 |
|
|
4967 |
(defvar pr-ps-printer-menu-modified t |
(defvar pr-ps-printer-menu-modified t |
6678 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6679 |
|
|
6680 |
|
|
|
;;; Files are not supposed to change Emacs behavior when you merely load them. |
|
|
;;; (pr-update-menus t) |
|
|
|
|
|
|
|
6681 |
(provide 'printing) |
(provide 'printing) |
6682 |
|
|
6683 |
|
|