export EDITOR="emacsclient -qa \"emacs --no-window-system --no-desktop\""
sudo -e /somefile doesn't work even when Emacs server is running. I get
emacsclient: unrecognized option '--no-window-system' Try 'emacsclient --help' for more information sudo: /somefile unchanged
git commit does the right thing (Emacs editor for writing up my commit message) with both Emacs server running and not (opens inside terminal).
export EDITOR="emacsclient -qa nano"
sudo -e is happy. So it looks like
git is OK with the spaces in the
-a (alternate editor) option's argument while
sudo is not. But, shouldn't this be a
emacsclient problem? Why do I see these different behaviours.