-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Backups #8947
Comments
As an Emacs user for decades who recently switched to spacemacs, I'm slightly confused: Why is the following in ;; don't create backup~ files
(setq make-backup-files nil) #2271 mentions that there is a rationale for this, but what is it? What can I do to get the traditional way back, e.g. only 1 non-numbered backup living directly next to the original file? Googling around didn't show anything useful. Has setting back Having at least one backup of the previous state is essential for an editor IMHO, not every file is under version control. |
I absolutely agree with @svenpanne Why use such a bad default at all? I just lost a file which I couldn't recover from auto-save, and was really upset with this no backup policy. Especially, since usually the defaults in spacemacs are set in a smart way. |
Here here. I'd love to know more context/history about this one. |
As #2271 pointed out, Spacemacs does save backups for local and remote edits under |
@hyiltiz these are not backups, but rather autosaves. See http://pragmaticemacs.com/emacs/auto-save-and-backup-every-save/ :
Spacemacs does auto saves, but not backups @GregorySchwartz provided a nice descriptions on how backups could be configured in spacemacs and I've coded something like that in a layer #11903 |
As mentioned in #2271, this line in the snipped above |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
I believe this feature is still very much needed. |
@GregorySchwartz could you propose what needs to be done by Spacemacs to resolve then close it? |
I think people (including me) simply want the traditional Emacs behavior back, i.e. keeping (perhaps numbered) backups of files which are not under version control. I think almost nobody understands in detail why this isn't the case with Spacemacs or how to fix that, because nobody really understands the rationale for disabling it. 🤔 |
@hyiltiz I currently use my solution in the original post, but it looks like @igor-kupczynski submitted a pull request for their own layer in #11903. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
I believe this is valuable behaviour and do not understand why it is disabled. (I just spent a good 15 min trying to figure out why I couldn't find any backup files until I eventually found this issue). If for some reason spacemacs is against creating backups in the local directory, they could be stored by default in a similar location to autosaves, ie This could be enabled in the default config with something along the lines of:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
I somehow had half of a document deleted and looked for the backups with autosave. However, there is a discrete difference in autosave verses backups. I was curious as to why there were no backups being generated and found #2271. I don't think this is a solution to the backups problem by disabling it completely -- I had to re-enable it and come up with my own configurations to save backups per session
~/.backups/per-session
and per save~/.backups/per-save
. Can we have a nice interface for this in spacemacs?Gathered from around the web, probably all from https://stackoverflow.com/questions/151945/how-do-i-control-how-emacs-makes-backup-files#151946:
The text was updated successfully, but these errors were encountered: