I am trying to transfer most of my editing and shell operations to emacs so that I can easily continue my workflow from different computers. I also have different emacs instances for my different projects. For example, I run:
emacs --daemon=project1 emacs --daemon=project2
Then, when I want to run the frame to work on project1, I do:
emacsclient -s project1 -c
It basically works fine, but I am having problems running tools from my emacs shells that are trying to start the editor using $ EDITOR. Of course, in this case, I want a new buffer to appear in my current emacs instance for what emacsclient is for. Therefore, if in the shell buffer in emacs project1 I say:
export EDITOR='emacsclient -s project1'
then in this particular shell everything works fine.
My question is, how can I automatically set the EDITOR variable so that it points to the emacs instance in which the current shell is running?
source share