'Save copy of file as...'

def save_copy_as(self, index=None):

    if (index is None):
        index = self.get_stack_index()
    finfo = self.data[index]
    filename = self.select_savename(finfo.filename)
    if filename:
        ao_index = self.has_filename(filename)
        if (ao_index and (ao_index != index)):
            if (not self.close_file(ao_index)):
                return
            if (ao_index < index):
                index -= 1
        txt = to_text_string(finfo.editor.get_text_with_eol())
        try:
            finfo.encoding = encoding.write(txt, filename, finfo.encoding)
            self.file_saved.emit(str(id(self)), index, filename)
            self.plugin_load.emit(filename)
            return True
        except EnvironmentError as error:
            self.msgbox = QMessageBox(QMessageBox.Critical, _('Save'), (_("<b>Unable    to    save    file    '%s'</b><br><br>Error    message:<br>%s") % (osp.basename(finfo.filename), str(error))), self)
            self.msgbox.exec_()
    else:
        return False
