fix(latex): run after-compilation-finished hook after Tex-Tex-sentinel

Fix: #8051
This commit is contained in:
Henrik Lissner 2024-09-06 04:01:40 -04:00
parent fe54aa436c
commit 79684ade71
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -128,7 +128,18 @@ If no viewer is found, `latex-preview-pane-mode' is used.")
:desc "View" "v" #'TeX-view :desc "View" "v" #'TeX-view
:desc "Compile" "c" #'+latex/compile :desc "Compile" "c" #'+latex/compile
:desc "Run all" "a" #'TeX-command-run-all :desc "Run all" "a" #'TeX-command-run-all
:desc "Run a command" "m" #'TeX-command-master)) :desc "Run a command" "m" #'TeX-command-master)
;; HACK: The standard LaTeXMk command uses `TeX-run-format', which doesn't
;; trigger `TeX-after-compilation-finished-functions', so swap it out for
;; `TeX-run-TeX', which does.
(defadvice! +latex--run-after-compilation-finished-functions-a (&rest args)
:after #'TeX-TeX-sentinel
(unless (TeX-error-report-has-errors-p)
(run-hook-with-args 'TeX-after-compilation-finished-functions
(with-current-buffer TeX-command-buffer
(expand-file-name
(TeX-active-master (TeX-output-extension))))))))
(use-package! tex-fold (use-package! tex-fold