From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Doug Lewan Newsgroups: gmane.emacs.help Subject: RE: Using Emacs as PS converter Date: Mon, 1 Dec 2014 17:16:51 +0000 Message-ID: <155DEC68569B714B86C2C7075F5EDA9892B9A336@DAKIYA1.pegasus.local> References: <547C83B8.4050005@alice.it> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1417454247 8360 80.91.229.3 (1 Dec 2014 17:17:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2014 17:17:27 +0000 (UTC) To: Angelo Graziosi , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 01 18:17:20 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 1XvUb9-0002LQ-Q1 for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Dec 2014 18:17:19 +0100 Original-Received: from localhost ([::1]:32898 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvUb9-0003o8-Cs for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Dec 2014 12:17:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvUap-0003n5-Fi for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 12:17:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvUaj-00009s-2a for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 12:16:59 -0500 Original-Received: from webmail.shubertorg.com ([207.246.209.200]:19148 helo=livemail.shubertorg.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvUai-00009m-Uf for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 12:16:52 -0500 Original-Received: from dakiya1.pegasus.local ([172.16.208.201]) by DAKIYA1.pegasus.local ([172.16.208.201]) with mapi id 14.03.0123.003; Mon, 1 Dec 2014 12:16:52 -0500 Thread-Topic: Using Emacs as PS converter Thread-Index: AQHQDYYRumWOGqF5fEO16k13rRO3o5x69UZg In-Reply-To: <547C83B8.4050005@alice.it> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.21.202] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 207.246.209.200 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:101351 Archived-At: First, note the following in the documentation for ps-spool-buffer-with-fac= es: This command works only if you are using a window system, so it has a way to determine color values. If you use --batch or run on a terminal, then there isn't a window system a= vailable as far as emacs can tell. Try "emacs --batch --eval=3D'(message wi= ndow-system)'" to see. Next, emacs does a *lot* of things to start up, and the environment might n= ot always be good for doing programming kinds of things on the command line= . For example, it's only in step 23 that a buffer is guaranteed to be selecte= d, and that is /after/ it has handled the command line arguments (step 21).= See the info for '(elisp) Startup Summary'. To do anything sophisticated, you should probably really be doing it in lis= p where you have real control. Even using --eval '(sample code)' on the com= mand line would probably be more reliable. If you want to use emacs to supp= ort shell programming, then maybe starting it --daemon and using emacsclien= t is the way to go. (On the other hand, you would then affect your whole en= vironment and that might complicate other things.) --=20 ,Doug Douglas Lewan Shubert Ticketing (201) 489-8600 ext 224 or ext 4335 "This is a slow pup," he said continuing his ascent. > -----Original Message----- > Behalf Of Angelo Graziosi > Sent: Monday, 2014 December 01 10:05 > Subject: Using Emacs as PS converter >=20 > Out of curiosity, I wonder if one can use Emacs as a postscript > converter.. Suppose I have a file foo.txt. If I visit it and the > I have tried this: >=20 > $ emacs --batch foo.txt -f ps-spool-buffer-with-faces --visit > \*PostScript\* -f save-buffer >=20 > Formatting... 0% > Collecting face information... > Formatting...100% > Formatting...done > Wrote /home/angelo/work/*PostScript* >=20 >=20 > but '*PostScript*' is saved empty... >=20 > $ ls -lrt > ... > ... 0 1 dic 15.54 *PostScript* >=20 >=20 > Where is the error? >=20 > TIA, > Angelo.