2

I'm fairly new to spacemacs/emacs, so apologies if this is a trivial question.

I'm using org-mode for my notes, stored within nvAlt. This works wonderfully in terms of searching/syncing, however emacs seems to keep creating numbered backups. I.e. if I have a note called todo.org, it will keep creating files called todo.1.org all the way through to todo.10.org and so on. Furthermore, the currently opened buffer would undo a bunch of latest changes I made, presumably because a new backup was created. This can be rather irritating.

I looked into how emacs handles backups, and this seems to be slightly different to the classic numbered backups (i.e. I would expect them to look like todo.org.~1~), so it seems like a custom backup format to spacemacs.

I did try to move the backups to a different location via

(setq backup-directory-alist `(("." . "~/.emacs_saves")))
(setq backup-by-copying t)
(setq auto-save-file-name-transforms `(("." "~/.emacs_saves" t)))

but to no avail.

What would be a good way to move the backup files, so they don't cause the abrupt "undos"?

1
  • Have you looked into whether nvalt's autosaving has something to do with this? I haven't used spacemacs, but I use org-mode extensively, and have never heard of this behavior. Try setting (setq backup-inhibited t) and (setq auto-save-default nil) to see if the behaviour continues
    – elethan
    Jan 8, 2016 at 2:08

1 Answer 1

2

Those numbered files are created by nvALT when Emacs and nvALT both attempt to write to the same file. When there's a conflict, nvALT creates those files to prevent data loss.

Remember, nvALT saves files automatically, so if you have it open at the same time as Emacs, you may run into conflicts, as well as these duplicate files.

Note that Emacs has its own nvALT clone, deft-mode. Like nvALT, deft-mode allows incremental searching, as well as creating new text files from within the search interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.