[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: very simple off-topic question regarding command line viewing of pos
From: |
Kenneth Wolcott |
Subject: |
Re: very simple off-topic question regarding command line viewing of postscript files on macOS |
Date: |
Wed, 3 Aug 2022 19:07:19 -0700 |
Hi;
Update:
I'm using Emacs built for MacOS now, temporarily, over the emacs
coming from homebrew. I have emacs running full screen. I have split
the screen into two windows. The upper one now has my origin pdf
(DocVew!) and my bottom window is the Lilypond source file. When I
need to view two different portions of the Lilypond source
simultaneously, I split that window into two windows (either
vertically or horizontally). I have yet to figure out how to
dynamically fill another window with the Lilypond pdf output, but I
think I have a workflow solution all inside emacs now.
Thanks,
Ken
PS: Probably should end this thread now as it is really not
Lilypond-specific. I really appreciate all the responses.
On Wed, Aug 3, 2022 at 4:09 PM Kenneth Wolcott <kennethwolcott@gmail.com> wrote:
>
> Thank you all for your responses.
>
> I'm not at all offended by the XY type of response.
>
> I'll try to elaborate without TMI...
>
> I use Preview with maximum width for my external monitor and minimum
> height, to display what I am engraving from, and then scroll it down
> line by line.
>
> I then have a terminal window (multi-tabbed) immediately beneath it
> to the right, all the way to the bottom.
>
> I use command line emacs (not GUI or Windows style) in the terminal
> window to edit Lilypond source.
>
> I then use control-Z to suspend the emacs session, and run my script
> (written in Perl) which calls Lilypond and then displays the resultant
> pdf using Reader (another pdf app distinct from Preview).
>
> I specify Reader to display the pdf because if I don't the pdf will
> be displayed by Preview in a tab which is totally useless to view an
> entire page of output when it is in the same size as my origin pdf.
>
> I have not seen an effective way to prevent the tabbed Preview. It
> looks like some developer decided that multiple files must be
> displayed as a tab for efficiency rather than having two instances of
> the app. Breaks my desired workflow :-(
>
> Now, I want to make changes (or add new content)...the existing
> Reader app instance will not update automatically and will not update
> manually; I have to exit it and re-execute (my script will execute it,
> but is unable to exit it, so I have to exit manually).
>
> If my script could kill the existing Reader app instance and start
> another one, that would be great, but pstree/pkill (Apple built-in
> process view and kill commands) apparently have no effect on either
> Preview or Reader (or any app for that matter).
>
> So there's lots of keystrokes (or mouse clicks) that interfere with
> the visual process and the hand-and-eye coordination is disrupted.
> This is extremely annoying.
>
> It would be nice if I could do almost everything inside emacs. Even
> if that's not possible, removing some of these extra moving parts
> might help with the workflow. I'd like to have the script have more
> control over the environment. My script is a very simple wrapper
> around Lilypond, not near as powerful or sophisticated as a makefile,
> but similar.
>
> I use git (no branching) to back up my work and an external hard drive.
>
> I was hoping to use postscript instead of pdf during the development
> process as I might have more control over the app and therefore the
> workflow and therefore be more productive and less frustrated.
>
> This process was so much easier when using Solaris on a Sun pizza
> box (30+ years ago). It worked great on Linux (less than 30 years
> ago). Perhaps the Mac is just too much "locked hood" (can't fiddle
> with the engine) and that frustrates this old retired geezer. I hated
> Windows for this same reason; no user control over my environment. I
> guess that's way I like emacs, Perl, Linux, UNIX...
>
> Anyway...I was trying to simplify my workflow...
>
> Thanks,
> Ken Wolcott
>
> On Wed, Aug 3, 2022 at 7:22 AM David Wright <lilylis@lionunicorn.co.uk> wrote:
> >
> > On Wed 03 Aug 2022 at 09:22:53 (+0200), Jean Abou Samra wrote:
> > > > Le 3 août 2022 à 01:24, Kenneth Wolcott <kennethwolcott@gmail.com> a
> > > > écrit :
> > > > I'm trying to simplify my workflow. I think I want to generate
> > > > postscript files instead of pdf files when using Lilypond. I already
> > > > know how to do that. But what I need to know is, on a Mac, how to
> > > > display the postscript file from the command line. I used to do this
> > > > all the time a long time ago when I used UNIX and Linux, but homebrew
> > > > gs doesn't display the postscript. I do not want to use preview.
> > > >
> > > > This used to be a TRIVIAL thing to do when I was younger, but now I
> > > > am old and my brain just isn't what it used to be.
> > > >
> > > > I've looked at several man pages and/or info and/or help (lastly
> > > > /opt/homebrew/Cellar/ghostscript/9.56.1_1/share/doc/ghostscript/9.56.1/Use.htm)
> > > >
> > > > Current attempt:
> > > >
> > > > /opt/homebrew/Cellar/ghostscript/9.56.1_1/bin/gs -sDEVICE=display
> > > > ../target/The_Swan.ps
> > > > GPL Ghostscript 9.56.1 (2022-04-04)
> > > > Copyright (C) 2022 Artifex Software, Inc. All rights reserved.
> > > > This software is supplied under the GNU AGPLv3 and comes with NO
> > > > WARRANTY:
> > > > see the file COPYING for details.
> > > > zsh: segmentation fault
> > > > /opt/homebrew/Cellar/ghostscript/9.56.1_1/bin/gs -sDEVICE=display
> > > >
> > > > So, what flags should I be using just to display the postscript?
> > >
> > > Personally, I’d just have done
> > >
> > > ps2pdf file.ps
> > > open file.pdf
> >
> > I'd be tempted to do the same. Having put up with gv's interface for
> > years, it was a relief when a pdflatex workflow supplanted dvips's.
> >
> > But another suggestion would be to run LP with
> > -ddelete-intermediate-files='#f'
> > in which case you get both a PS and PDF. View one, and rename and
> > process the other. The wrinkle is, of course, that Usage states:
> >
> > delete-intermediate-files bool
> > If bool is #t, delete the unusable, intermediate .ps files
> > created during compilation
> > Default: #t.
> >
> > However, I can't see any visual difference between LP's PDF and the
> > PDF converted by ps2pdf from the intermediate file. Should I?
> > What is meant to make the PS unusable?
> >
> > > I believe this is actually what some of the modern document viewers do if
> > > you ask them to open a PS file.
> > >
> > > Bottom line: this may be an XY question. Why do you want to generate
> > > PostScript in the first place?
> >
> > My first thought, too, especially as the OP writes "I /think/ I want
> > to generate postscript files …". But I hope my suggestions above are
> > suitably actionable, though not in the sense that word is usually used
> > over here. :)
> >
> > Cheers,
> > David.
- Re: very simple off-topic question regarding command line viewing of postscript files on macOS, (continued)
Re: very simple off-topic question regarding command line viewing of postscript files on macOS, Jean Abou Samra, 2022/08/03
Re: very simple off-topic question regarding command line viewing of postscript files on macOS, David Wright, 2022/08/03