From c5e5a2a40f698ef9a03f83b88e44d299c62d4b1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Hauspie?= <michael.hauspie@univ-lille.fr>
Date: Thu, 21 Nov 2024 09:17:31 +0100
Subject: [PATCH] Fix latex export in org mode and configure compilation buffer

---
 configuration.org | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/configuration.org b/configuration.org
index 3a81a70..0174ec4 100644
--- a/configuration.org
+++ b/configuration.org
@@ -450,7 +450,7 @@ org with contributed packages added.
                    ("h"   . emacs)
                    ))
   ;; Define the right latexmk command to export to latex
-  (org-latex-pdf-process (list "latexmk -pdflatex='pdflatex -shell-escape -interaction nonstopmode' -output-directory=%o -pdf %f"))
+  (org-latex-pdf-process (list "latexmk -f -pdf -%latex='%latex -shell-escape' -interaction=nonstopmode -output-directory=%o %b"))
 
   ;; Task management configuration
   (org-log-done 'time)
@@ -825,6 +825,12 @@ starts by configuring [[https://emacs-lsp.github.io/lsp-mode/][LSP]] which allow
 information from a language server dedicated to the programming
 language currently in use.
 
+First, configure the compilation buffer so that it scrolls to the end or to the first encountered
+error if any
+
+#+begin_src emacs-lisp
+(setq compilation-scroll-output 'first-error)
+#+end_src
 ** LSP
 
 #+begin_src emacs-lisp
-- 
GitLab