I would like to set the shell EDITOR to use the existing running instance of GUI Emacs.
On macOS I can type
open -a Emacs file to edit file that way. But how would
EDITOR look to work that way?
What does not work:
export EDITOR="emacs" # launches new gui emacs
export EDITOR="emacsclient" # launches terminal emacs in current shell
export EDITOR="open -a Emacs" # quits editing right away