code: def buffer_edit(editor, location, force=False):
      
      if location is None:
          # Edit/open without a location will reload the current file, if there are
          # no changes.
          eb = editor.window_arrangement.active_editor_buffer
          if eb.location is None:
              editor.show_message(_NO_FILE_NAME)
          elif not force and eb.has_unsaved_changes:
              editor.show_message(_NO_WRITE_SINCE_LAST_CHANGE_TEXT)
          else:
              eb.reload()
      else:
          editor.file_explorer = ''
          editor.window_arrangement.open_buffer(location, show_in_current_window=True)
docs: Edit new buffer.