Search code examples
emacsmc

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


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?


Solution

  • 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.