all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Using Emacs as PS converter
Date: Mon, 01 Dec 2014 19:52:44 +0200	[thread overview]
Message-ID: <83vblv6yvn.fsf@gnu.org> (raw)
In-Reply-To: <547C83B8.4050005@alice.it>

> Date: Mon, 01 Dec 2014 16:05:28 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> 
> 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
> 
>    M-x ps-spool-buffer-with-faces
> 
> the result is in a *PostScript* buffer that I can save as foo.ps.
> 
> But what if one wants use that from command line o shell script?
> 
> I have tried this:
> 
> $ emacs --batch foo.txt -f ps-spool-buffer-with-faces --visit 
> \*PostScript\* -f save-buffer
> 
> Formatting...  0%
> Collecting face information...
> Formatting...100%
> Formatting...done
> Wrote /home/angelo/work/*PostScript*
> 
> 
> but '*PostScript*' is saved empty...
> 
> $ ls -lrt
> ...
> ... 0  1 dic 15.54 *PostScript*
> 
> 
> Where is the error?
> 
> TIA,
>   Angelo.
> 
> 


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\"))"



  parent reply	other threads:[~2014-12-01 17:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01 15:05 Using Emacs as PS converter Angelo Graziosi
2014-12-01 17:16 ` Doug Lewan
2014-12-01 17:34   ` Angelo Graziosi
2014-12-01 19:58   ` Angelo Graziosi
2014-12-01 20:09     ` Eli Zaretskii
2014-12-01 17:52 ` Eli Zaretskii [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-12-01 21:05 Angelo Graziosi
2014-12-02  3:32 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83vblv6yvn.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.