Skip to content

Commit

Permalink
Declutter /tmp directory (dandavison#53)
Browse files Browse the repository at this point in the history
LaTeX compiler creates ton of temporary files in system `/tmp/`. Keeping
them in a separate subdirectory seems like a reasonable solution.
  • Loading branch information
PRESFIL authored Aug 21, 2022
1 parent a2c685b commit 4d75c1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lisp/xenops-math-latex.el
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ format the commands."
(aio-await (aio-sem-wait xenops-math-latex-tasks-semaphore))
(with-current-buffer buffer
(xenops-math-set-marker-on-element element))
(let* ((dir temporary-file-directory)
(let* ((dir (f-join temporary-file-directory "xenops"))
(base-name (f-base cache-file))
(make-file-name (lambda (ext) (f-join dir (concat base-name "." ext))))
(tex-file (funcall make-file-name "tex"))
Expand All @@ -176,6 +176,7 @@ format the commands."
(commands (xenops-math-latex-make-commands element dir tex-file image-input-file image-output-file)))
(condition-case error
(progn
(make-directory dir 't)
(aio-await
(xenops-aio-with-async-with-buffer
buffer
Expand Down

0 comments on commit 4d75c1c

Please sign in to comment.