In Mac OS:
open -a Emacs -n --args -q --eval='(setq user-emacs-directory "~/dot.emacs")' -l ~/dot.emacs/init.el
In console line:
emacs -q --eval='(setq user-emacs-directory "~/dot.emacs")' -l ~/dot.emacs/init.el
In Mac OS:
open -a Emacs -n --args -q --eval='(setq user-emacs-directory "~/dot.emacs")' -l ~/dot.emacs/init.el
In console line:
emacs -q --eval='(setq user-emacs-directory "~/dot.emacs")' -l ~/dot.emacs/init.el
This works for Bash and ZSH
openemacs() {
# this function receives a folder name that's inside of ~/emacs folder
# it's useful when we want to open multi emacs instances with different settings files
EMACS_USER_FOLDER="$HOME/emacs/$1/"
EMACS_USER_INIT_FILE="$HOME/emacs/$1/init.el"
EVAL_EMACS="'(setq user-emacs-directory \"$EMACS_USER_FOLDER\")'"
eval "open -a Emacs -n --args -q --eval=$EVAL_EMACS -l $EMACS_USER_INIT_FILE"
}
ZSH: