config/doom: Dynamically resolve data dirs in doom config

This commit is contained in:
xerus2000 2020-10-12 22:13:22 +02:00
parent 392d85eb2b
commit 5031a56bd1
1 changed files with 12 additions and 8 deletions

View File

@ -3,7 +3,6 @@
;; Place your private configuration here! Remember, you do not need to run 'doom ;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file! ;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email ;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. ;; clients, file templates and snippets.
(setq user-full-name "xerus" (setq user-full-name "xerus"
@ -38,7 +37,7 @@
(setq auto-save-default t) (setq auto-save-default t)
(setq auto-save-interval 40) (setq auto-save-interval 40)
(setq backup-directory-alist `(("" . "~/.emacs.d/backups/"))) (setq backup-directory-alist `(("" . (expand-file-name "backups" user-emacs-directory))))
(setq delete-old-versions t (setq delete-old-versions t
kept-new-versions 6 kept-new-versions 6
kept-old-versions 2 kept-old-versions 2
@ -46,29 +45,34 @@
(setq vc-make-backup-files t) (setq vc-make-backup-files t)
(setq undo-tree-auto-save-history t) (setq undo-tree-auto-save-history t)
(setq undo-tree-history-directory-alist `(("" . "~/.emacs.d/backups/undo/"))) (setq undo-tree-history-directory-alist `(("" . (expand-file-name "backups/undo" user-emacs-directory))))
(setq amalgamating-undo-limit 5) (setq amalgamating-undo-limit 5)
; (advice-add 'undo-auto--last-boundary-amalgamating-number :override #'ignore) ; (advice-add 'undo-auto--last-boundary-amalgamating-number :override #'ignore)
(load! "./local.el" nil t)
; ORG ; ORG
(require 'org) (require 'org)
(setq org-image-actual-width 300) (setq org-image-actual-width 300)
(defvar user-data-dir "~/data")
;; If you use `org' and don't want your org files in the default location below, ;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads! ;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/daten/1-projects") (let ((default-directory user-data-dir))
(setq org-agenda-files (apply 'append (setq org-directory (expand-file-name "1-projects"))
(setq org-agenda-files (apply 'append
(mapcar (mapcar
(lambda (directory) (lambda (directory)
(directory-files-recursively (directory-files-recursively
directory org-agenda-file-regexp)) directory org-agenda-file-regexp))
'("~/daten/Dropbox/dokumente/notes" "~/daten/1-projects" "~/daten/2-standards" "~/daten/3-resources")))) '("Dropbox/dokumente/notes" "1-projects" "2-standards" "3-resources"))))
; (setq org-agenda-files '("~/daten/Dropbox/dokumente/notes" "~/daten/1-projects" "~/daten/2-standards" "~/daten/3-resources")) (setq org-roam-directory (expand-file-name "2-standards/org-roam"))
(setq org-roam-directory "~/daten/2-standards/org-roam") )
(setq default-directory org-directory) (setq default-directory org-directory)