From 9371ea3b9b7772de0f8fa6de4e746345465c4f5c Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Thu, 7 Sep 2023 10:36:30 +0200 Subject: [PATCH] Update Emacs configuration --- .emacs.d/init.el | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 11576d3..37afd17 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -113,6 +113,7 @@ :pre-build (("./autogen.sh") ("./configure") ("make")))) +(elpaca (breadcrumb :repo "https://github.com/joaotavora/breadcrumb")) (elpaca (corfu :pre-build (("mv" "extensions/corfu-indexed.el" "corfu-indexed.el") ("rm" "-r" "extensions")))) @@ -197,6 +198,12 @@ :repo "https://git.sr.ht/~pkal/do-at-point" :pre-build (("pandoc" "-o" "do-at-point.texi" "README.md")))) (elpaca rfc-mode) +(elpaca (auctex + :files ("*.el" "*.info*") + :pre-build (("./autogen.sh") + ("./configure" "--with-lispdir=." "--with-texmf-dir=/tmp") + ("make") + ("cp" "doc/auctex.info" "doc/auctex.info-1" "doc/auctex.info-2" "doc/preview-latex.info" ".")))) (elpaca-wait) @@ -1255,7 +1262,8 @@ as the initial input for completion, and return that directory." (require 'pdf-tools)) (with-eval-after-load 'pdf-tools (pdf-tools-install :no-query) - (add-hook 'pdf-view-mode-hook #'pdf-view-midnight-minor-mode)) + ;; (add-hook 'pdf-view-mode-hook #'pdf-view-midnight-minor-mode) + ) (add-to-list 'revert-without-query "\\.pdf\\'") ;;; Configure terminal emulation via `vterm' @@ -1395,6 +1403,23 @@ as the initial input for completion, and return that directory." (with-eval-after-load 'texinfo (add-hook 'texinfo-mode-hook #'abbrev-mode)) +;;; Configure TeX + +(with-eval-after-load 'tex-mode + (add-hook 'latex-mode-hook #'electric-pair-local-mode) + (setq display-tex-shell-buffer-action nil + ;; '(display-buffer-no-window + ;; (allow-no-window . t)) + ;; latex-run-command "pdflatex" + ) + (define-advice tex-terminate-paragraph (:around (fun &rest args) fill-and-indent) + (fill-paragraph) + (apply fun args) + (indent-according-to-mode))) + +(with-eval-after-load 'tex + (setq TeX-view-program-selection '((output-pdf "PDF Tools")))) + ;;; Track currency exchange rates (defvar esy/eur-to-ils-rates nil) -- 2.39.2