commit e8dd066503fb295de38a1c82c1927c1f5845f17a
parent ccf4a678e01d5a00b36666dbe47bc0534933474f
Author: Ethan Long <ethandavidlong@gmail.com>
Date: Thu, 13 Aug 2026 16:41:39 +1000
Forgor what I've changed.
Can't be too important.
Diffstat:
| M | config.org | | | 40 | ++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 40 insertions(+), 0 deletions(-)
diff --git a/config.org b/config.org
@@ -529,6 +529,33 @@ Unfortunately Emacs does this incorrectly by default, so I will disable this beh
(indent-tabs-mode -1)
(setq-default indent-tabs-mode -1)
#+end_src
+** Autosave & backup directories
+By default, Emacs puts backup files alongside regular files in the format of ~filename~~.
+This clutters up directories with extra files, and can be problematic when working in Git repos or shared spaces.
+
+Emacs additionally puts autosave files in the format of ~.#filename~.
+Whilst these are less intrusive and disappear upon saving, it is still worth putting them in a dedicated directory.
+
+First defining our dedicated directories for both of these files:
+#+begin_src emacs-lisp
+ (defvar ethandl/backup-dir
+ (expand-file-name "backups/" user-emacs-directory))
+ (defvar ethandl/autosave-dir
+ (expand-file-name "autosaves/" user-emacs-directory))
+#+end_src
+Now we ensure the directories exist:
+#+begin_src emacs-lisp
+ (unless (file-directory-p ethandl/backup-dir)
+ (make-directory ethandl/backup-dir t))
+ (unless (file-directory-p ethandl/autosave-dir)
+ (make-directory ethandl/autosave-dir t))
+#+end_src
+Finally we set the appropriate variables so that these directories are used:
+#+begin_src emacs-lisp
+ (setq backup-directory-alist `(("." . ,ethandl/backup-dir)))
+ (setq auto-save-file-name-transforms
+ `((".*" ,ethandl/autosave-dir t)))
+#+end_src
* Org mode
** Section numbering
I like my sections numbered:
@@ -584,6 +611,19 @@ If we want images generated by the output of ~org-babel~ to automatically render
(add-hook 'org-babel-after-execute-hook #'org-link-preview-region)
#+end_src
This will save a ~C-c C-x C-v~ invocation every time we want to display newly generated images.
+* LaTeX
+\(\text{\LaTeX}\) takes up a large part of my work, so I would like to have a nice \(\text{\LaTeX}\) editing environment.
+** PDF Viewing
+Whilst Emacs can view PDFs out of the box (wow), it rasterises the PDFs to something that is quite low resolution and doesn't look the best on all displays and is quite slow.
+
+The ~pdf-tools~ package allows for much better PDF rendering:
+#+begin_src emacs-lisp
+ (elpaca pdf-tools
+ (require 'pdf-tools)
+ (pdf-tools-install t t)
+ (add-to-list 'pdf-tools-enabled-modes #'pdf-view-midnight-minor-mode)
+ (add-to-list 'pdf-tools-enabled-modes #'auto-revert-mode))
+#+end_src
* The programming environment
This will be perpetually incomplete, my config cannot support /every/ language, nor do I really need it to.