Since emacsclient can handle long package loading time proerly, I really want to keep at least one emacs process, and most of the time only one emacs process, open as a background process and better hide GUI.
Right now I defined the following function in .bashrc:
emc ()
{
if [[ $# -eq 0 ]]; then
emacs --eval "(suspend-frame)" &
return
fi
args=($*);
setsid emacsclient -c -e "(find-file \"${args[*]}\")"
}
And also have the following line in .bashrc:
emc
So everytime I open up a shell, I will end up having a new emacs process.
The problem is I will have many additional unnecessary emacs process after opening up many shells. However, I only want to maintain one single emacs process all the time from startup better hide GUI.