[OS X Emacs] latex + dvips + ps2pdf from Aquamacs

Roussanka Loukanova rl.stpuu at gmail.com
Sun Nov 1 19:49:49 EST 2020


By restarting the Mac, and launching Aquamacs from Dock, I see in Messages:

Warning: Login shell did not return environment.
0 environment variables imported from login shell (/bin/zsh).

Until tomorrow,:
Best Regards,
Roussanka




On Mon, Nov 2, 2020 at 1:06 AM Roussanka Loukanova <rl.stpuu at gmail.com>
wrote:

> Hi Ettore,
>
> I’d say that with your report this is quite final.
>>
>
> 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 :)
>
>
>
>> Just two comments:
>>
>> 1. If you haven’t already done so, you may try to open a file in Aquamacs
>> from the Terminal with
>>
>> open -a aquamacs <filename>
>>
>> then Aquamacs should pick the right PATH from the environment.
>>
>
> Yes, thanks. While this is a clumsy way it does the job, temporarily. 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.
>>
>>
>> 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.
>>
>
> Probably I mistyped something (my username was ok, hopefully :). It
> prompted me with suggestions for correct arguments.
>
> 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.
>
> Best Regards,
> Roussanka
>
>
>> —Ettore
>>
>> On Nov 1, 2020, at 16:44, Roussanka Loukanova <rl.stpuu at gmail.com> wrote:
>>
>> 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.
>>
>> $ echo $PATH
>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
>>
>> $ echo $SHELL
>> /bin/zsh
>>
>> $ which gs
>> /usr/local/bin/gs
>>
>> with Aquamacs' PATH
>>
>> /usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Library/TeX/texbin:/usr/local/texlive/2020/bin
>>
>> $ gs
>> GPL Ghostscript 9.53.3 (2020-10-01)
>> Copyright (C) 2020 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.
>> GS>
>>
>> I myself have never manipulated the PATH of Aquamacs, at least not
>> consciously. I think that 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 :)
>>
>> Win, I hope you will read this.
>>
>> Best Regards,
>> Roussanka
>>
>> On Sun, Nov 1, 2020 at 10:17 PM Ettore Aldrovandi <ealdrov at math.fsu.edu>
>> wrote:
>>
>>> Hi Roussanka,
>>>
>>> On Nov 1, 2020, at 15:43, Roussanka Loukanova <rl.stpuu at gmail.com>
>>> wrote:
>>>
>>> With José's suggestion for running the command getenv:
>>> M-x getenv
>>> PATH
>>>
>>> /usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Library/TeX/texbin:/usr/local/texlive/2020/bin
>>>
>>>
>>> The path form Aquamacs is a bit strange. I’m puzzled: I don’t see
>>> /usr/local/bin in it. Aquamacs should *add* to the path, not replace
>>> it, I think.
>>>
>>> To understand what’s going on, what is the PATH value in Terminal, and
>>> what is your shell?
>>>
>>> echo $PATH
>>> echo $SHELL
>>>
>>> Bettery yet, run:
>>>
>>> dscl . -read /Users/<yourusername> UserShell
>>>
>>> Ghostscript is located in:
>>> /usr/local/share/ghostscript
>>>
>>> I had this problem with ps2pdf when I had ghostscript 9.50. Yesterday, I
>>> downloaded and installed ghostscript 9.53.3, from Dick Koch:
>>>
>>> https://pages.uoregon.edu/koch/
>>>
>>> But I am still puzzled why ps2pdf is getting reached and running ok in
>>> Terminal.
>>>
>>>
>>> In both cases, even with Dick Koch’s version of Ghostscript, the binary
>>> should be in /usr/local/bin. If you run
>>>
>>> which gs
>>>
>>> or
>>>
>>> type gs
>>>
>>> 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.
>>>
>>> —Ettore
>>>
>>> I always have been installing TexLive from MacTeX:
>>> http://www.tug.org/mactex/
>>>
>>> Best Regards,
>>> Roussanka
>>>
>>> On Sun, Nov 1, 2020 at 9:26 PM José Miguel Figueroa-O'Farrill <
>>> j.m.figueroa at ed.ac.uk> wrote:
>>>
>>>> Hi,
>>>>
>>>> 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.
>>>>
>>>> Cheers,
>>>>         José
>>>>
>>>>
>>>> > On 1 Nov 2020, at 20:17, Roussanka Loukanova <rl.stpuu at gmail.com>
>>>> wrote:
>>>> >
>>>> > Hi,
>>>> >
>>>> > I tried the following, in the *scratch* buffer of Aquamacs, but they
>>>> do not produce anything visible by me in "scratch":
>>>> >
>>>> > (getenv "PATH") ctrl-J
>>>> > getenv "PATH" ctrl-J
>>>> > getenv("PATH")ctrl-J
>>>> >
>>>> > The "man getenv" gives the following syntax:
>>>> > getenv(const char *name);
>>>> >
>>>> > The problem continues from Aquamacs. But ps2pdf runs ok from Terminal.
>>>> >
>>>> > Best Regards,
>>>> > Roussanka
>>>> >
>>>> > On Sun, Nov 1, 2020 at 7:16 PM Ettore Aldrovandi <
>>>> ealdrov at math.fsu.edu> wrote:
>>>> > Hi John,
>>>> >
>>>> > thanks for the clarifications.
>>>> >
>>>> > > On Nov 1, 2020, at 12:44, John Wroclawski <jtw at csail.mit.edu>
>>>> wrote:
>>>> > >
>>>> > >> On Nov 1, 2020, at 12:30 PM, Ettore Aldrovandi <
>>>> ealdrov at math.fsu.edu> wrote:
>>>> > >>
>>>> > >> 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.
>>>> > >
>>>> > > Without speculating at all on what’s happening to Roussanka, it
>>>> might be worth noting in passing that
>>>> > >
>>>> > > - 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..)
>>>> >
>>>> > 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).
>>>> >
>>>> > > - 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..)
>>>> >
>>>> > 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.
>>>> >
>>>> > > - 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.
>>>> > >
>>>> > > (Is AQM using simpdftex, or calling programs directly?)
>>>> >
>>>> > 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”).
>>>> >
>>>> > —Ettore
>>>> >
>>>> >
>>>> > _____________________________________________________________
>>>> > MacOSX-Emacs mailing list
>>>> > MacOSX-Emacs at email.esm.psu.edu
>>>> > https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
>>>> > List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
>>>> >
>>>> > _____________________________________________________________
>>>> > MacOSX-Emacs mailing list
>>>> > MacOSX-Emacs at email.esm.psu.edu
>>>> > https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
>>>> > List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
>>>>
>>>> Prof José Figueroa-O'Farrill
>>>> School of Mathematics
>>>> University of Edinburgh
>>>> PGP Key: 0x6A6BD529 (MIT PGP Key Server)
>>>>
>>>> The University of Edinburgh is a charitable body, registered in
>>>> Scotland, with registration number SC005336.
>>>>
>>>>
>>>>
>>>>
>>>> _____________________________________________________________
>>>> MacOSX-Emacs mailing list
>>>> MacOSX-Emacs at email.esm.psu.edu
>>>> https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
>>>> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
>>>>
>>>
>>> _____________________________________________________________
>>> MacOSX-Emacs mailing list
>>> MacOSX-Emacs at email.esm.psu.edu
>>> https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
>>> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
>>>
>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20201102/6680e457/attachment.htm>


More information about the MacOSX-Emacs mailing list