I'm in a strange situation.
Emacs automatically backup all of my files except for some of my orgmode files. And I can't understand why.
Do you have any idea how I can investigate and fix this?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityIf your org files are under version control (which I would recommend) then vc-checkin
sets backup-inhibited
to t
. This makes sense as my .org
files are all under version control and don't need the ~
backup. (I use Version Control Always and SRC - Simple Revision Control
If you really want the ~
backups as well, then M-:
(setq-local backup-inhibited nil)
.
The last time I ran into similar problems was when some of my file or directory names matched a magic variable which is supposed to prevent saving of unwanted things. In my particular case, the project's directory was called something like com.example.githook
and the .git?
matched completion-ignored-extensions
. It's been a while, though, so I'm not 100% it was that variable.
So, while I can't explain why your files are not backed up, maybe this gives you a hint at what to search for: do the filenames of the files which are not backed up look suspicious?
C-h v backup-inhibited
say when evaluated in the buffer of one of the files that don't get backed up? What does it say in other buffers? – NickD Jan 14 '19 at 20:15backup-inhibited
tot
(thanks @NickD) The only place I can see that being set is in./elpa/org-plus-contrib-20181230/ox-odt.el
. Maybe that's the culprit? – wef Jan 15 '19 at 1:27Local Variables
- there must be something setting it tot
asorg-mode
starts up. Maybe I can set it in a late-executing hook - I'll have time to investigate a bit later. On the other hand, maybe there's a good reason for it to bet
??? – wef Jan 15 '19 at 1:40backup-inhibited
tot
? If you happen to find a fix let us know. – Rene Jan 15 '19 at 8:01vc-checkin
in my case (please refer to my answer below and see if it's your use-case). – wef Jan 15 '19 at 8:16