From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: Printing from WindowXP version of emacs Date: Tue, 20 Dec 2005 08:41:06 +0100 Message-ID: References: <1134660719.186074.250590@z14g2000cwz.googlegroups.com> <43A1B787.9040001@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1135065355 6575 80.91.229.2 (20 Dec 2005 07:55:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Dec 2005 07:55:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 20 08:55:55 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EocKo-0004Nr-5I for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Dec 2005 08:54:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EocLg-000761-E6 for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Dec 2005 02:55:52 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 56 Original-X-Trace: individual.net M7+EpuhpvWW/tQTpIEOW2gqzR3CAbI5XakXa4TkuDTO8C8wieG User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:dI6KPGJKsNSmQRZ1z4yv7o0UvP8= Original-Xref: shelby.stanford.edu gnu.emacs.help:136475 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32095 Archived-At: Eli Zaretskii writes: >> I did not test with colors (it is no color printer) but that probably >> won't work in the same way, will it? > > Well, obviously you cannot see colors on a printer that doesn't > support color ;-). > > If the printer is a Postscript printer, though, ps-print has a feature > whereby you can remap faces to use color-less typefaces instead; for > example, the face for comments could use bold-italic, keywords could > come out underlined, etc. I attach below the mapping I use for a very > long time. So, do I use the same technique? First set `printer-name' and then execute some ps-command, like maybe `ps-print-buffer-with-faces'? >> Btw, I first tested without setting printer-name (which on Windows XP >> has the default value PRN) and printed, and Emacs froze. Don't know >> why though. > > Probably the PRN port is captured by some non-existing device, or > something like that. OK. > (setq ps-bold-faces > '(font-lock-comment-face > font-lock-keyword-face > font-lock-builtin-face > font-lock-function-name-face > diff-hunk-header-face > diff-changed-face > diff-removed-face > diff-added-face)) > (setq ps-italic-faces > '(font-lock-comment-face > font-lock-variable-name-face > font-lock-string-face > diff-header-face)) > (setq ps-underlined-faces > '(font-lock-type-face > font-lock-reference-face > font-lock-builtin-face > diff-file-header-face > diff-function-face)) Thanks! I will try to hunt down a PS-capable printer at my office and make a test. Maybe I can even redirect the printer output to a file and then use Ghostscript to make a PDF. I have macros in MS Word that can do this so it should be possible. If, that is, the printer can be configured to always print to file. I'll test. /Mathias