[OS X Emacs] latex + dvips + ps2pdf from Aquamacs
Roussanka Loukanova
rl.stpuu at gmail.com
Mon Nov 2 13:17:35 EST 2020
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''. O
bviously, 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20201102/fb85e2cd/attachment.htm>
More information about the MacOSX-Emacs
mailing list