Commits

kurtharriger committed c9e483f

fix autosave

  • Participants
  • Parent commits 876b5b4

Comments (0)

Files changed (2)

init.d/60-auto-save.el

-(defvar autosave-dir
- (concat dotfiles-dir "autosaves/"))
-(make-directory autosave-dir t)
-(defun auto-save-file-name-p (filename)
-  (string-match "^#.*#$" (file-name-nondirectory filename)))
-(defun make-auto-save-file-name ()
-  (concat autosave-dir
-   (if buffer-file-name
-      (concat "#" (file-name-nondirectory buffer-file-name) "#")
-    (expand-file-name
-     (concat "#%" (buffer-name) "#")))))
+(setq auto-save-default nil)
 
+(require 'real-auto-save)
+(setq real-auto-save-interval 1)
+(add-hook 'find-file-hook 'turn-on-real-auto-save) 
 
-;; Keep emacs in sync with file system and vs versa
-(setq auto-save-list-file-prefix nil)
-(setq auto-save-interval 0)
-(setq auto-save-timeout 1)
-(global-auto-revert-mode t)
-
-;; (setq auto-save-visited-file-name t) doesn't seem to work, try hook instead
-(setq auto-save-visited-file-name t)
-(defun save-buffer-if-visiting-file (&optional args)
-  "Save the current buffer only if it is visiting a file"
-  (interactive)
-  (if (buffer-file-name)
-      (save-buffer args)))
-
-(defun make-auto-save-file-name ()
-  nil)
-
-(defun make-auto-save-file-name-p ()
-  nil)
-
-
-(add-hook 'auto-save-hook 'save-buffer-if-visiting-file)

init.d/60-backup-files.el

 ;; use git or other version control
 ;; the backup files are just anoying
+
 (setq backup-inhibited t)
+(setq make-backup-files nil)