Create `backup' layer to enable auto backup behavior in spacemacs #11903
Conversation
eccaff0
to
e981551
|
Hey, anything I can do to get this accepted? I think it makes sense to have the backup as its own layer. It doesn't add any packages, but layers are described more as a set of features than package groups. I think this offers a new feature (backup per each write, not only per the first write of a file during a session). Judging by the linked issue (and stack overflow discussion), I think this is useful for more than just me. |
e981551
to
6a089a0
6a089a0
to
6a16cbf
6a16cbf
to
3810953
|
w00t w00t |
IssueSaving a new buffer doesn't create any backup files (per-save or per-session).
If it's modified again and saved, then both backup files are created. QuestionShould
Update: Maybe System Info
|
|
I think it should also cover auto-save feature and include |
|
Has this been merged yet? If not, what's blocking it? A sensible and out-of-the-box support is a must for any editor used as the daily drive. It is a shape Spacemacs doesn't do this already... |
|
This PR 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 PR is still need merging! |
|
Given it received little traction for the last 2y and I don't use spacemacs [at least for now] I won't be able to drive this towards a conclusion. I'm closing this one. |
|
I would definitely like this included but don't know enough lisp to help (just trying to add my vote). Totally understand if @igor-kupczynski is no longer interested due to no longer using spacemacs. |
|
@ColeWunderlich I learned emacs lisp helping to get Spacemacs to where I needed it to work. It's possible to do it -- luckily a lot of example syntax exists in Spacemacs so you're never doing anything that has not been written prior. Use other layers as examples. |
Create
backuplayer to enable auto backup behavior in spacemacsRelated to #8947
Note: my first PR against spacemacs, happy to learn why this change sucks and how I can it
This layer adds support for automatic backups.
Emacs default behavior is to backup a file first time it is saved. This behavior results in a lot of
#file_name.ext#files being automatically created. Many people find this annoying and spacemacs turns the auto backup off.This layer re-enables and extends the automatic backups.
Features:
per-session backups
Similar to emacs default behavior, make a backup first time it is saved from emacs session.
per-save backups
Make a backup every time file is saved.
better defaults
Do not clutter working directories with the backups:
~/.emacs.d/.cache/backups/per-session(customize variablebackup-per-session-directoryto override).~/.emacs.d/.cache/backups/per-save(customize variablebackup-per-save-directoryto override).Sane defaults for the backup files:
Install
To use this configuration layer, add it to your
~/.spacemacs. You will need to addbackupto the existingdotspacemacs-configuration-layerslist in this file.Acknowledgments
Inner workings of this layer is based on description by @GregorySchwartz in #8947. Which is in turn inspired by a StackOverflow discussion on the subject.