<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Ettore,</div><div class="gmail_default" style="font-size:small"><br></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div></div></div></div></div></div><div class="gmail_default" style="font-size:small"></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div>I’d say that with your report this is quite final. </div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">I hope that the stay of the problem is not final :) There must be a positive solution. Aquamacs used to do this job without having to take care of its PATH by myself :)</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div>Just two comments:</div><div><br></div><div>1. If you haven’t already done so, you may try to open a file in Aquamacs from the Terminal with</div><div><br></div><div><span style="white-space:pre-wrap"> </span>open -a aquamacs <filename></div><div><br></div><div>then Aquamacs should pick the right PATH from the environment.</div></div></blockquote><div><br></div>Yes, thanks. While this is a clumsy way it <span class="gmail_default" style="font-size:small">does the job, temporarily</span>. It also works for launching Aquamacs and, afterwards, open files that need latex+dvi+ps2pdf. But Aquamacs doesn't retain this PATH for subsequent launches from the Dock.<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div>2. the directory service command was to make sure about the shell that you were running (just in case Terminal launches another one, for example). The syntax is correct (of course, replacing <yourusername> with your actual username). It is documented in a man page. It’s also case sensitive in the variable names. </div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Probably I mistyped something (my username was ok, hopefully :). It prompted me with suggestions for correct arguments. </div></div><div><br></div><div><div class="gmail_default" style="font-size:small">I hope that this PATH problem gets solved. It used to be ok. But I'm wondering whether it's from Aquamacs itself per se, or something on my system. It should have happened with Aquamacs and/or macOS upgrades.</div><br></div>Best Regards,<br>Roussanka<br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div></div><div>—Ettore</div><div><div><br><blockquote type="cite"><div>On Nov 1, 2020, at 16:44, Roussanka Loukanova <<a href="mailto:rl.stpuu@gmail.com" target="_blank">rl.stpuu@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div dir="ltr"><div style="font-size:small">I'm not familiar with dscl, and what you gave doesn't seem to be the right syntax, or I do not get it right. But the other commands provide sufficiently to see that Aquqmca doesn't have respective PATH.</div><br></div><div dir="ltr">$ echo $PATH                            <br>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin<br><br>$ echo $SHELL                           <br>/bin/zsh<br><br>$ which gs<br>/usr/local/bin/gs<br><br>with Aquamacs' PATH<br>/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Library/TeX/texbin:/usr/local/texlive/2020/bin<br><br>$ gs      <br>GPL Ghostscript 9.53.3 (2020-10-01)<br>Copyright (C) 2020 Artifex Software, Inc.  All rights reserved.<br>This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:<br>see the file COPYING for details.<br>GS><br><br>I myself have never <span class="gmail_default" style="font-size:small">manipulated</span><span class="gmail_default" style="font-size:small"></span> the PATH of Aquamacs<span class="gmail_default" style="font-size:small">, at least not consciously</span><span class="gmail_default" style="font-size:small">.</span> I think that<span class="gmail_default" style="font-size:small"> should be done by the installation or update of Aquamacs itself. I hope that the developers will fix it, soon. I  myself do not like interfering that much with the defaults :)</span><br><br><div style="font-size:small">Win, I hope you will read this.</div><br>Best Regards,<br>Roussanka</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 1, 2020 at 10:17 PM Ettore Aldrovandi <<a href="mailto:ealdrov@math.fsu.edu" target="_blank">ealdrov@math.fsu.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi Roussanka,<div><br></div><div><div><blockquote type="cite"><div>On Nov 1, 2020, at 15:43, Roussanka Loukanova <<a href="mailto:rl.stpuu@gmail.com" target="_blank">rl.stpuu@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div dir="ltr">With José's suggestion for running the command getenv:<br>M-x getenv<br>PATH<br>/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Library/TeX/texbin:/usr/local/texlive/2020/bin<br><br></div></div></div></blockquote><div><br></div><div>The path form Aquamacs is a bit strange. I’m puzzled: I don’t see /usr/local/bin in it. Aquamacs should <i>add</i> to the path, not replace it, I think. </div><div><br></div><div>To understand what’s going on, what is the PATH value in Terminal, and what is your shell?</div><div><br></div><div>echo $PATH</div><div>echo $SHELL</div><div><br></div><div>Bettery yet, run:</div><div><br></div><div>dscl . -read /Users/<yourusername> UserShell</div><div><br><div><blockquote type="cite"></blockquote></div></div><blockquote type="cite"><div><div dir="ltr"><div dir="ltr">Ghostscript is located in:<br>/usr/local/share/ghostscript<br><br>I had this problem with ps2pdf when I had ghostscript 9.50. Yesterday, I downloaded and installed ghostscript 9.53.3, from Dick Koch:<br><br><a href="https://pages.uoregon.edu/koch/" target="_blank">https://pages.uoregon.edu/koch/</a><br><br>But I am still puzzled why ps2pdf is <span class="gmail_default" style="font-size:small">getting </span>reached and running ok in Terminal.<br></div></div></div></blockquote><div><br></div>In both cases, even with Dick Koch’s version of Ghostscript, the binary should be in /usr/local/bin. If you run</div><div><br></div><div>which gs</div><div><br></div><div>or </div><div><br></div><div>type gs</div><div><br></div><div>in your Terminal we can confirm it. (I can’t because I install ghostscript in /opt myself.) If that’s the case, with the path that Aquamacs reports, it can’t find ps2pdf.</div><div><br></div><div>—Ettore</div><div><br><blockquote type="cite"><div><div dir="ltr"><div dir="ltr"><div style="font-size:small">I always have been installing TexLive from MacTeX:</div><div style="font-size:small"><a href="http://www.tug.org/mactex/" target="_blank">http://www.tug.org/mactex/</a><br></div><br>Best Regards,<br>Roussanka</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 1, 2020 at 9:26 PM José Miguel Figueroa-O'Farrill <<a href="mailto:j.m.figueroa@ed.ac.uk" target="_blank">j.m.figueroa@ed.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
If you just do M-x getenv it will prompt for the variable and then you can simply type PATH.  You can then go the *Messages* buffer to read the (typically, lengthy) path.<br>
<br>
Cheers,<br>
        José<br>
<br>
<br>
> On 1 Nov 2020, at 20:17, Roussanka Loukanova <<a href="mailto:rl.stpuu@gmail.com" target="_blank">rl.stpuu@gmail.com</a>> wrote:<br>
> <br>
> Hi,<br>
> <br>
> I tried the following, in the *scratch* buffer of Aquamacs, but they do not produce anything visible by me in "scratch":<br>
> <br>
> (getenv "PATH") ctrl-J<br>
> getenv "PATH" ctrl-J<br>
> getenv("PATH")ctrl-J<br>
> <br>
> The "man getenv" gives the following syntax:<br>
> getenv(const char *name);<br>
> <br>
> The problem continues from Aquamacs. But ps2pdf runs ok from Terminal.<br>
> <br>
> Best Regards,<br>
> Roussanka<br>
> <br>
> On Sun, Nov 1, 2020 at 7:16 PM Ettore Aldrovandi <<a href="mailto:ealdrov@math.fsu.edu" target="_blank">ealdrov@math.fsu.edu</a>> wrote:<br>
> Hi John,<br>
> <br>
> thanks for the clarifications.<br>
> <br>
> > On Nov 1, 2020, at 12:44, John Wroclawski <<a href="mailto:jtw@csail.mit.edu" target="_blank">jtw@csail.mit.edu</a>> wrote:<br>
> ><br>
> >> On Nov 1, 2020, at 12:30 PM, Ettore Aldrovandi <<a href="mailto:ealdrov@math.fsu.edu" target="_blank">ealdrov@math.fsu.edu</a>> wrote:<br>
> >><br>
> >> what Pete says is correct. (It’s indeed great to see him back on the list.) However, if you install TeX Live via MacTex, the installer takes care of putting the appropriate item in /etc/paths.d, so that shouldn’t be the issue, as you say.<br>
> ><br>
> > Without speculating at all on what’s happening to Roussanka, it might be worth noting in passing that<br>
> ><br>
> > - ps2pdf is part of ghostscript, not TeXLive, and normally lives in /usr/local/bin. (so the TeXLive /etc/paths.d file isn’t relevant to this particular program..)<br>
> <br>
> Yes, you are right. Even better. The path is synthesized by calling /usr/libexec/path_helper, which takes care of putting /usr/local/bin in it before looking into /etc/paths.d.  This happens in both bash and zsh (through different startup files, of course).<br>
> <br>
> > - ps2pdf is also typically a chain of three or four shell scripts before it gets to actually running gs, and I suppose it could possibly have been broken by the switch to zsh (running 10.14 here, can’t check..)<br>
> <br>
> Eventually they all call ps2pdfwr, which calls gs. But due to the way bash and zsh construct the path, the result should be the same.  Bash would call path_helper in /etc/profile. Zsh does the same in /etc/zprofile.<br>
> <br>
> > - simpdftex, which Roussanka mentioned in other contexts, _is_ part of TeXLive and typically lives in /Library/TeX/texbin/. But it itself manipulates paths to find the programs it uses. So the fact that simpdftex can find ps2pdf doesn’t necessarily mean that other things will.<br>
> ><br>
> > (Is AQM using simpdftex, or calling programs directly?)<br>
> <br>
> No idea. I see that Aquamacs adds /Library/TeX/texbin to the path itself. I have TeXLive installed in /opt and therefore no /Library/TeX/texbin in my path, but it’s there in Aquamacs when I run (getenv “PATH”).<br>
> <br>
> —Ettore<br>
> <br>
> <br>
> _____________________________________________________________<br>
> MacOSX-Emacs mailing list<br>
> <a href="mailto:MacOSX-Emacs@email.esm.psu.edu" target="_blank">MacOSX-Emacs@email.esm.psu.edu</a><br>
> <a href="https://email.esm.psu.edu/mailman/listinfo/macosx-emacs" rel="noreferrer" target="_blank">https://email.esm.psu.edu/mailman/listinfo/macosx-emacs</a><br>
> List Archives: <a href="http://dir.gmane.org/gmane.emacs.macintosh.osx" rel="noreferrer" target="_blank">http://dir.gmane.org/gmane.emacs.macintosh.osx</a><br>
> <br>
> _____________________________________________________________<br>
> MacOSX-Emacs mailing list<br>
> <a href="mailto:MacOSX-Emacs@email.esm.psu.edu" target="_blank">MacOSX-Emacs@email.esm.psu.edu</a><br>
> <a href="https://email.esm.psu.edu/mailman/listinfo/macosx-emacs" rel="noreferrer" target="_blank">https://email.esm.psu.edu/mailman/listinfo/macosx-emacs</a><br>
> List Archives: <a href="http://dir.gmane.org/gmane.emacs.macintosh.osx" rel="noreferrer" target="_blank">http://dir.gmane.org/gmane.emacs.macintosh.osx</a><br>
<br>
Prof José Figueroa-O'Farrill<br>
School of Mathematics<br>
University of Edinburgh<br>
PGP Key: 0x6A6BD529 (MIT PGP Key Server)<br>
<br>
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.<br>
<br>
<br>
<br>
<br>
_____________________________________________________________<br>
MacOSX-Emacs mailing list<br>
<a href="mailto:MacOSX-Emacs@email.esm.psu.edu" target="_blank">MacOSX-Emacs@email.esm.psu.edu</a><br>
<a href="https://email.esm.psu.edu/mailman/listinfo/macosx-emacs" rel="noreferrer" target="_blank">https://email.esm.psu.edu/mailman/listinfo/macosx-emacs</a><br>
List Archives: <a href="http://dir.gmane.org/gmane.emacs.macintosh.osx" rel="noreferrer" target="_blank">http://dir.gmane.org/gmane.emacs.macintosh.osx</a><br>
</blockquote></div>
<br>_____________________________________________________________<br>MacOSX-Emacs mailing list<br><a href="mailto:MacOSX-Emacs@email.esm.psu.edu" target="_blank">MacOSX-Emacs@email.esm.psu.edu</a><br><a href="https://email.esm.psu.edu/mailman/listinfo/macosx-emacs" target="_blank">https://email.esm.psu.edu/mailman/listinfo/macosx-emacs</a><br>List Archives: <a href="http://dir.gmane.org/gmane.emacs.macintosh.osx" target="_blank">http://dir.gmane.org/gmane.emacs.macintosh.osx</a><br></div></blockquote></div><br></div></div></blockquote></div>
</div></blockquote></div><br></div></div></blockquote></div></div></div></div>