From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angelo Graziosi Newsgroups: gmane.emacs.help Subject: Re: Using Emacs as PS converter Date: Mon, 01 Dec 2014 22:05:32 +0100 Message-ID: <547CD81C.1090900@alice.it> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1417467965 10305 80.91.229.3 (1 Dec 2014 21:06:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2014 21:06:05 +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 22:05:59 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 1XvYAP-0003mw-2D for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Dec 2014 22:05:57 +0100 Original-Received: from localhost ([::1]:33932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvYAO-0005Ry-Ig for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Dec 2014 16:05:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvY9u-0005Qb-6M for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 16:05:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvY9n-0000VR-GB for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 16:05:26 -0500 Original-Received: from smtp203.alice.it ([82.57.200.99]:7626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvY9n-0000Uz-6D for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 16:05:19 -0500 Original-Received: from [192.168.1.102] (87.21.227.179) by smtp203.alice.it (8.6.060.43) (authenticated as angelo.graziosi@alice.it) id 54787E090050932F for help-gnu-emacs@gnu.org; Mon, 1 Dec 2014 22:05:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 Original-References: 83iohv6sjg.fsf@gnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.99 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:101361 Archived-At: Eli Zaretskii wrote: > 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: > [...] > See the section "How Ps-Print Deals With Faces" in the ps-print.el > commentary for more about setting up faces for ps-print. Hmm.. but when I use "M-x ps-spool-buffer-with-faces" from Emacs, the postscript file *has* the syntax colors! In other words: $ emacs -Q $ C-x C-f foo.c foo.c has the syntax with colors (font-lock ON by default, right?) After loading foo.c, do M-x ps-spool-buffer-with-faces and *PostScript* buffer is created. Switching to it (menu Buffers and clicking on the item '*PostScript*'): C-x C-w foo.ps foo.ps has the syntax colors as foo.c when visited by Emacs. Now if from command line I do: emacs [-Q] -batch foo.c -f ps-spool-buffer-with-faces --eval "(progn (switch-to-buffer \"*PostScript*\") (write-file \"foo.ps\"))" (with or without the option -Q) it produces foo.ps in BW, *not* with syntax colors. Does it mean that one, to have foo.ps with syntax colors, when produced from command lone as above, should setup .emacs as you suggested? As profane, I would expect that *also* the above command line produces foo.ps with syntax colors... Why not? After all, that command line summarize in a single command all the steps I described above after launching "emacs -Q"... or not? Ciao, Angelo.