[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using Emacs as PS converter
From: |
Eli Zaretskii |
Subject: |
Re: Using Emacs as PS converter |
Date: |
Mon, 01 Dec 2014 19:52:44 +0200 |
> 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\"))"