- ;; more resilient undo-tree-history if we have its location set up front.
- (setq undo-tree-history-directory-alist '(("." . (concat user-emacs-directory ".undo-tree-history")))
- undo-outer-limit 100000000 ; per undo command
- undo-limit 500000000 ; undo history limit
- undo-strong-limit 600000000 ; undo history limit plus some extra
- ;; Undo in region just happens accidentally, and throws me off
- undo-tree-enable-undo-in-region nil)
- ;; disabled due to bug, something like unknown entry in undo tree canary
- ;; (setq undo-tree-auto-save-history t)
-
- ;; todo, send patch undo-tree-visualize should scroll with the scroll key, instead of just pgup pgdn (aka next/prior)
- (global-undo-tree-mode)
- ;; simple way to fix that enable undo-tree starts out disabled in org-mode
- (defun undo-tree-overridden-undo-bindings-p() nil))
+ (setq undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'" "/git-rebase-todo\\'")))
+
+(unless (equal (user-uid) 0) ; don't make root owned files
+ (global-undo-fu-session-mode)
+ (when (file-exists-p "/p/c/undo-fu-session")
+ (setq undo-fu-session-directory "/p/c/undo-fu-session"))
+ )
+