Re: very simple off-topic question regarding command line viewing of postscript files on macOS
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 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 wrote: > > > > On Wed 03 Aug 2022 at 09:22:53 (+0200), Jean Abou Samra wrote: > > > > Le 3 août 2022 à 01:24, Kenneth Wolcott 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) > > > >
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
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 wrote: > > On Wed 03 Aug 2022 at 09:22:53 (+0200), Jean Abou Samra wrote: > > > Le 3 août 2022 à 01:24, Kenneth Wolcott 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 >
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
On Wed 03 Aug 2022 at 09:22:53 (+0200), Jean Abou Samra wrote: > > Le 3 août 2022 à 01:24, Kenneth Wolcott 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
On 2022-08-03 3:07 am, Lukas-Fabian Moser wrote: Since we're both not English native speakers, there may be a problem of missing the appropriate tonality involved. I'm positive that Jean didn't mean to say "that's not a good question, go away" any more than I did. Was this what our responses sounded like for a native speaker? As a native English speaker, I can allay your concerns. The original wording was reasonably clear to me. Granted, if someone is unfamiliar with the term XY in this context, that might be a stumbling block. However, the follow-up question importantly sought out the missing information. The only advice I could give is to try to lead with the actionable item first. That is, ask for clarification and then qualify that such information would help resolve a possible XY problem. This aligns with the tl;dr principle in online discourse. Our attention spans often become quite short when we are struggling to meet a tight deadline. -- Aaron Hill
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
Hi Andrew, Sure this is an XY question, but the question for the OP is, in what way does outputting postscript simplify your workflow? What are you trying to achieve? If you look at this list and many others, people ask questions because they are puzzled or stumped, and may not always ask the most pertinent question, perfectly phrased and in precise context. I think this is totally forgivable. Labelling queries XY may not be the most helpful response when people are just seeking answers and floundering. Go easy on them. :-) Since you wrote something similar yesterday to me: Yes, but support lists and forums consist of a very large percentage of XY problems due to their very nature. I always ask people 'what is the real question?'. I'd like to ask for clarification: In both cases, Jean as well as I wrote sentences of a similar structure: Jean: "Bottom line: this may be an XY question. Why do you want to generate PostScript in the first place?" Lukas: "But your question seems sounds like an xy problem (https://en.wikipedia.org/wiki/XY_problem): What do you want to achieve exactly?" So, neither I nor (I'm sure of that) Jean intended to use the label "XY question" as a way to castigate the OP. For me, it's an - admittedly geeky (hence the Wikipedia link) - succinct way of saying: We probably could give you better help if we had a fuller picture of the fundamental problem you want to solve. Hence the followup questions: "Why do you want to Generate PostScript in the first place?" resp. "What do you want to achieve exactly?" Since we're both not English native speakers, there may be a problem of missing the appropriate tonality involved. I'm positive that Jean didn't mean to say "that's not a good question, go away" any more than I did. Was this what our responses sounded like for a native speaker? Lukas
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
Well the OP said he wants to simplify his workflow. And of course there is no need to convert postscript to PDF because you can just use normal Lilypond output. And he said he wants to view the postscript. Sure this is an XY question, but the question for the OP is, in what way does outputting postscript simplify your workflow? What are you trying to achieve? If you look at this list and many others, people ask questions because they are puzzled or stumped, and may not always ask the most pertinent question, perfectly phrased and in precise context. I think this is totally forgivable. Labelling queries XY may not be the most helpful response when people are just seeking answers and floundering. Go easy on them. :-) Andrew On 3/08/2022 5:22 pm, Jean Abou Samra wrote: Personally, I’d just have done ps2pdf file.ps open file.pdf 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?
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
> On 3 Aug 2022, at 06:43, Kenneth Wolcott wrote: > > I'll look into that, but I already installed xquartx, via homebrew, > which provides an X11 environment. I have MacPorts xorg-server installed, and when launching X11 programs from the Terminal app, it automatically launches XQuartz. On MacOS, there is also Frescobaldi, in effect a LilyPond IDE.
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
> Le 3 août 2022 à 01:24, Kenneth Wolcott a écrit : > > Hi; > > 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 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? Best, Jean
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
HI JJ; I'll look into that, but I already installed xquartx, via homebrew, which provides an X11 environment. BTW, I've posted a query on stackoverflow; that is probably a better place than this as it does not directly involve Lilypond. Thanks, Ken On Tue, Aug 2, 2022 at 9:34 PM Jean-Julien Fleck wrote: > > Hello Kenneth, > > You're right, there seems to have been a change in the x11 policy but perhaps > the page https://github.com/johnhcc/homebrew-gs-x11 could be of some use to > you. > > Le mer. 3 août 2022 à 06:04, Kenneth Wolcott a > écrit : >> >> Hi JJ; >> >> Maybe available via MacPorts, but not native and not via homebrew, >> as far as I can tell. >> >> Thanks, >> Ken >> >> On Tue, Aug 2, 2022 at 8:04 PM Jean-Julien Fleck >> wrote: >> > >> > Hello Kenneth >> > >> > To view the postscript, you should use directly gv (GhostView) and not gs >> > (GhostScript). >> > >> > Hope this helps, >> > >> > Le mer. 3 août 2022 à 02:22, Kenneth Wolcott a >> > écrit : >> >> >> >> Thank you Andrew. >> >> >> >> Meanwhile, I installed xquartz and I have a working (?) XWindows >> >> environment now, but gs still doesn't work. >> >> >> >> I'll poke around more on stackoverflow. >> >> >> >> Thanks, >> >> Ken >> >> >> >> On Tue, Aug 2, 2022 at 5:16 PM Andrew Bernard >> >> wrote: >> >> > >> >> > You may be better off asking this ghostscript specific question on >> >> > StackOverflow. It's a legitimate topic there.A tag 'ghostscript' is >> >> > supported, and the topic appears to be active. >> >> > >> >> > https://stackoverflow.com/tags/ghostscript/info >> >> > >> >> > Andrew >> >> > >> >> > >> >> > >> >> >> > >> > >> > -- >> > JJ Fleck >> > Physique et Informatique >> > PCSI1 Lycée Kléber > > > > -- > JJ Fleck > Physique et Informatique > PCSI1 Lycée Kléber
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
Hello Kenneth, You're right, there seems to have been a change in the x11 policy but perhaps the page https://github.com/johnhcc/homebrew-gs-x11 could be of some use to you. Le mer. 3 août 2022 à 06:04, Kenneth Wolcott a écrit : > Hi JJ; > > Maybe available via MacPorts, but not native and not via homebrew, > as far as I can tell. > > Thanks, > Ken > > On Tue, Aug 2, 2022 at 8:04 PM Jean-Julien Fleck > wrote: > > > > Hello Kenneth > > > > To view the postscript, you should use directly gv (GhostView) and not > gs (GhostScript). > > > > Hope this helps, > > > > Le mer. 3 août 2022 à 02:22, Kenneth Wolcott > a écrit : > >> > >> Thank you Andrew. > >> > >> Meanwhile, I installed xquartz and I have a working (?) XWindows > >> environment now, but gs still doesn't work. > >> > >> I'll poke around more on stackoverflow. > >> > >> Thanks, > >> Ken > >> > >> On Tue, Aug 2, 2022 at 5:16 PM Andrew Bernard > >> wrote: > >> > > >> > You may be better off asking this ghostscript specific question on > >> > StackOverflow. It's a legitimate topic there.A tag 'ghostscript' is > >> > supported, and the topic appears to be active. > >> > > >> > https://stackoverflow.com/tags/ghostscript/info > >> > > >> > Andrew > >> > > >> > > >> > > >> > > > > > > -- > > JJ Fleck > > Physique et Informatique > > PCSI1 Lycée Kléber > -- JJ Fleck Physique et Informatique PCSI1 Lycée Kléber
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
Hi JJ; Maybe available via MacPorts, but not native and not via homebrew, as far as I can tell. Thanks, Ken On Tue, Aug 2, 2022 at 8:04 PM Jean-Julien Fleck wrote: > > Hello Kenneth > > To view the postscript, you should use directly gv (GhostView) and not gs > (GhostScript). > > Hope this helps, > > Le mer. 3 août 2022 à 02:22, Kenneth Wolcott a > écrit : >> >> Thank you Andrew. >> >> Meanwhile, I installed xquartz and I have a working (?) XWindows >> environment now, but gs still doesn't work. >> >> I'll poke around more on stackoverflow. >> >> Thanks, >> Ken >> >> On Tue, Aug 2, 2022 at 5:16 PM Andrew Bernard >> wrote: >> > >> > You may be better off asking this ghostscript specific question on >> > StackOverflow. It's a legitimate topic there.A tag 'ghostscript' is >> > supported, and the topic appears to be active. >> > >> > https://stackoverflow.com/tags/ghostscript/info >> > >> > Andrew >> > >> > >> > >> > > > -- > JJ Fleck > Physique et Informatique > PCSI1 Lycée Kléber
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
Hello Kenneth To view the postscript, you should use directly gv (GhostView) and not gs (GhostScript). Hope this helps, Le mer. 3 août 2022 à 02:22, Kenneth Wolcott a écrit : > Thank you Andrew. > > Meanwhile, I installed xquartz and I have a working (?) XWindows > environment now, but gs still doesn't work. > > I'll poke around more on stackoverflow. > > Thanks, > Ken > > On Tue, Aug 2, 2022 at 5:16 PM Andrew Bernard > wrote: > > > > You may be better off asking this ghostscript specific question on > > StackOverflow. It's a legitimate topic there.A tag 'ghostscript' is > > supported, and the topic appears to be active. > > > > https://stackoverflow.com/tags/ghostscript/info > > > > Andrew > > > > > > > > -- JJ Fleck Physique et Informatique PCSI1 Lycée Kléber
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
Thank you Andrew. Meanwhile, I installed xquartz and I have a working (?) XWindows environment now, but gs still doesn't work. I'll poke around more on stackoverflow. Thanks, Ken On Tue, Aug 2, 2022 at 5:16 PM Andrew Bernard wrote: > > You may be better off asking this ghostscript specific question on > StackOverflow. It's a legitimate topic there.A tag 'ghostscript' is > supported, and the topic appears to be active. > > https://stackoverflow.com/tags/ghostscript/info > > Andrew > > >
Re: very simple off-topic question regarding command line viewing of postscript files on macOS
You may be better off asking this ghostscript specific question on StackOverflow. It's a legitimate topic there.A tag 'ghostscript' is supported, and the topic appears to be active. https://stackoverflow.com/tags/ghostscript/info Andrew
very simple off-topic question regarding command line viewing of postscript files on macOS
Hi; 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? Thanks, Ken Wolcott