Start actually caching ltximg, and move general temp dir to $XDG_RUNTIME_DIR
This commit is contained in:
parent
8f0da429f6
commit
b1010e4df6
25
init.el
25
init.el
|
@ -19,17 +19,21 @@
|
|||
use-package-expand-minimally t)
|
||||
(require 'use-package)
|
||||
|
||||
(let ((emacs-tmp-dir (expand-file-name (format "emacs%d" (user-uid))
|
||||
temporary-file-directory)))
|
||||
(setq auto-save-file-name-transforms `((".*" ,emacs-tmp-dir t))
|
||||
auto-save-list-file-prefix emacs-tmp-dir
|
||||
backup-directory-alist (setq undo-tree-history-directory-alist
|
||||
`((".*" . ,emacs-tmp-dir)))
|
||||
org-preview-latex-image-directory (expand-file-name "ltximg" emacs-tmp-dir)))
|
||||
(require 'xdg)
|
||||
(defvar my-tmp-dir (if-let* ((runtime-dir (xdg-runtime-dir)))
|
||||
(expand-file-name "emacs/"
|
||||
runtime-dir)
|
||||
(expand-file-name (format "emacs%d/"
|
||||
(user-uid))
|
||||
temporary-file-directory))
|
||||
"Directory used to store temporary state.")
|
||||
|
||||
(setq backup-by-copying t
|
||||
(setq auto-save-file-name-transforms `((".*" ,my-tmp-dir t))
|
||||
auto-save-list-file-prefix my-tmp-dir
|
||||
backup-directory-alist `((".*" . ,my-tmp-dir))
|
||||
backup-by-copying t
|
||||
inhibit-splash-screen t
|
||||
custom-file (expand-file-name "custom.el" temporary-file-directory)
|
||||
custom-file (expand-file-name "custom.el" my-tmp-dir)
|
||||
custom-safe-themes t)
|
||||
|
||||
(defun my-inhibit-hl-line-mode ()
|
||||
|
@ -539,6 +543,9 @@
|
|||
;; NixOS minimal LaTeX setup
|
||||
(org-latex-compiler "lualatex")
|
||||
(org-preview-latex-default-process 'lua-dvisvgm)
|
||||
(org-preview-latex-image-directory (if-let* ((cache (xdg-cache-home)))
|
||||
(expand-file-name "ltximg/" cache)
|
||||
".ltximg/"))
|
||||
(org-latex-src-block-backend 'engraved)
|
||||
:config
|
||||
(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.3)
|
||||
|
|
Loading…
Reference in a new issue