Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1836
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.panservice.it!feed.xsnews.nl!border01.ams.xsnews.nl!feeder01.ams.xsnews.nl!frontend-F10-06.ams.news.kpn.nl |
|---|---|
| From | Cecil Westerhof <Cecil@decebal.nl> |
| Newsgroups | comp.lang.postscript |
| Subject | Re: Using includes in Emacs |
| Organization | Decebal Computing |
| References | <87y4zwvsh4.fsf@Equus.Decebal.nl> |
| X-Face | "(y8cC@tg_12{">GF'UXTW]FHI2wMiZNrnf'1EFQ&O#$m:f#O7+7}kR<J%a^F2lh4[N~Yz4 nSp#c+aQo1b5=?HcNEkQ7QzF<])O3X4MDL/AYjys&*mt>,v+Pti8=Vi/Z"g^?b"E |
| X-Homepage | http://www.decebal.nl/ |
| Date | Thu, 27 Mar 2014 18:27:47 +0100 |
| Message-ID | <87d2h7v9f0.fsf@Equus.Decebal.nl> (permalink) |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
| Cancel-Lock | sha1:vGZxfN9reU/ljvrCoYUYL1VJM1k= |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Lines | 55 |
| NNTP-Posting-Host | 77.171.42.144 |
| X-Trace | 1395941404 news.kpn.nl 20824 77.171.42.144@kpn/77.171.42.144:51636 |
| Xref | csiph.com comp.lang.postscript:1836 |
Show key headers only | View raw
Op Thursday 27 Mar 2014 11:36 CET schreef Cecil Westerhof:
> I am happily trying ‘some’ things with postscript again. It was a
> little bit getting used to it after a while, but I am getting used
> to it again.
>
> The code I am writing is almost 1400 lines. That is a bit long. In
> principal it are different modules. I am using Emacs and with
> C-c C-c
>
> I get a view in Emacs. Is there a way to split the source in several
> files and include them? I know about ‘run’, but that only works
> without ‘-dSafer’. I could also use ‘gs’ with ‘-f filename’, but
> that would be an external command.
>
> At the moment I am using the following:
> (progn
> (shell-command (concat "cd " postscript-dir "; "
> "gs -sDEVICE=pdfwrite"
> " -dNOPAUSE"
> " -dBATCH"
> " -dSAFER"
> " -dQUIET"
> " -sOUTPUTFILE=" output-file
> " -f meander.eps"
> " " input-file))
> (find-file (concat postscript-dir output-file)))
>
> It works, but it is not really perfect.
I have a small improvement:
(progn
(shell-command (concat "cd " postscript-dir "; "
"gs -sDEVICE=pdfwrite"
" -dNOPAUSE"
" -dSAFER"
" -sOUTPUTFILE=" output-file
" -f meander.eps"
" " input-file))
(when (get-buffer output-file)
(kill-buffer output-file))
(find-file (concat postscript-dir output-file))
)
It looks like -dBATCH was doing nothing. Also -dQUIT suppressed things
that I think are useful.
Also a ‘problem’ was the message you get when you did not close the
buffer with the PDF. So I build in that the buffer is closed when it
is open, before opening it.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Back to comp.lang.postscript | Previous | Next — Previous in thread | Find similar | Unroll thread
Using includes in Emacs Cecil Westerhof <Cecil@decebal.nl> - 2014-03-27 11:36 +0100 Re: Using includes in Emacs Cecil Westerhof <Cecil@decebal.nl> - 2014-03-27 18:27 +0100
csiph-web