-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backup or trash conflict file instead of remove #6
Comments
That’s a good idea! I don’t know when I’ll have time to work on all this but I’ll try to at least take a pass at having an archive / trash / rename feature. |
Thanks that would be really nice! |
I also noticed that conflict files deleted by Looking at the documentation for
|
Thank you for this very useful tool!
I have a suggestion regarding the deletion of conflict files.
As it can easily happen that one does a mistake when resolving a conflict and first notices it a bit later, I find it problematic to delete the conflict file right-away. Currently,
emacs-conflict-resolve-conflicts
asks whether to delete after quittingediff
. If one doesn't delete it, it will of course be presented again for resolving, which one doesn't want either.My suggestion would be that in addition to delete or not delete there is another option, "archive" or "trash" (or both). It would move the conflict file to the trash or to a configurable directory.
Or it renames
myfile.sync-conflict-xxx.org
tomyfile.sync-conflict-xxx-resolvedYYYYMMDD-HHMMSS.org
, which has the advantage that the file can be kept in the same directory without being recognized as a conflict (when adapting the regex accordingly).With this, after resolving a conflict, the function could ask for (a)rchive, (t)rash, (d)elete, (k)eep.
There should also be a variable where one can set the choice permanently, where I can imagine that "trash" or "archive" would be the preferable choices.
Now if one messed up a resolving and the file is in the archive or the trash, one can simply use ediff manually with it, or in the case of renamed files, there could be a special function that searches for "resolved" conflict files instead of new conflict files.
As a bonus, there would be a cleanup function which deletes (or trashes) archived/resolved conflict files when they become too old or exceed a certain number per file. This function could be called (optionally) after each call to
emacs-conflict-resolve-conflicts
.The text was updated successfully, but these errors were encountered: