Emacs: how to make it an editor in a midnight-commander?

Adobe picture Adobe · Nov 8, 2011 · Viewed 9.1k times · Source

My question is about Midnight-commander. I've unset usage of internal editor (in Options -> Configuration) and put in .bashrc:

export EDITOR='emacsclient -n'

still - pressing F4 gives nothing, pressing F3 - opens in vi. Is there a way to make emacsclient to be a default text editor in mc?

Answer

Mingjie Li picture Mingjie Li · Apr 20, 2012

Remove ~/.selected_editor, then when you press F4 next time, MC will prompt for select editor. Or, you may directly change it.

$ cat .selected_editor
# Generated by /usr/bin/select-editor
SELECTED_EDITOR="/usr/bin/vim.basic" 

This works on Ubuntu. I have tried any other ways to setup default editor which won't help.