I was trying to set 'emacs-nw' (for emacs -nw) as the editor for sudoedit, crontab, &c, but I copied what I've done previously on Ubuntu systems without checking the links first.
So I did:
sudo update-alternatives --install /usr/bin/sensible-editor editor /root/bin/emacs-nw 2 sudo update-alternatives --set editor /root/bin/emacs-nw
then discovered that the link on Raspbian is '/usr/bin/editor'. Oops! I've tried to fix it this way:
sudo update-alternatives --remove editor /root/bin/emacs-nw sudo update-alternatives --install /usr/bin/editor editor /root/bin/emacs-nw 2 sudo update-alternatives --set editor /root/bin/emacs-nw
but I'm stuck in a situation where if I don't put a symlink from '/usr/bin/sensible-editor' to '/usr/bin/editor', I get this sort of error:
$ crontab -e /bin/sh: 1: /usr/bin/sensible-editor: not found crontab: "/usr/bin/sensible-editor" exited with status 127
Anyone know how to fix this?
Thanks.