What am I trying to achieve
I want to use emacsclient
(not emacs
) as my default text editor on Debian Buster.
What have I tried so far
Alternatives:
> sudo update-alternatives --config editor` There are 3 choices for the alternative editor (providing /usr/bin/editor). Selection Path Priority Status ------------------------------------------------------------ 0 /bin/nano 40 auto mode 1 /bin/nano 40 manual mode 2 /usr/bin/emacs 0 manual mode * 3 /usr/bin/vim.basic 30 manual mode
Emacs is listed here, but when I choose
2
, and test usinggit rebase -i HEAD~3
(in a git directory) it launches a newemacs
instance.$EDITOR
&$VISUAL
:I added these 2 lines in my
.bashrc
:EDITOR="emacsclient -nw" VISUAL=emacsclient
I can confirm the values are set but
git rebase -i HEAD~3
still opens avim
. (This is despite the fact the documentation saying that$EDITOR
&$VISUAL
are taken into account )
How can I set my default editor to be emacsclient
, both for terminal & GUI? (Preferably without changing my system in too many places)