#114: Set Ubuntu crontab default editor

Solved!
At some point my Ubuntu installation's crontab decided to use nano as its default editor, despite my having switched it to emacs.

Upon using crontab -e, I get dropped into nano. On completion of the edit, the shell reports: "/usr/bin/sensible-editor: 25: /usr/bin/emacs22: not found".

Looks like my emac was recently upgraded to emacs23, but I could not find a way to edit the sensible-editor script. Using the default Debian update-alternatives --config editor command did not fix the problem.

Setting Ubuntu's default sensible-editor

13
Turns out there is another tool in Ubuntu used to set the sensible-editor. In particular:
sudo /usr/bin/select-editor
will change the editor being used by sensible-editor, and by extension, the crontab -e invocation.

Not sure what the relationship is between the Debian Alternatives system and this select-editor util. I'm learning something new every day with these newfangled distros :p

Think you've got a better solution? Help 92049143cabb7ba896d7c06e19906303_small yliu out by posting your solution