code: def load_emacs_open_in_editor_bindings():
      
      registry = Registry()
  
      registry.add_binding(Keys.ControlX, Keys.ControlE,
                           filter=EmacsMode() & ~HasSelection())(
           get_by_name('edit-and-execute-command'))
  
      return registry
docs: Pressing C-X C-E will open the buffer in an external editor.