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

Roussanka Loukanova rl.stpuu at gmail.com
Sat Jan 2 10:04:42 EST 2021


Hi Ettore, and Everyone,

Of course, my best wishes are also to Ettore and everybody on this list:
safety, good health, happiness, success, with the New 2021 and the years to
come!
Roussanka




On Sat, Jan 2, 2021 at 3:33 PM Ettore Aldrovandi <ealdrov at math.fsu.edu>
wrote:

> Dear Win, Roussanka,
>
> Happy New Year!
>
> One more information morsel. An unrelated issue made me realize that
> Aquamacs, and also other variants like YAMAMOTO Mitsuharu’s Emacs port,
> which I also use,  read .zprofile when launched with a double-click.
>
> To recap, in the Z shell .zprofile is read by login shells. If they are
> not interactive, as it appears the ones run under the window server are,
> they will not read .zshrc, so anything set there, in particular PATH, will
> not be read. So, it’s good news, at least to me, that .zprofile is read: I
> had an issue that I wanted  my $HOME/.cabal/bin in front of the path (in
> emacs too), and exporting from .zprofile did it. (I have to still do the
> same export from .zshrc for the Terminal: its shells are non-login and
> interactive, so .zprofile is not read.)
>
> All the best and a happy and safe 2021 to everyone,
>
> —Ettore
>
> On Jan 2, 2021, at 04:00, Roussanka Loukanova <rl.stpuu at gmail.com> wrote:
>
> Dear Win,
>
> Thank you very much for your work! If I can help somehow, I'll do my best
> to try, but I'm not sure whether I can do more than that description. In
> any case, I'll use and test the new release.
>
> I wish you, your family, and everyone close to you, safety, good health,
> happiness, success, with the New 2021 and the years to come!
>
> Best Regards,
> Roussanka
>
>
>
>
> On Sat, Jan 2, 2021 at 4:48 AM Win Treese <treese at acm.org> wrote:
>
>> Hi, Roussanka. Happy New Year!
>>
>> Thanks for your patience on this one. I’ve been through the discussion,
>> and I think I understand what to look for, although I haven’t quite figured
>> out how to describe it nicely in a bug report.
>>
>> You’re right about working better with zsh in the modern Mac world, and
>> I’m going to try putting in some code to deal with it for the upcoming 3.6
>> release.
>>
>> Best,
>>
>> - Win
>>
>>
>> > On Nov 3, 2020, at 2:32 AM, Roussanka Loukanova <rl.stpuu at gmail.com>
>> wrote:
>> >
>> > Hi Ettore,
>> > Hi Win
>> >
>> > On Tue, Nov 3, 2020 at 1:43 AM Ettore Aldrovandi <ealdrov at math.fsu.edu>
>> wrote:
>> > So it’s working?
>> >
>> >
>> > Yes, it works.
>> >
>> > But I'm somewhat suspicious that Aquamacs needs to be updated with
>> respect to how it handles its accesses via PATH - after Catalina has moved
>> to zsh.
>> >
>> > The discrepancy is, or might be, that there is a difference between a
>> login and non login shell in their startup mechanisms. It depends on
>> whether you have still disabled .zprofile, which, if I remember correctly,
>> sources .zshrc. This is OK, by the way: my .zprofile doesn’t do anything,
>> and in particular it does not source .zshrc.
>> >
>> > Two more comments: bash is very similar in its distinction between
>> login vs. non-login shell and interactive vs. non-interactive. Second, you
>> can go back to bash, if you were using it before, especially if it worked.
>> You can run
>> >
>> >       chsh -s /bin/bash
>> >
>> > I do not have any specific needs for one of these vs. the other, and
>> would prefer the default one that is set by Apple with its macOS. And,
>> learn as much as I can on pop-up needs. Before it was with bash, now with
>> zsh :)
>> >
>> > So, Aquamacs should be updated to go in pace together with the macOS,
>> for which it is created :) We need and enjoy our work with Aquamacs & macOS!
>> >
>> > Thanks, to all of you.
>> > Keep safe in these difficult times, and take care for yourself and
>> everyone close to you,
>> > Roussanka
>> >
>> >
>> > It will ask your password. (Or you can use “dscl” for the same effect,
>> but with a different syntax. )
>> >
>> > —Ettore
>> >
>> >> On Nov 2, 2020, at 16:42, Roussanka Loukanova <rl.stpuu at gmail.com>
>> wrote:
>> >>
>> >> More puzzles, which, perhaps, point to some inconsistencies of
>> Aquamacs PATH, with respect to zsh:
>> >>
>> >> By launching Aquamacs from terminal:
>> >> $ open -a aquamacs
>> >> in Aquamacs *Messages*:
>> >> 23 environment variables imported from login shell (/bin/zsh).
>> >>
>> >> In another Restart of the Mac and launching Aquamacs from Dock:
>> >> In Aquamacs *Messages*, I get alternative number of variables:
>> >>
>> >> 16 environment variables imported from login shell (/bin/zsh).
>> >> or
>> >> 19 environment variables imported from login shell (/bin/zsh).
>> >>
>> >> with the same:
>> >> M-x getenv
>> >> PATH
>> >>
>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Library/TeX/texbin:/usr/local/texlive/2020/bin
>> >>
>> >> Best Regards,
>> >> Roussanka
>> >>
>> >>
>> >>
>> >>
>> >> On Mon, Nov 2, 2020 at 10:25 PM Roussanka Loukanova <
>> rl.stpuu at gmail.com> wrote:
>> >> Hi Ettore,
>> >>
>> >> did you logout and logged back in?
>> >>
>> >> Yes, 2-3 times, just in case to triple check all those files and PATH
>> and SHELL variables. They are the same, except for the PATH from Aquamacs:
>> >> ----------------
>> >> by moving .zprofile to
>> >> t.zprofile
>> >> keeping:
>> >> .zshrc
>> >>
>> >> in Aquamacs *Messages*:
>> >> 16 environment variables imported from login shell (/bin/zsh).
>> >>
>> >> M-x getenv
>> >> PATH
>> >>
>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Library/TeX/texbin:/usr/local/texlive/2020/bin
>> >> -----------
>> >>
>> >> Alternatively, do you see any difference in the environment if you
>> open a fresh Terminal and run "zsh -l" in it?
>> >>
>> >> Is this the pipe key? Here is what I get:, which seems strange:
>> >>
>> >> ~ $ zsh -|
>> >> pipe> quit
>> >> zsh: command not found: quit
>> >> update_terminal_cwd:printf:21: write error: broken pipe
>>
>> >> update_terminal_cwd:21: write error: broken pipe
>> >> ~ $
>> >>
>> >> I even do not know how to terminate this process, and  did it via
>> quitting Terminal, which asked me to terminate it.
>> >>
>> >> I don’t see anything untoward in your .zprofile file.
>> >>
>> >> It looks to me that  Aquamacs doesn't do its PATH properly in the
>> presence of the local ~/.zprofile. But this is no proof, just based on my
>> test of moving it away, by moving it to ~/t.zprofile.
>> >>
>> >> It should not make a difference, but can you double check for the
>> presence of a ~/.zshenv?
>> >>
>> >>  ~ $ more .zshenv
>> >> .zshenv: No such file or directory
>> >> ~ $
>> >>
>> >> I'm quite puzzled, even with the poor knowledge I have about the zsh
>> and shells. I do not know the syntax of their source code: I just try to
>> handle some minimal code to get the prompt in Terminal explicitly display
>> the full path of the directory where I go. I am still worried about the
>> aliases and the function defined in my ~/.zshrc inherited from my old bash.
>> >>
>> >> Best Regards,
>> >> Roussanka
>> >>
>> >> —Ettore
>> >>
>> >>> On Nov 2, 2020, at 14:30, Roussanka Loukanova <rl.stpuu at gmail.com>
>> wrote:
>> >>>
>> >>> Hi Ettore and Win,
>> >>>
>> >>> I've done one more test, which seems to  improve the PATH value for
>> Aquamacs and allows access to ps2pdf, but I do not know whether this solves
>> the problems, or is just a test with some improvement.
>> >>>
>> >>> ----------------
>> >>> by moving .zprofile to
>> >>> t.zprofile
>> >>> keeping:
>> >>> .zshrc
>> >>>
>> >>> 19 environment variables imported from login shell (/bin/zsh)
>> >>>
>> >>> M-x getenv
>> >>> PATH
>> >>>
>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Library/TeX/texbin:/usr/local/texlive/2020/bin
>> >>>
>> >>> ~ $ echo $PATH
>> >>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
>> >>> ~ $
>> >>> ~ $ echo $SHELL
>> >>> /bin/zsh
>> >>>
>> >>> latex+dvi+ps2pdf seem fine from Aquamacs
>> >>>
>> >>> ----------------
>> >>> Best Regards,
>> >>> Roussanka
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Nov 2, 2020 at 7:17 PM Roussanka Loukanova <
>> rl.stpuu at gmail.com> wrote:
>> >>> Hi Ettore,
>> >>>
>> >>> Sorry I've not been able to answer earlier.
>> >>>
>> >>> Indeed, my ~/.zprofile and  ~/.zshrc are interfering and messing up
>> the PATH environment variable, at least in Aquamacs, hopefully not more.
>> >>>
>> >>> I upgraded to Catalina macOS this Summer, and, as prompted by it, I
>> moved from bash to zsh. I created / exported ~/.zprofile and  ~/.zshrc from
>> the corresponding ones of bash. I followed whatever the Mac's Catalina
>> prompted me for, read Apple Support:
>> >>> https://support.apple.com/en-us/HT208050
>> >>> and some from the zsh website, to which I got from the "man zsh''.
>> Obviously, I didn't get enough details.
>> >>>
>> >>> Here are some tests I've done and the dot files you think would be
>> useful. I would like to get help, feedback, and know what and how. I hope
>> that the upper settings are as they have been from Apple, because I have
>> never attempted to modify them, at least not deliberately.
>> >>>
>> >>> ----------------
>> >>> ----
>> >>> .zprofile
>> >>> --
>> >>> # .zprofile is read by zsh when starting a zsh login shell.
>> >>>
>> >>> # Get the aliases and functions
>> >>> if [ -f ~/.zshrc ]; then
>> >>>     . ~/.zshrc
>> >>> fi
>> >>> #
>> >>> --
>> >>> https://support.apple.com/en-us/HT208050
>> >>> .zshrc
>> >>> --
>> >>> # .zshrc is read by zsh when starting a non-login, interactive
>> >>> # shell.  It is recommended to source it in .zsh_profile so it's
>> >>> # read by login zsh as well.
>> >>>
>> >>> # https://support.apple.com/en-us/HT208050
>> >>> # need of export? I see no difference:
>> >>> # export PS1="%10F%m%f:%11F%1~%f \$ "
>> >>> # export PS1="%11F%0~%f \$ "
>> >>> # %n user ; %1 current dir ; %0 path
>> >>> # export PS1="%n %F{red}%0~%f \$ "
>> >>> # export PS1="%F{red}%0~%f \$ "
>> >>> PS1="%F{red}%0~%f \$ "
>> >>>
>> >>> # User specific aliases and functions
>> >>> alias cp="cp -i"
>> >>> alias rm="rm -i"
>> >>> alias mv="mv -i"
>> >>> trash () { mv "$@" ~/.Trash ; }
>> >>>
>> >>> -- with these dot files:
>> >>> in Aquamacs *Messages*:
>> >>> Warning: Login shell did not return environment.
>> >>> 0 environment variables imported from login shell (/bin/zsh).
>> >>> --
>> >>> from Aquamacs:
>> >>> M-x getenv
>> >>> PATH
>> >>>
>> /usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Library/TeX/texbin:/usr/local/texlive/2020/bin
>> >>>
>> >>> ----------------
>> >>> by moving the dot files to
>> >>> t.zprofile
>> >>> t.zshrc
>> >>>
>> >>> Mon Nov  2 16:57:11
>> >>>
>> >>> ~ % echo $SHELL
>> >>> /bin/zsh
>> >>>
>> >>> % echo $PATH
>> >>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
>> >>> the same as with
>> >>> .zprofile
>> >>> .zshrc
>> >>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
>> >>>
>> >>> from Aquamacs:
>> >>> M-x getenv
>> >>> PATH
>> >>>
>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Library/TeX/texbin:/usr/local/texlive/2020/bin
>> >>> ----
>> >>> ----------------
>> >>> ----------------
>> >>>
>> >>>
>> >>> Ouch. It would probably help Wim to check the content of the
>> following files:
>> >>>
>> >>> /etc/paths
>> >>> ~ $ more /etc/paths
>> >>> /usr/local/bin
>> >>> /usr/bin
>> >>> /bin
>> >>> /usr/sbin
>> >>> /sbin
>> >>> ~ $
>> >>> /etc/zprofile
>> >>>  ~ $ more /etc/zprofile
>> >>> # System-wide profile for interactive zsh(1) login shells.
>> >>>
>> >>> # Setup user specific overrides for this in ~/.zprofile. See
>> zshbuiltins(1)
>> >>> # and zshoptions(1) for more details.
>> >>>
>> >>> if [ -x /usr/libexec/path_helper ]; then
>> >>>         eval `/usr/libexec/path_helper -s`
>> >>> fi
>> >>> ~ $
>> >>>
>> >>> /etc/zshrc
>> >>>
>> >>> ~ $ more /etc/zshrc
>> >>> # System-wide profile for interactive zsh(1) shells.
>> >>>
>> >>> # Setup user specific overrides for this in ~/.zshrc. See
>> zshbuiltins(1)
>> >>> # and zshoptions(1) for more details.
>> >>>
>> >>> # Correctly display UTF-8 with combining characters.
>> >>> if [[ "$(locale LC_CTYPE)" == "UTF-8" ]]; then
>> >>>     setopt COMBINING_CHARS
>> >>> fi
>> >>>
>> >>> # Disable the log builtin, so we don't conflict with /usr/bin/log
>> >>> disable log
>> >>>
>> >>> # Save command history
>> >>> HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
>> >>> HISTSIZE=2000
>> >>> SAVEHIST=1000
>> >>>
>> >>> # Beep on error
>> >>> setopt BEEP
>> >>>
>> >>> # Use keycodes (generated via zkbd) if present, otherwise fallback on
>> >>> # values from terminfo
>> >>> if [[ -r ${ZDOTDIR:-$HOME}/.zkbd/${TERM}-${VENDOR} ]] ; then
>> >>>     source ${ZDOTDIR:-$HOME}/.zkbd/${TERM}-${VENDOR}
>> >>> else
>> >>>     typeset -g -A key
>> >>>
>> >>>     [[ -n "$terminfo[kf1]" ]] && key[F1]=$terminfo[kf1]
>> >>>     [[ -n "$terminfo[kf2]" ]] && key[F2]=$terminfo[kf2]
>> >>>     [[ -n "$terminfo[kf3]" ]] && key[F3]=$terminfo[kf3]
>> >>>     [[ -n "$terminfo[kf4]" ]] && key[F4]=$terminfo[kf4]
>> >>>     [[ -n "$terminfo[kf5]" ]] && key[F5]=$terminfo[kf5]
>> >>>     [[ -n "$terminfo[kf6]" ]] && key[F6]=$terminfo[kf6]
>> >>>     [[ -n "$terminfo[kf7]" ]] && key[F7]=$terminfo[kf7]
>> >>>     [[ -n "$terminfo[kf8]" ]] && key[F8]=$terminfo[kf8]
>> >>>     [[ -n "$terminfo[kf9]" ]] && key[F9]=$terminfo[kf9]
>> >>>     [[ -n "$terminfo[kf10]" ]] && key[F10]=$terminfo[kf10]
>> >>>     [[ -n "$terminfo[kf11]" ]] && key[F11]=$terminfo[kf11]
>> >>>     [[ -n "$terminfo[kf12]" ]] && key[F12]=$terminfo[kf12]
>> >>>     [[ -n "$terminfo[kf13]" ]] && key[F13]=$terminfo[kf13]
>> >>>     [[ -n "$terminfo[kf14]" ]] && key[F14]=$terminfo[kf14]
>> >>>     [[ -n "$terminfo[kf15]" ]] && key[F15]=$terminfo[kf15]
>> >>>     [[ -n "$terminfo[kf16]" ]] && key[F16]=$terminfo[kf16]
>> >>>     [[ -n "$terminfo[kf17]" ]] && key[F17]=$terminfo[kf17]
>> >>>     [[ -n "$terminfo[kf18]" ]] && key[F18]=$terminfo[kf18]
>> >>>     [[ -n "$terminfo[kf19]" ]] && key[F19]=$terminfo[kf19]
>> >>>     [[ -n "$terminfo[kf20]" ]] && key[F20]=$terminfo[kf20]
>> >>>     [[ -n "$terminfo[kbs]" ]] && key[Backspace]=$terminfo[kbs]
>> >>>     [[ -n "$terminfo[kich1]" ]] && key[Insert]=$terminfo[kich1]
>> >>>     [[ -n "$terminfo[kdch1]" ]] && key[Delete]=$terminfo[kdch1]
>> >>>     [[ -n "$terminfo[khome]" ]] && key[Home]=$terminfo[khome]
>> >>>     [[ -n "$terminfo[kend]" ]] && key[End]=$terminfo[kend]
>> >>>     [[ -n "$terminfo[kpp]" ]] && key[PageUp]=$terminfo[kpp]
>> >>>     [[ -n "$terminfo[knp]" ]] && key[PageDown]=$terminfo[knp]
>> >>>     [[ -n "$terminfo[kcuu1]" ]] && key[Up]=$terminfo[kcuu1]
>> >>>     [[ -n "$terminfo[kcub1]" ]] && key[Left]=$terminfo[kcub1]
>> >>>     [[ -n "$terminfo[kcud1]" ]] && key[Down]=$terminfo[kcud1]
>> >>>     [[ -n "$terminfo[kcuf1]" ]] && key[Right]=$terminfo[kcuf1]
>> >>> fi
>> >>>
>> >>> # Default key bindings
>> >>> [[ -n ${key[Delete]} ]] && bindkey "${key[Delete]}" delete-char
>> >>> [[ -n ${key[Home]} ]] && bindkey "${key[Home]}" beginning-of-line
>> >>> [[ -n ${key[End]} ]] && bindkey "${key[End]}" end-of-line
>> >>> [[ -n ${key[Up]} ]] && bindkey "${key[Up]}" up-line-or-search
>> >>> [[ -n ${key[Down]} ]] && bindkey "${key[Down]}" down-line-or-search
>> >>>
>> >>> # Default prompt
>> >>> PS1="%n@%m %1~ %# "
>> >>>
>> >>> # Useful support for interacting with Terminal.app or other terminal
>> programs
>> >>> [ -r "/etc/zshrc_$TERM_PROGRAM" ] && . "/etc/zshrc_$TERM_PROGRAM"
>> >>> ~ $
>> >>>
>> >>> ~/.zshenv
>> >>> ~ $ more /.zshenv
>> >>> /.zshenv: No such file or directory
>> >>> ~ $
>> >>>
>> >>> ~/.zshrc
>> >>> ~ $ more .zshrc
>> >>> # .zshrc is read by zsh when starting a non-login, interactive
>> >>> # shell.  It is recommended to source it in .zsh_profile so it's
>> >>> # read by login zsh as well.
>> >>>
>> >>> ## test colour:
>> >>> # print -P '%B%F{red}co%F{green}lo%F{blue}rs%f%b'
>> >>>
>> >>> # https://support.apple.com/en-us/HT208050
>> >>> # need of export?
>> >>> # export PS1="%10F%m%f:%11F%1~%f \$ "
>> >>> # export PS1="%11F%0~%f \$ "
>> >>> # %n user ; %1 current dir ; %0 path
>> >>> # export PS1="%n %F{red}%0~%f \$ "
>> >>> # export PS1="%F{red}%0~%f \$ "
>> >>> PS1="%F{red}%0~%f \$ "
>> >>>
>> >>> # User specific aliases and functions
>> >>> alias cp="cp -i"
>> >>> alias rm="rm -i"
>> >>> alias mv="mv -i"
>> >>> trash () { mv "$@" ~/.Trash ; }
>> >>> ~ $
>> >>>
>> >>> ~/.zprofile
>> >>>  ~ $ more .zprofile
>> >>> # .zprofile is read by zsh when starting a zsh login shell.
>> >>>
>> >>> # Get the aliases and functions
>> >>> if [ -f ~/.zshrc ]; then
>> >>>     . ~/.zshrc
>> >>> fi
>> >>> #
>> >>> ~ $
>> >>>
>> >>> ~/.profile
>> >>>  ~ $ more .profile
>> >>> .profile: No such file or directory
>> >>> ~ $
>> >>>
>> >>> just in case. We should exclude the possibility that zsh is to blame.
>> More precisely, the difference between a login shell and the non-login one
>> that is executed by the single Terminal instances.
>> >>>
>> >>> I've been learning these days with all this. Thanks for your help!
>> >>>
>> >>> Best Regards,
>> >>> Roussanka
>> >>> —Ettore
>> >>>
>> >>> Ettore Aldrovandi
>> >>> Department of Mathematics, Florida State University
>> >>> 1017 Academic Way                *   http://www.math.fsu.edu/~ealdrov
>> >>> Tallahassee, FL 32306-4510, USA * * aldrovandi at math dot fsu dot edu
>> >>>
>> >>
>> >
>> >
>> > _____________________________________________________________
>> > 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
>>
>
> _____________________________________________________________
> 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/20210102/f6eb1ec5/attachment.htm>


More information about the MacOSX-Emacs mailing list