;;; kkk-keepclean.el --- Keep my dirs clean -*- lexical-binding: t; -*- ;; Copyright (C) 2023 Vinicius Teshima ;; Author: Vinicius Teshima ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Commentary: ;; This is some code that will keep my directories clean. ;;; Code: ;; Moving backup files(files ending with ~) to tmp/backup on emacs home (setq backup-directory-alist `(("." . ,(expand-file-name "tmp/backup" user-emacs-directory)))) ;; Moving auto saves(files surounded by #) to tmp/auto-saves on emacs home (make-directory (expand-file-name "tmp/auto-saves/" user-emacs-directory) t) (setq auto-save-list-file-prefix (expand-file-name "tmp/auto-saves/sessions/" user-emacs-directory)) (setq auto-save-file-name-transforms `((".*" ,(expand-file-name "tmp/auto-saves/" user-emacs-directory) t))) (provide 'kkk-keepclean) ;;; kkk-keepclean.el ends here