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 18:34:10 +0100 Message-ID: <547CA692.7050404@alice.it> References: <547C83B8.4050005@alice.it> <155DEC68569B714B86C2C7075F5EDA9892B9A336@DAKIYA1.pegasus.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1417455295 25927 80.91.229.3 (1 Dec 2014 17:34:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2014 17:34:55 +0000 (UTC) To: Doug Lewan , "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:34:47 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 1XvUs2-0002Jt-Ru for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Dec 2014 18:34:46 +0100 Original-Received: from localhost ([::1]:32957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvUs2-00006R-Fw for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Dec 2014 12:34:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvUrk-00006I-Of for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 12:34:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvUra-0005gc-W5 for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 12:34:28 -0500 Original-Received: from smtp202.alice.it ([82.57.200.98]:6333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvUra-0005ft-Ix for help-gnu-emacs@gnu.org; Mon, 01 Dec 2014 12:34:18 -0500 Original-Received: from [192.168.1.102] (87.21.227.179) by smtp202.alice.it (8.6.060.43) (authenticated as angelo.graziosi@alice.it) id 54787D12004D1F4A; Mon, 1 Dec 2014 18:34:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: <155DEC68569B714B86C2C7075F5EDA9892B9A336@DAKIYA1.pegasus.local> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.98 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:101352 Archived-At: Ciao Doug, thanks for clarification. Ciao, Angelo. Il 01/12/2014 18:16, Doug Lewan ha scritto: > First, note the following in the documentation for ps-spool-buffer-with-faces: > 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 available as far as emacs can tell. Try "emacs --batch --eval='(message window-system)'" to see. > > Next, emacs does a *lot* of things to start up, and the environment might not 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 selected, 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 lisp where you have real control. Even using --eval '(sample code)' on the command line would probably be more reliable. If you want to use emacs to support shell programming, then maybe starting it --daemon and using emacsclient is the way to go. (On the other hand, you would then affect your whole environment and that might complicate other things.) >