Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1835 > unrolled thread
| Started by | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| First post | 2014-03-27 11:36 +0100 |
| Last post | 2014-03-27 18:27 +0100 |
| Articles | 2 — 1 participant |
Back to article view | Back to comp.lang.postscript
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
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2014-03-27 11:36 +0100 |
| Subject | Using includes in Emacs |
| Message-ID | <87y4zwvsh4.fsf@Equus.Decebal.nl> |
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.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [next] | [standalone]
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2014-03-27 18:27 +0100 |
| Message-ID | <87d2h7v9f0.fsf@Equus.Decebal.nl> |
| In reply to | #1835 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.postscript
csiph-web