From 275f1a33f35e3678f6bee647b3478929e0405c39 Mon Sep 17 00:00:00 2001 From: Ralf Beckmann Date: Sun, 2 May 2021 21:33:20 +0200 Subject: [PATCH] Prevent okular from stealing focus Pass the "noraise" flag to okular if it is used as a Latex viewer. If an okular instance is already displaying the Latex compilation result, subsequent invocations won't make okular steal focus from Emacs. --- modules/lang/latex/+viewers.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/latex/+viewers.el b/modules/lang/latex/+viewers.el index be5441a85..04f07d11b 100644 --- a/modules/lang/latex/+viewers.el +++ b/modules/lang/latex/+viewers.el @@ -26,7 +26,7 @@ (when (executable-find "okular") ;; Configure Okular as viewer. Including a bug fix ;; (https://bugs.kde.org/show_bug.cgi?id=373855) - (add-to-list 'TeX-view-program-list '("Okular" ("okular --unique file:%o" (mode-io-correlate "#src:%n%a")))) + (add-to-list 'TeX-view-program-list '("Okular" ("okular --noraise --unique file:%o" (mode-io-correlate "#src:%n%a")))) (add-to-list 'TeX-view-program-selection '(output-pdf "Okular")))) (`zathura