I start emacs server using
then open files using
but the first file has to be opened using
emacsclient -c filename.ext
in order to create a new frame which can be later used by subsequent files without using
-c command line flag for emacsclient.
I want to automate this. "if there is no emacs frame, emacsclient should create a frame else it should use the current frame". How can it be done?