From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Using Emacs as PS converter Date: Mon, 01 Dec 2014 22:09:39 +0200 Message-ID: <83iohv6sjg.fsf@gnu.org> References: <547C83B8.4050005@alice.it> <155DEC68569B714B86C2C7075F5EDA9892B9A336@DAKIYA1.pegasus.local> <547CC87E.8040404@alice.it> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1417464608 20668 80.91.229.3 (1 Dec 2014 20:10:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2014 20:10:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 01 21:10:02 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XvXID-0005Rq-Bg for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Dec 2014 21:09:57 +0100 Original-Received: from localhost ([::1]:33675 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvXIC-00057u-NG for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Dec 2014 15:09:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvXHw-00057n-60 for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 15:09:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvXHq-0002sa-Av for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 15:09:40 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:59998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvXHq-0002sF-2M for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 15:09:34 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NFX001006LUU500@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 22:09:32 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFX001D06NWGX70@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 22:09:32 +0200 (IST) In-reply-to: <547CC87E.8040404@alice.it> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101357 Archived-At: > Date: Mon, 01 Dec 2014 20:58:54 +0100 > From: Angelo Graziosi > > Eli Zaretskii wrote: > > I don't know, but this minor variation works for me: > > > > emacs -batch foo.c -f ps-spool-buffer-with-faces --eval "(progn (switch-to-buffer \"*PostScript*\") (write-file \"foo.ps\"))" > > Oh, yes it works! I notice only that foo.ps is black and white... :( > > It has lost the syntax colors... sigh.. You need to define the ps-print faces, I think. I have something like this in my .emacs, which works well with black-and-white PS printers: (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)) See the section "How Ps-Print Deals With Faces" in the ps-print.el commentary for more about setting up faces for ps-print.