Skip to content

Commit

Permalink
Move non-config files out of .emacs.d
Browse files Browse the repository at this point in the history
Most of them were moved to ~/.cache/emacs.
Hopefully soon emacs will be able to use ~/.config/emacs as well.
  • Loading branch information
rosslagerwall committed Dec 6, 2012
1 parent 5dc1524 commit 402dba6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
auto-save-list
_backups
%backup%~
saveplace
tramp
*~
11 changes: 9 additions & 2 deletions init.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
;; .emacs

; To set this up,
; mkdir -p ~/.cache/emacs{,backups,auto-save-list}

;; set up load path
(add-to-list 'load-path "~/.emacs.d")

Expand Down Expand Up @@ -27,7 +30,11 @@

;; make all backups in a single directory
(setq backup-directory-alist
`(("." . ,(expand-file-name "~/.emacs.d/_backups"))))
`(("." . ,(expand-file-name "~/.cache/emacs/backups"))))

;; record auto-save-list in the cache directory
(setq auto-save-list-file-prefix
(expand-file-name "~/.cache/emacs/auto-save-list/"))

;; make the font a bit bigger
(set-face-attribute 'default nil :height 110)
Expand All @@ -47,7 +54,7 @@
;; (if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))

;; remember the previous place in visited buffers
(setq save-place-file "~/.emacs.d/saveplace") ;; keep my ~/ clean
(setq save-place-file "~/.cache/emacs/saveplace") ;; keep my ~/ clean
(setq-default save-place t) ;; activate it for all buffers
(require 'saveplace) ;; get the package

Expand Down
2 changes: 2 additions & 0 deletions other.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
;; ido makes competing buffers and finding files easier
;; http://www.emacswiki.org/cgi-bin/wiki/InteractivelyDoThings
(require 'ido)
(setq ido-save-directory-list-file "~/.cache/emacs/ido.last")
;; more flexible matching
(setq ido-enable-flex-matching t)
(setq ido-file-extensions-order '(".c" ".cpp" ".py" ".java"))
Expand All @@ -31,6 +32,7 @@


(require 'recentf)
(setq recentf-save-file (recentf-expand-file-name "~/.cache/emacs/recentf"))

;; bind recent file open to F7
(global-set-key (kbd "<f7>") 'ido-recentf-open)
Expand Down

0 comments on commit 402dba6

Please sign in to comment.