Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1836
| 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> |
| Date | 2014-03-27 18:27 +0100 |
| Message-ID | <87d2h7v9f0.fsf@Equus.Decebal.nl> (permalink) |
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