Ali Gholami Rudi  committed 9782e6c

ropemacs: saving nonexistent files

  • Participants
  • Parent commits 99288cf

Comments (0)

Files changed (2)

File docs/dev/workingon.txt

 ropemacs Mode
-- Validating projects before every command
-* Only activating the keybinding in python files
+* Only activating keybinding in python files
 * Specifying refactoring options
 * Updating docs

File rope/contrib/

     def before_save_actions(self):
         if self.project is not None:
             resource = self._get_resource()
-            if resource is not None:
+            if resource is not None and resource.exists():
                 self.old_content =
                 self.old_content = ''
         if project is not None:
             self.project = None
-            lisp.message('Project closed.')
+            lisp.message('Project closed')
     def do_rename(self, newname, module=False):
     def _get_resource(self):
         filename = lisp.buffer_file_name()
-        resource = libutils.path_to_resource(self.project, filename)
+        resource = libutils.path_to_resource(self.project, filename, 'file')
         return resource
     def _check_project(self):