Add oni-data-dir
This commit is contained in:
parent
ba7e1b9308
commit
bab53707b6
5 changed files with 57 additions and 18 deletions
|
@ -4,8 +4,8 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 20190218165405
|
||||
;; Package-Requires: (clojure-mode cider clojure-mode-extra-font-locking paredit rainbow-delimiters)
|
||||
;; Version: 20190227232633
|
||||
;; Package-Requires: (clojure-mode cider clojure-mode-extra-font-locking paredit rainbow-delimiters oni-data-dir)
|
||||
|
||||
;; 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
|
||||
|
@ -26,10 +26,11 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'cider)
|
||||
(require 'clojure-mode)
|
||||
(require 'clojure-mode-extra-font-locking)
|
||||
(require 'inf-lisp)
|
||||
(require 'cider)
|
||||
(require 'oni-data-dir)
|
||||
|
||||
(defun oni-clojure-set-inferior-lisp ()
|
||||
"Set `inferior-lisp-program' to use Lein."
|
||||
|
@ -54,8 +55,7 @@
|
|||
(setq cider-show-error-buffer t
|
||||
cider-auto-select-error-buffer t)
|
||||
|
||||
(setq cider-repl-history-file
|
||||
(concat user-emacs-directory "data/cider-history"))
|
||||
(setq cider-repl-history-file (oni-data-dir-locate "cider-history"))
|
||||
|
||||
(setq cider-repl-wrap-history t)
|
||||
|
||||
|
|
37
oni-data-dir.el
Normal file
37
oni-data-dir.el
Normal file
|
@ -0,0 +1,37 @@
|
|||
;;; oni-data-dir.el --- Data dir configuration -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2019 Tom Willemse
|
||||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 20190227232656
|
||||
|
||||
;; 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Utilities for placing all state files in "data/" inside my
|
||||
;; `user-emacs-directory'.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defconst oni-data-dir--name "data"
|
||||
"The name of the directory all data should live in.")
|
||||
|
||||
(defun oni-data-dir-locate (filename)
|
||||
"Return the location of FILENAME inside the data directory."
|
||||
(concat user-emacs-directory oni-data-dir--name "/" filename))
|
||||
|
||||
(provide 'oni-data-dir)
|
||||
;;; oni-data-dir.el ends here
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 20190226022941
|
||||
;; Version: 20190227233916
|
||||
;; Package-Requires: (oni-data-dir)
|
||||
|
||||
;; 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
|
||||
|
@ -30,14 +31,15 @@
|
|||
(require 'mail-source)
|
||||
(require 'message)
|
||||
(require 'nnfolder)
|
||||
(require 'oni-data-dir)
|
||||
(require 'sendmail)
|
||||
|
||||
(setq gnus-directory (locate-user-emacs-file "data/News")
|
||||
(setq gnus-directory (oni-data-dir-locate "News")
|
||||
gnus-article-save-directory gnus-directory
|
||||
gnus-cache-directory gnus-directory
|
||||
gnus-kill-files-directory gnus-directory)
|
||||
|
||||
(setq mail-source-directory (locate-user-emacs-file "data/Mail")
|
||||
(setq mail-source-directory (oni-data-dir-locate "Mail")
|
||||
message-directory mail-source-directory
|
||||
nnfolder-directory mail-source-directory)
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 20190221004411
|
||||
;; Package-Requires: (jabber)
|
||||
;; Version: 20190227233209
|
||||
;; Package-Requires: (jabber oni-data-dir)
|
||||
|
||||
;; 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
|
||||
|
@ -27,6 +27,7 @@
|
|||
;;; Code:
|
||||
|
||||
(require 'jabber)
|
||||
(require 'oni-data-dir)
|
||||
|
||||
(defun oni-jabber-set-default-directory ()
|
||||
"Set the default directory to my home directory."
|
||||
|
@ -55,10 +56,9 @@ Insert PROPOSED-ALERT in the buffer if it is non-nil."
|
|||
(:connection-type . starttls))))
|
||||
|
||||
(setq jabber-avatar-cache-directory
|
||||
(concat user-emacs-directory "data/jabber/avatars/"))
|
||||
(oni-data-dir-locate "jabber/avatars/"))
|
||||
|
||||
(setq jabber-history-dir
|
||||
(concat user-emacs-directory "data/jabber/hist/"))
|
||||
(setq jabber-history-dir (oni-data-dir-locate "jabber/hist/"))
|
||||
|
||||
(setq jabber-chat-buffer-format "+%n"
|
||||
jabber-chat-foreign-prompt-format "%t %n "
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 20190219003930
|
||||
;; Package-Requires: (projectile ivy)
|
||||
;; Version: 20190227233727
|
||||
;; Package-Requires: (projectile ivy oni-data-dir)
|
||||
|
||||
;; 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
|
||||
|
@ -26,15 +26,15 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'oni-data-dir)
|
||||
(require 'projectile)
|
||||
|
||||
(setq projectile-known-projects-file
|
||||
(concat user-emacs-directory "data/projectile-bookmarks.eld"))
|
||||
(oni-data-dir-locate "projectile-bookmarks.eld"))
|
||||
|
||||
(setq projectile-mode-line-prefix " P")
|
||||
|
||||
(setq projectile-cache-file
|
||||
(concat user-emacs-directory "data/projectile.cache"))
|
||||
(setq projectile-cache-file (oni-data-dir-locate "projectile.cache"))
|
||||
|
||||
(setq projectile-completion-system 'ivy)
|
||||
|
||||
|
|
Loading…
Reference in a new issue