summary refs log tree commit diff
path: root/config/init-file.el
blob: 9c4e803b1bb9c05d7add7e625eb91cdaaf499ac5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
;;; init-file.el --- Configure things related to files -*- lexical-binding: t -*-
;; Author: Franck Cuny <franck@fcuny.net>

;;; Commentary:

;; Configure things related to files

;;; Code:

(require 'bookmark)

(require 'init-util)

(setq require-final-newline t)

(setq bookmark-default-file (user-data "bookmarks"))

;; Disable backup.
(setq backup-inhibited t)

;; Disable auto save.
(setq auto-save-default nil)
(setq auto-save-list-file-prefix nil)

;; Really, no backups
(setq make-backup-files nil)

(require 'recentf)
(recentf-mode 1)

(setq recentf-auto-cleanup 60)
(setq recentf-exclude
      '("~\\'" "\\`out\\'" "\\.log\\'" "^/[^/]*:" "\\.el\\.gz\\'" "\\.gz\\'"))
(setq recentf-max-saved-items 2000)
(setq recentf-save-file (user-data "recentf"))

(require 'tramp)
(setq tramp-default-method "ssh")
(setq tramp-auto-save-directory "~/.cache/emacs/backups")
(setq tramp-ssh-controlmaster-options "-o ControlMaster=auto -o ControlPath='tramp.%%C'")

(use-package autorevert
  :custom
  (auto-revert-use-notify nil)
  :config
  (global-auto-revert-mode t))

(provide 'init-file)

;;; init-file.el ends here